Squoosh-with-CLI icon indicating copy to clipboard operation
Squoosh-with-CLI copied to clipboard

feature request: Support STDIN / STDOUT workflow.

Open markstos opened this issue 11 months ago • 1 comments

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.

markstos avatar Nov 24 '24 14:11 markstos