summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8a651cb)
raw | patch | inline | side by side (parent: 8a651cb)
author | JazzyNico <JazzyNico@users.sourceforge.net> | |
Mon, 29 Jun 2009 18:38:47 +0000 (18:38 +0000) | ||
committer | JazzyNico <JazzyNico@users.sourceforge.net> | |
Mon, 29 Jun 2009 18:38:47 +0000 (18:38 +0000) |
share/extensions/svg_and_media_zip_output.py | patch | blob | history |
diff --git a/share/extensions/svg_and_media_zip_output.py b/share/extensions/svg_and_media_zip_output.py
index 6aaf3b2262ec42fdae0e693f10af7852779fbe29..341de728b94b4738d67aa6c0282ab8045abe59c0 100644 (file)
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-Version 0.3
+Version 0.4 (Nicolas Dufour, nicoduf@yahoo.fr)
+ fix a coding bug: now use UTF-8 to save filenames in the archive.
+ fix xlink href parsing (now a real URL in 0.47).
+ fix Win32 stdout \r\r\n bug (stdout now set to bin mode).
+ fix a double .svg extension bug (added svg and svgz in the docstripped extensions).
TODO
- fix bug: not saving existing .zip after a Collect for Output is run
- maybe add better extention
"""
-import inkex, os.path, urlparse, urllib
-import os
+import inkex
+import urlparse
+import urllib
+import os, os.path
import string
import zipfile
import shutil
inkex.Effect.__init__(self)
def output(self):
- out = open(self.zip_file,'r')
+ out = open(self.zip_file,'rb')
+ if os.name == 'nt':
+ try:
+ import msvcrt
+ msvcrt.setmode(1, os.O_BINARY)
+ except:
+ pass
sys.stdout.write(out.read())
out.close()
self.clear_tmp()