caesium-clt icon indicating copy to clipboard operation
caesium-clt copied to clipboard

Allow "same folder as input" flag for output

Open stamminator opened this issue 1 year ago • 4 comments

The Caesium GUI app has the option to output to the same folder as the file's input, resulting in an overwrite of the original file. Currently, the only way I can figure out how to do this in caesium-clt is to manually specify the same path via the --output param.

$ caesium -q 0 --output $env:USERPROFILE\screenshots $env:USERPROFILE\screenshots\test.png

Could this flag be added to the CLI as well? Maybe -s, --same-folder-as-input would work. I plan to use it to automatically compress my ShareX screenshots using a custom post-capture action.

stamminator avatar Oct 03 '24 21:10 stamminator

A few comments about this:

  • it would be just for convenience, as you can already do so as you said
  • I think it must come with a warning saying you are about to overwrite the original files to avoid accidents
  • a --suffix option (or something that can change the output file name) might be useful if you don't want to overwrite

What do you think?

Lymphatus avatar Oct 05 '24 10:10 Lymphatus

I think it must come with a warning saying you are about to overwrite the original files to avoid accidents

Makes sense, although a force flag would be nice for automated workflows.

a --suffix option (or something that can change the output file name) might be useful if you don't want to overwrite

I can see that being useful, but for my use case, the $output variable in ShareX contains the full path and file name. As long as the path and the file name can only be specified each as separate arguments, this workflow wouldn't work without string parsing trickery.

stamminator avatar Oct 08 '24 13:10 stamminator

This feature is really necessary, are there any plans to add it?

asins avatar Oct 11 '24 02:10 asins

@asins yes, expect it to ship relatively soon

Lymphatus avatar Oct 11 '24 07:10 Lymphatus

Released on v1.0.0-beta.0

Lymphatus avatar Mar 03 '25 15:03 Lymphatus