Op dinsdag 29 november 2005 14:08, schreef aaron@...749...:
This should be easy if you override the default output() method of inkex.py to allow you to do what you need (eg. give it a function body of "pass"). Then you should be able to:
- create a temporary directory in an OS independent way using the
tempfile module. 2. copy all images to this directory 3. rename all paths in the in memory copy of the document 4. use python to save the file into the directory 5. zip the directory and give to inkscape
Yes, did it. It now completely works as it should.
It creates a zip with all pictures and the svg doc with correct image paths. It uses a temp directory for collecting everything and it removes the temp dir after the zip is created.
Download it at: http://facility.lingewoud.nl/hacks/inkscape_save_as_zip/
Thanks for the advise Aaron.
Pim
Ps: please test the extension on other platform. I created it on Linux PPC