Op woensdag 30 november 2005 16:34, schreef Alan Horkan: on@...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
The plugin now just saves the zip. It doesn't return (give) it to inkscape. Is it necessary to return it?
Would be nice but I wouldn't say it was necessary given the intention is to package this all up to be sent on somewhere else rather than keep working on it.
This does sound like a lot of work,
I think it's not so hard.
can the code for creating inkjar files not be easily reused and included natively in Inkscape to help save on the amount of work which needs to be implemented as an extension?
Can you tell me how to create inkjar files, I don't know where to find this in inkscape. Doesn't the jar functionality only work for inkview?
I investigated inkview a little and it seems that it can only open jars which have no images packed. I don't know this for sure.
By the way when the concept is implemented for zip I think its easy to reimplement it working with jars.
Pim