Comment 3 for bug 171476

Revision history for this message
Nikhil (answerquest) wrote :

Use case: SVG (or PDF imported to inkscape) has 10 layers/groups one on top of the other. In inkscape GUI, I can turn on the Groups panel, de-select 7 of the groups (I think the PDF import makes it groups and not layers.. anyways it doesn't matter to the CLI) and keep just 3 visible. That's what I want. I export this to PNG/SVG/etc . Now, I have a big bunch of such files coming from the same source, all having same id nomenclatures internally. Here is my command for extracting one id:

inkscape -z -i g2846 -j -D -d 300 test3.pdf -e 3.png

I want three groups/layers combined, in their original order, and all the others hidden, just like I had done in the GUI.

inkscape -z -i g12,g90,g2846 -j -D -d 300 test3.pdf -e 3.png

presently he CLI reads the list as one, searches for it and errors out.

Parsing the string by commas shouldn't be difficult. But I guess the challenge is in laying them on top of each other while preserving their positions, and sending the combined result to output. Right now I have to specify -D, for --export-area-drawing to keep all the extracts in their right positions (anyone wishing to show progressive layering in a presentation or animation will need the same). We could configure it such that -D is assumed if more than one id is given.