-
Notifications
You must be signed in to change notification settings - Fork 61
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
Usability #33
Comments
Without having looked at the code and therefore the feasibility of the implementation I'd vote in favor of using "unnamed" command line parameters as input/output file names to save the I'd not recommend to add a suffix to the input file name in case the user omits an output file name since an "arbitrary" suffix is likely not to match the users requirements. |
But it would be better than overwriting the input file, which I cannot recommend, based on my own experience with this program and others. Using an, as you call it, arbitrary suffix would be acceptable when the user does not define an output file name themselves. There could even be a default option for this. I’m just more concerned with easy drag and drop. :) |
This was fixed in 72c2ec8. |
I use this bash command to workaround scour's hesitation to overwrite the input file: for file in *.svg; do scour -i "$file" -o "$file"opt; mv -- "$file"opt "$file"; done It cleans all the SVG files in current folder (not recursive though) and renames scour's output files to overwrite the original ones. I derived it from this answer on Unix StackExchange: Link to answer. In case if anybody needs it, this is the full command with all the scour options I use: for file in *.svg; do scour -i "$file" -o "$file"opt --set-precision=5 --renderer-workaround --enable-viewboxing --indent=space --nindent=2 --strip-xml-space --enable-id-stripping --protect-ids-noninkscape; mv -- "$file"opt "$file"; done |
An option to replace the input file is currently tracked in #129. |
@Ede123 That's good news! 😃 If implemented, would simplify my command into: for file in *.svg; do scour "$file" --in-place; done |
Have you considered any simplifications or changes to the workflow? Currently, the minimum input is this:
However, would it not be possible to imply the
-i
and-o
by default? Like this:In addition and/or alternatively, why not make
-o
optional and automatically write the new file to the same directory, appended with a number, date and/or keyword to the file?Ideally, I just want to type
scour
and drag and drop into the CLI. Moreover, I would actually like to see an option for scrubbing multiple files at once.Any thoughts?
The text was updated successfully, but these errors were encountered: