-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Improve build/image-optimization.sh #20586
Improve build/image-optimization.sh #20586
Conversation
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
scour --create-groups \ | ||
--enable-id-stripping \ | ||
--enable-comment-stripping \ | ||
--shorten-ids \ | ||
--remove-metadata \ | ||
--strip-xml-prolog \ | ||
--no-line-breaks \ | ||
-i $svg.opttmp \ | ||
-o $svg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One drawback of splitting it up into lines is that it is not possible anymore to easily copy-paste into the terminal and adjust the filename, which I often do if there’s only 1 new icon to optimize. So I’d prefer if this command stays on one line, but not a blocker. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, you can copy/paste multi lines in terminal, what's the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try it? I thought so too, but at least in gnome-terminal it's a bit wonky when you try to edit anything but the last line.
If we can move the -i and -o parts on the same last line, it would work and still be readable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I did and looked very clean :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I'm fine either way!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well with the change I made you can also just specify the exact directory and it should only take a blink of your eye. If that is not enough we can also add a check for the provided path and run only on that one file if it matches a known pattern instead of being a directory
Moving to 20 as it is no priority and run mostly in master anyway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let’s not have it lying around and just go for it, I’ll cope. ;)
@nickvergessen Drone is failing, otherwise all good! :) |
cc @ma12-co now you can run:
./image-optimization.sh ../apps/spreed/img/