Hi.
I am trying to make a couple of python scripts witch handle cross file
svg linking. but my never ending problem is to find where the original
file actually is located on my computer. the second parameter in
sys.argv is a path to a temporary file. but since inkscape dosen't copy
my whole folders content and subfolders content into my tempoary folder
it can't find the file's to load data from.
I tried to use the sodipodi:docname atribute, but it's not allways the
exact path. then i tried make my own atribute, but it offcourse dosen't
change when i move it to another folder.
any idear on how to get the original path of my svg file and not the
temporary one?
many thanks. Peter.
original path in inkscape script
Re: original path in inkscape script
> find where the original file actually is located on my computer
which file ? your python script or the svg being edited by inkscape ?
> but since inkscape dosen't copy my whole folders content and subfolders content into my tempoary folder
what don't you do it by script then ?
can we see your script ?
which file ? your python script or the svg being edited by inkscape ?
> but since inkscape dosen't copy my whole folders content and subfolders content into my tempoary folder
what don't you do it by script then ?
can we see your script ?
-
pjensen68321
- Posts: 2
- Joined: Tue Aug 07, 2012 8:52 pm
Re: original path in inkscape script
Its the path for the original svg file. Copying the whole folder strukture is not an option becouse it could be several GB over network.
The scripts basically just look for a use tag and if there is something before # in the xlink:href attribute it takes it as a file to load in, witch is done by using the path of the original file and the file to be loaded.
so actually, i need the location of the temp svg file for data and the location for the original svg file for path to external svgfiles.
If you want I can upload the scipt files but they aren't very complete and is quite a mess right now.
i'm guessing there must be some kind of attribute that i can write in the .inx file (the one that descripe the scripts in inkscape menu)
The scripts basically just look for a use tag and if there is something before # in the xlink:href attribute it takes it as a file to load in, witch is done by using the path of the original file and the file to be loaded.
so actually, i need the location of the temp svg file for data and the location for the original svg file for path to external svgfiles.
If you want I can upload the scipt files but they aren't very complete and is quite a mess right now.
i'm guessing there must be some kind of attribute that i can write in the .inx file (the one that descripe the scripts in inkscape menu)