-
Notifications
You must be signed in to change notification settings - Fork 27
Add command line option to save as same filename #131
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
Comments
Just out of curiosity, should the original file be backed up (x.jpg backed up to x.jpg.bak, for example) or are you happy making the original file disappear forever? |
On 2024-09-24 8:11 pm, Ndolam wrote:
Just out of curiosity, should the original file be backed up (x.jpg backed
up to x.jpg.bak, for example) or are you happy making the original file
disappear forever?
I want to overwrite the original file, personally.
…---
My use-case is calling cropgui from another program, and it's really hard to
figure out the new filename programmatically:
cropgui 2024-09-24.jpg
mv 2024-09-24-cropped.jpg 2024-09-24.jpg
Figuring out your suggested backup name is much easier, if needed.
cropgui 2024-09-24.jpg
rm 2024-09-24.jpg.bak
|
I'm open to finding ways to make cropgui work better in conjunction with other software, but I wouldn't want this to be the default mode. Perhaps an "--inplace" commandline flag or "--output-filename" value (which would only be sensible with a single input file?) to change from the default behavior would be a good way to approach this feature request. |
za3k, I realize you may already have this or something like it, but in case you don't (or others reading this don't) here is some fairly shell-agnostic code which gives you the cropped filename, should the original filename be in the variable filename: cropped= I tested it, but not extensively on every pathological file name. |
@jepler Yes, totally agreed it should not be the default. The issue name is "command-line option to [...]". Another relevant issue: #76 @Ndolam Yep, I've written it several times. But it's very annoying to remember those coding details for each new project. I would love to just write:
And some use cases (like feh, for example), don't support multiple lines--they just want a single command. So I'd have to write a wrapper script or have a local fork. |
Please and thank you :)
The text was updated successfully, but these errors were encountered: