Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: Support STDIN / STDOUT workflow. #10

Open
markstos opened this issue Nov 24, 2024 · 1 comment · May be fixed by #11
Open

feature request: Support STDIN / STDOUT workflow. #10

markstos opened this issue Nov 24, 2024 · 1 comment · May be fixed by #11

Comments

@markstos
Copy link
Contributor

I would like to create a Linux/wayland workflow where I take a screenshot, annotate, optimize it, copy it and paste it into my blog... all without any temp file being left on my local hard disk.

The rest of the pipeline has been solved:

  • grimshot takes the screenshot an pipes to STDOUT
  • swappy receives on STDIN, annotates and can pipe to STDOUT
  • squoosh receives on STDIN, processes, prints to STDOUT ❓
  • wl-copy receives on STDIN
  • ✨ Paste into blog. ✨

Describe the solution you'd like

  1. If input filename passed is -, read file from STDIN
    a. This may require using a default output file name if --stdout is not used, as none is provided.
  2. If --stdout is passed and there is more than one input file, throw an error.
  3. If --stdout is provided and there is one input file, print resulting file to STDOUT instead of a file.

Does other service/app have this feature?

It's possible to use ImageMagick/GraphicsMagic to do file type conversions and then other format-specific tools to do optimizations, but Squoosh seems to the best and can usefully convert formats and optimize in one step.

@aggregate1166877
Copy link
Contributor

I think this is a great idea and can see it bringing a lot of value to my own projects as well.

Currently, I'm at my time budget limit because I have contract work that needs to be completed by the end of December, so I won't be able to look at this myself for a while. If someone else wants to give it a shot, I'd be happy to review and test it. Otherwise, I'll get to it when I need a break from my other work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants