we can use a special 'character' to indicate "/"
for example, ":", "#", etc.
If we can organize the svg file in a tree similar to directory tree, it's even better.
xnakos wrote
I can provide a full solution tomorrow. What I suggest is this:
1. The "/" character is not used for normal layer names (I believe this holds now).
2. The default exporting directory is the current directory (override immediately to avoid that).
3. Overriding the exporting directory occurs using dummy layers in the huge svg in this way:
./ for using the current directory for exporting
./asdf/ for creating a directory asdf in the current directory and putting everything that follows, unless overriden, there
./asdf/zxcv/ for creating the directory structure and putting everything that follows, unless overriden, there
./asf/sdf/&./uidfh/sdfjhk/&./sdfhj/cuyud/ for inserting the stuff that follows into multiple directories (for redundancy fans)
Tell me what you think. I tested using python 2.7.3 and the first inkscape svg given in this thread. I also took a random svg and tried it with LibreCAD, built it and it worked fine as an icon.
Known issue: Thumbnails are not working when viewing the svgs in gnome. But there is a solution. Open the svg as a text file and replace all occurences of "ns0:" with "" (nothing) (without the quotes). Of course, this can be fixed very easily using the script too.
Have in mind that the layers in the svg are stored in reverse, that is the layer at the bottom (when viewing it in inkscape) is the first layer (group element) that appears in the svg/xml file.