Thank you, but the syntax you suggested didn't work for me, the above code did work.Β Also, there were issues in my original example regarding the way I presented the file to inkscape - originally, I appended the filename to the list of actions, now I'm using "file-open".Β My original syntax for "object-align" was incorrect as well.
The documentation for command line usage seems scant and scattered; am I missing something?
I should add, I'm using Inkscape 1.3 with Linux Mint.
inkscape --actions="select-by-id:id12:id12; selection-ungroup; select-clear; select-by-id:id12:circle3337; select-by-id:id0:id0; object-align:right:bottom:first; select-clear; select-by-id:id12:path3335; select-by-id:id1:id1; object-align:right:bottom:first; select-clear; select-by-id:id12:circle3339; select-by-id:id2:id2; object-align:right:bottom:first; select-clear; select-by-id:id12:circle3341; select-by-id:id3:id3; object-align:right:bottom:first; select-clear; select-by-id:id12:circle3353; select-by-id:id4:id4; object-align:right:bottom:first; select-clear; select-by-id:id12:circle3351; select-by-id:id5:id5; object-align:right:bottom:first; select-clear; select-by-id:id12:circle3355; select-by-id:id6:id6; object-align:right:bottom:first; select-clear; select-by-id:id12:circle3357; select-by-id:id7:id7; object-align:right:bottom:first; select-clear; select-by-id:id12:circle3363; select-by-id:id8:id8; object-align:right:bottom:first; select-clear; select-by-id:id12:circle3361; select-by-id:id9:id9; object-align:right:bottom:first; select-clear; select-by-id:id12:circle3365; select-by-id:id10:id10; object-align:right:bottom:first; select-clear; select-by-id:id12:circle3367; select-by-id:id11:id11; object-align:right:bottom:first; select-clear; export-do; export-overwrite;" $file
I get the message:Β "select_by_id: Did not find object with id: id12:id12"
I'm trying to specify elements inside a group, but I don't know the syntax.
inkscape --actions="select-by-id:id12,id12"
After the first id it should be a comma ,Β
you can useΒ
select-list
to check that you have selected what you expected to select.
inkscape --actions="file-open:$file; select-by-id:"id12:circle3337"; query-width; select-by-id:"id0:id0"; object-align:right bottom first; select-clear; select-by-id:"id12:path3335"; select-by-id:"id1:id1"; object-align:right bottom first; select-clear; select-by-id:"id12:circle3339"; select-by-id:"id2:id2"; object-align:right bottom first; select-clear; select-by-id:"id12:circle3341"; select-by-id:"id3:id3"; object-align:right bottom first; select-clear; select-by-id:"id12:circle3353"; select-by-id:"id4:id4"; object-align:right bottom first; select-clear; select-by-id:"id12:circle3351"; select-by-id:"id5:id5"; object-align:right bottom first; select-clear; select-by-id:"id12:circle3355"; select-by-id:"id6:id6"; object-align:right bottom first; select-clear; select-by-id:"id12:circle3357"; select-by-id:"id7:id7"; object-align:right bottom first; select-clear; select-by-id:"id12:circle3363"; select-by-id:"id8:id8"; object-align:right bottom first; select-clear; select-by-id:"id12:circle3361"; select-by-id:"id9:id9"; object-align:right bottom first; select-clear; select-by-id:"id12:circle3365"; select-by-id:"id10:id10"; object-align:right bottom first; select-clear; select-by-id:"id12:circle3367"; select-by-id:"id11:id11"; object-align:right bottom first; select-clear; export-filename:$file; export-do; file-close;"
Thank you, but the syntax you suggested didn't work for me, the above code did work.Β Also, there were issues in my original example regarding the way I presented the file to inkscape - originally, I appended the filename to the list of actions, now I'm using "file-open".Β My original syntax for "object-align" was incorrect as well.
The documentation for command line usage seems scant and scattered; am I missing something?
I should add, I'm using Inkscape 1.3 with Linux Mint.
The , comma separator for the id list is correct.
I'm not sure what the extra colon is doing.Β
Can you test on the attached sample svg ? it only contains 7 object, three of which are rounded rectangles with ids rect1,rect2,rect3
inkscape --actions="select-by-id:rect1,rect2,rect3;select-list" ./select_test.svg
should give
rect1 cloned: false ref: 1 href: 0 total href: 0
rect2 cloned: false ref: 1 href: 0 total href: 0
rect3 cloned: false ref: 1 href: 0 total href: 0
Β