Squoosh-with-CLI
Squoosh-with-CLI copied to clipboard
feature request: Support STDIN / STDOUT workflow.
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:
grimshottakes the screenshot an pipes to STDOUTswappyreceives on STDIN, annotates and can pipe to STDOUT- ❓
squooshreceives on STDIN, processes, prints to STDOUT ❓ - wl-copy receives on STDIN
- ✨ Paste into blog. ✨
Describe the solution you'd like
- 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. - If --stdout is passed and there is more than one input file, throw an error.
- 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.