Code

lower limit on linewidth
[inkscape.git] / share / extensions / svg_and_media_zip_output.py
index 74311b4315c4a97e5abd0e49ee7e74ad296c979f..cc8f7db0e1f8f14f72554a4586310474de2e1942 100644 (file)
@@ -40,6 +40,8 @@ import zipfile
 import shutil
 import sys
 import tempfile
+import gettext
+_ = gettext.gettext
 
 class MyEffect(inkex.Effect):
     def __init__(self):
@@ -51,7 +53,6 @@ class MyEffect(inkex.Effect):
     def effect(self):
         ttmp_orig = self.document.getroot()
 
-        docbase = ttmp_orig.get(inkex.addNS('docbase',u'sodipodi'),'')
         docname = ttmp_orig.get(inkex.addNS('docname',u'sodipodi'))
 
         orig_tmpfile = sys.argv[1]
@@ -98,14 +99,15 @@ class MyEffect(inkex.Effect):
                 shutil.copy(tmp_dir + os.path.sep + absref,tmp_dir)
                 z.write(tmp_dir + os.path.sep + absref.encode("latin-1"),os.path.basename(absref).encode("latin-1"))
             else:
-                inkex.debug('Could not locate file: %s' % absref)
+                inkex.errormsg(_('Could not locate file: %s') % absref)
 
             node.set(inkex.addNS('href',u'xlink'),os.path.basename(absref))
             node.set(inkex.addNS('absref',u'sodipodi'),os.path.basename(absref))
 
             
-e = MyEffect()
-e.affect()
+if __name__ == '__main__':
+    e = MyEffect()
+    e.affect()
 
 
 # vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 encoding=utf-8 textwidth=99