How do I invoke my.custom.extension by CLI
Hello all,
this is my first post on this list. I'm not sure whether this is the place to ask, but couldn't find a better one.
I chose to use inkscape for modifying vector-graphic-PDFs and convert them to PNGs and also to a varienty of PDFs with extra information in a background batch job. Basically this works well with official Inkscape 1.1 (c68e22c387, 2021-05-23) and the results are just as desired.
Unfortunatelly there is some glitch with inkscape freezing every some hundred conversions.
To track down the above freeze I decided to try the latest inkscape source and build it myself (Windows 10/Windows 11) to be able to debug it.
I found that the current app (24f6795) does not obey to the same CLI. Calling --verb=my.custom.extension complains Unable to find: my.custom.extension verbs_action: Invalid verb: my.custom.extension I get the same error message if I try to invoke as -- actions=my.custom.extension. Both --action-list and --verb-list do not list any extensions. The extension is part of the menu, so inkscape seems to know about it.
Commit 5e32ad5 "Menubar Filters + Extensions : Conversion to Actions" removes extensions from the verb-list. Various comments suggest that verbs are supposed to be moved to actions. Not sure whether that is the plan for extensions as well.
So my question is: How can I invoke my custom extension from CLI in the current version of inkscape (24f6795926, 2021-12-25) or any later?
Cheers and a happy new year to everybody, Lokomoko
Welcome Lokomoko,
Sorry for the delay, the mailing list can be slower around holidays. (also sorry about any double/triple posting, I'm not too familiar with mailing lists)
Both issues are bugs, so extensions should be working with CLI mode. Unfortunately, I don't think there is a way to invoke your custom extension from CLI in 1.2-dev at the moment (though you can still call it through python of course).
Issues can be reported at inkscape.org/report. Since these issues are known, I've gone ahead and opened a report at https://gitlab.com/inkscape/inkscape/-/issues/3107 for the action issue after asking about it in chat https://chat.inkscape.org/channel/team_devel?msg=twkzFru6KSpu7SuQd (the chat is also mirrored with irc://irc.libera.chat/#inkscape-devel).
I think the freezing could be related to the issues we've had with the Windows CI/CD builds (reported at https://gitlab.com/inkscape/inkscape/-/issues/3108), which occasionally timed out on some tests (we weren't able to pin down the cause and had to disabled tests on Windows to get builds out to test). You can probably trigger the freeze with the same call as our cli_export-area-page_export-id_svg test, which would be inkscape "--export-area-page" "--export-id=MyStar" "--export-id-only" "--export-filename=export-area-page_export-id.svg" "/path/to/inkscape/testfiles/cli_tests/testcases/areas.svg".
Thanks for looking into these problems, and hope you've had a happy new year!
Nathan.
On Thursday, 6 January 2022, 07:19:08 am AEDT, marc m@rcie.de wrote:
Hello all,
this is my first post on this list. I'm not sure whether this is the place to ask, but couldn't find a better one.
I chose to use inkscape for modifying vector-graphic-PDFs and convert them to PNGs and also to a varienty of PDFs with extra information in a background batch job. Basically this works well with official Inkscape 1.1 (c68e22c387, 2021-05-23) and the results are just as desired.
Unfortunatelly there is some glitch with inkscape freezing every some hundred conversions.
To track down the above freeze I decided to try the latest inkscape source and build it myself (Windows 10/Windows 11) to be able to debug it.
I found that the current app (24f6795) does not obey to the same CLI. Calling --verb=my.custom.extension complains Unable to find: my.custom.extension verbs_action: Invalid verb: my.custom.extension I get the same error message if I try to invoke as -- actions=my.custom.extension. Both --action-list and --verb-list do not list any extensions. The extension is part of the menu, so inkscape seems to know about it.
Commit 5e32ad5 "Menubar Filters + Extensions : Conversion to Actions" removes extensions from the verb-list. Various comments suggest that verbs are supposed to be moved to actions. Not sure whether that is the plan for extensions as well.
So my question is: How can I invoke my custom extension from CLI in the current version of inkscape (24f6795926, 2021-12-25) or any later?
Cheers and a happy new year to everybody, Lokomoko _______________________________________________ Inkscape Devel mailing list -- inkscape-devel@lists.inkscape.org To unsubscribe send an email to inkscape-devel-leave@lists.inkscape.org
Hi Nathan,
thanks for the comprehensive information and sorry I'm responding so late - I just discovered that my MUA had moved your messages into the Spam-Folder.
I had already given up hope, that I would find help on inkscape-devel. But I'm happy, that I was wrong. Meanwhile I tried https://chat.inkscape.org/channel/inkscape_user and there I learned that I should have a another look at the latest 1.2-dev.
Am Samstag, dem 15.01.2022 um 07:12 +0000 schrieb Nathan Lee:
Both issues are bugs, so extensions should be working with CLI mode. Unfortunately, I don't think there is a way to invoke your custom extension from CLI in 1.2-dev at the moment (though you can still call it through python of course).
Issues can be reported at inkscape.org/report. Since these issues are known, I've gone ahead and opened a report at https://gitlab.com/inkscape/inkscape/-/issues/3107 for the action issue after asking about it in chat https://chat.inkscape.org/channel/team_devel?msg=twkzFru6KSpu7SuQd (the chat is also mirrored with irc://irc.libera.chat/#inkscape- devel).
I tried Inkscape 1.2-alpha (d182c329f3, 2022-02-17) and it lets me call my extension with --actions. Everything else seems to work as with Version 1.1.
Regarding the inkscape freeze I have reorganized my scripting, so that inkscape does not call itself again (e.g. for export of pdf or png). That seemed to reduce the risk of freezing inkscape for my setup by quite a bit and additionally increased speed. I will continue to have an eye on it and can now investigate with a fairly up-to-date debug- build.
Thanks for the good work!
Regards, Lokomoko
I think the freezing could be related to the issues we've had with the Windows CI/CD builds (reported at https://gitlab.com/inkscape/inkscape/-/issues/3108 ), which occasionally timed out on some tests (we weren't able to pin down the cause and had to disabled tests on Windows to get builds out to test). You can probably trigger the freeze with the same call as our cli_export-area-page_export-id_svg test, which would be inkscape "--export-area-page" "--export-id=MyStar" "--export-id-only" " --export-filename=export-area-page_export-id.svg" "/path/to/inkscape/testfiles/cli_tests/testcases/areas.svg".
Thanks for looking into these problems, and hope you've had a happy new year!
Nathan.
On Thursday, 6 January 2022, 07:19:08 am AEDT, marc < m@rcie.de
wrote:
Hello all,
this is my first post on this list. I'm not sure whether this is the place to ask, but couldn't find a better one.
I chose to use inkscape for modifying vector-graphic-PDFs and convert them to PNGs and also to a varienty of PDFs with extra information in a background batch job. Basically this works well with official Inkscape 1.1 (c68e22c387, 2021-05-23) and the results are just as desired.
Unfortunatelly there is some glitch with inkscape freezing every some hundred conversions.
To track down the above freeze I decided to try the latest inkscape source and build it myself (Windows 10/Windows 11) to be able to debug it.
I found that the current app (24f6795) does not obey to the same CLI. Calling --verb=my.custom.extension complains Unable to find: my.custom.extension verbs_action: Invalid verb: my.custom.extension I get the same error message if I try to invoke as -- actions=my.custom.extension. Both --action-list and --verb-list do not list any extensions. The extension is part of the menu, so inkscape seems to know about it.
Commit 5e32ad5 "Menubar Filters + Extensions : Conversion to Actions" removes extensions from the verb-list. Various comments suggest that verbs are supposed to be moved to actions. Not sure whether that is the plan for extensions as well.
So my question is: How can I invoke my custom extension from CLI in the current version of inkscape (24f6795926, 2021-12-25) or any later?
Cheers and a happy new year to everybody, Lokomoko _______________________________________________ Inkscape Devel mailing list -- inkscape-devel@lists.inkscape.org
To unsubscribe send an email to inkscape-devel-leave@lists.inkscape.org
Inkscape Devel mailing list -- inkscape-devel@lists.inkscape.org
To unsubscribe send an email to inkscape-devel-leave@lists.inkscape.org
participants (2)
-
marc
-
Nathan Lee