-
-
Notifications
You must be signed in to change notification settings - Fork 170
Avoid Inkscape 1.0 deprecation warnings #227
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
Conversation
Update the arguments to Inkscape, to be in line with new current Inkscape argument formats (introduced in Inkscape 1.0, released May 2020). Updating these arguments avoids the following deprecation warnings (which are safe to ignore, but annoying): ``` Warning: Option --without-gui= is deprecated Warning: Option --file= is deprecated ``` and ``` Warning: Option --export-plain-svg= is deprecated ``` if the format is svg, or ``` Warning: Option --export-png= is deprecated ``` if the format is png.
I just noticed that this has been commented on before in #144, but not implemented in a PR? This is my first PR here, so I hope I'm being helpful. |
OK, I saw that the test CI is running with Ubuntu 20.04 on a docker container which has Inkscape v0.92.5 installed. So this doesn't pass the test on that setup since the new argument format is not accepted by the old Inkscape. I missed that before. I just pushed a fix which checks the Inkscape version and uses the new argument format only if the version is 1.0 or higher. |
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.
Good catch, I have v1.0 too but given how slow adoption is making this accessible to v0.9 users makes sense. My suggestion to refactor isn't required if you don't like it, just my suggestion for less code and hence easier to read/understand what is happening.
Okay, I took your suggestions. I agree it's a little confusing to follow where the '%s' go, but I think you're right this is better than two large blocks of repeated code.
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.
Thanks for the refactor, I think that's quite a bit clearer now.
Thanks! We could avoid re-checking the version for every graphic, but the performance impact should be small. It's probably not a big issue. |
Update the arguments passed to Inkscape, in order to be in line with current Inkscape argument formats (introduced in Inkscape 1.0, released May 2020).
The current arguments passed to Inkscape result in warnings being printed, if the Inkscape version is 1.0 or later.
Updating these arguments avoids the following deprecation warnings (which are safe to ignore, but annoying):
and
if the format is svg, or
if the format is png.