summaryrefslogtreecommitdiffstats
path: root/share/extensions
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2017-02-06 16:50:07 +0000
committerShlomi Fish <shlomif@shlomifish.org>2017-02-06 16:50:07 +0000
commit1232596134bcba8d19f2809ffdc84e3b5c33d3b3 (patch)
tree2fcb91d6fe9ef47a85ba3f73be10dc5dc7ee10a4 /share/extensions
parentMerged. (diff)
parentRemove some unneeded < C++11 fallback code (diff)
downloadinkscape-1232596134bcba8d19f2809ffdc84e3b5c33d3b3.tar.gz
inkscape-1232596134bcba8d19f2809ffdc84e3b5c33d3b3.zip
Merged.
(bzr r15369.1.18)
Diffstat (limited to 'share/extensions')
-rwxr-xr-xshare/extensions/dxf_outlines.py3
-rw-r--r--share/extensions/grid_cartesian.inx45
-rwxr-xr-xshare/extensions/grid_cartesian.py3
-rwxr-xr-xshare/extensions/hpgl_input.py2
-rwxr-xr-xshare/extensions/hpgl_output.py15
-rwxr-xr-xshare/extensions/measure.py3
-rwxr-xr-xshare/extensions/perspective.py2
-rwxr-xr-xshare/extensions/polyhedron_3d.py3
-rwxr-xr-xshare/extensions/print_win32_vector.py4
-rwxr-xr-xshare/extensions/scour.inkscape.py40
-rw-r--r--share/extensions/scour.inx16
-rwxr-xr-xshare/extensions/synfig_output.py9
-rwxr-xr-xshare/extensions/test/run-all-extension-tests27
-rwxr-xr-xshare/extensions/test/simpletransform.test.py28
-rw-r--r--share/extensions/test/svg/simpletransform.test.svg8
-rwxr-xr-xshare/extensions/uniconv-ext.py5
-rwxr-xr-xshare/extensions/uniconv_output.py5
17 files changed, 180 insertions, 38 deletions
diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py
index 525461bde..e30637f55 100755
--- a/share/extensions/dxf_outlines.py
+++ b/share/extensions/dxf_outlines.py
@@ -44,6 +44,8 @@ try:
from numpy import *
from numpy.linalg import solve
except:
+ # Initialize gettext for messages outside an inkex derived class
+ inkex.localize()
inkex.errormsg(_("Failed to import the numpy or numpy.linalg modules. These modules are required by this extension. Please install them and try again."))
inkex.sys.exit()
@@ -338,6 +340,7 @@ class MyEffect(inkex.Effect):
scale = eval(self.options.units)
if not scale:
scale = 25.4/96 # if no scale is specified, assume inch as baseunit
+ scale /= self.unittouu('1px')
h = self.unittouu(self.document.getroot().xpath('@height', namespaces=inkex.NSS)[0])
self.groupmat = [[[scale, 0.0, 0.0], [0.0, -scale, h*scale]]]
doc = self.document.getroot()
diff --git a/share/extensions/grid_cartesian.inx b/share/extensions/grid_cartesian.inx
index 494aabf76..f053d80bb 100644
--- a/share/extensions/grid_cartesian.inx
+++ b/share/extensions/grid_cartesian.inx
@@ -4,27 +4,32 @@
<id>grid.cartesian</id>
<dependency type="executable" location="extensions">grid_cartesian.py</dependency>
<dependency type="executable" location="extensions">inkex.py</dependency>
+
<param name="border_th" type="float" min="0" max="1000" _gui-text="Border Thickness (px):">3</param>
- <_param name="x_axis" type="description" appearance="header">X Axis</_param>
- <param name="x_divs" type="int" min="1" max="1000" _gui-text="Major X Divisions:">6</param>
- <param name="dx" type="float" min="1" max="1000" _gui-text="Major X Division Spacing (px):">100.0</param>
- <param name="x_subdivs" type="int" min="1" max="1000" _gui-text="Subdivisions per Major X Division:">2</param>
- <param name="x_log" type="boolean" _gui-text="Logarithmic X Subdiv. (Base given by entry above)">false</param>
- <param name="x_subsubdivs" type="int" min="1" max="1000" _gui-text="Subsubdivs. per X Subdivision:">5</param>
- <param name="x_half_freq" type="int" min="1" max="1000" _gui-text="Halve X Subsubdiv. Frequency after 'n' Subdivs. (log only):">4</param>
- <param name="x_divs_th" type="float" min="0" max="1000" _gui-text="Major X Division Thickness (px):">2</param>
- <param name="x_subdivs_th" type="float" min="0" max="1000" _gui-text="Minor X Division Thickness (px):">1</param>
- <param name="x_subsubdivs_th" type="float" min="0" max="1000" _gui-text="Subminor X Division Thickness (px):">0.3</param>
- <_param name="y_axis" type="description" appearance="header">Y Axis</_param>
- <param name="y_divs" type="int" min="1" max="1000" _gui-text="Major Y Divisions:">5</param>
- <param name="dy" type="float" min="1" max="1000" _gui-text="Major Y Division Spacing (px):">100.0</param>
- <param name="y_subdivs" type="int" min="1" max="1000" _gui-text="Subdivisions per Major Y Division:">1</param>
- <param name="y_log" type="boolean" _gui-text="Logarithmic Y Subdiv. (Base given by entry above)">false</param>
- <param name="y_subsubdivs" type="int" min="1" max="1000" _gui-text="Subsubdivs. per Y Subdivision:">5</param>
- <param name="y_half_freq" type="int" min="1" max="1000" _gui-text="Halve Y Subsubdiv. Frequency after 'n' Subdivs. (log only):">4</param>
- <param name="y_divs_th" type="float" min="0" max="1000" _gui-text="Major Y Division Thickness (px):">2</param>
- <param name="y_subdivs_th" type="float" min="0" max="1000" _gui-text="Minor Y Division Thickness (px):">1</param>
- <param name="y_subsubdivs_th" type="float" min="0" max="1000" _gui-text="Subminor Y Division Thickness (px):">0.3</param>
+ <param name="tab" type="notebook">
+ <page name="x_tab" _gui-text="X Axis">
+ <param name="x_divs" type="int" min="1" max="1000" _gui-text="Major X Divisions:">6</param>
+ <param name="dx" type="float" min="1" max="1000" _gui-text="Major X Division Spacing (px):">100.0</param>
+ <param name="x_subdivs" type="int" min="1" max="1000" _gui-text="Subdivisions per Major X Division:">2</param>
+ <param name="x_log" type="boolean" _gui-text="Logarithmic X Subdiv. (Base given by entry above)">false</param>
+ <param name="x_subsubdivs" type="int" min="1" max="1000" _gui-text="Subsubdivs. per X Subdivision:">5</param>
+ <param name="x_half_freq" type="int" min="1" max="1000" _gui-text="Halve X Subsubdiv. Frequency after 'n' Subdivs. (log only):">4</param>
+ <param name="x_divs_th" type="float" min="0" max="1000" _gui-text="Major X Division Thickness (px):">2</param>
+ <param name="x_subdivs_th" type="float" min="0" max="1000" _gui-text="Minor X Division Thickness (px):">1</param>
+ <param name="x_subsubdivs_th" type="float" min="0" max="1000" _gui-text="Subminor X Division Thickness (px):">0.3</param>
+ </page>
+ <page name="y_tab" _gui-text="Y Axis">
+ <param name="y_divs" type="int" min="1" max="1000" _gui-text="Major Y Divisions:">5</param>
+ <param name="dy" type="float" min="1" max="1000" _gui-text="Major Y Division Spacing (px):">100.0</param>
+ <param name="y_subdivs" type="int" min="1" max="1000" _gui-text="Subdivisions per Major Y Division:">1</param>
+ <param name="y_log" type="boolean" _gui-text="Logarithmic Y Subdiv. (Base given by entry above)">false</param>
+ <param name="y_subsubdivs" type="int" min="1" max="1000" _gui-text="Subsubdivs. per Y Subdivision:">5</param>
+ <param name="y_half_freq" type="int" min="1" max="1000" _gui-text="Halve Y Subsubdiv. Frequency after 'n' Subdivs. (log only):">4</param>
+ <param name="y_divs_th" type="float" min="0" max="1000" _gui-text="Major Y Division Thickness (px):">2</param>
+ <param name="y_subdivs_th" type="float" min="0" max="1000" _gui-text="Minor Y Division Thickness (px):">1</param>
+ <param name="y_subsubdivs_th" type="float" min="0" max="1000" _gui-text="Subminor Y Division Thickness (px):">0.3</param>
+ </page>
+ </param>
<effect>
<object-type>all</object-type>
diff --git a/share/extensions/grid_cartesian.py b/share/extensions/grid_cartesian.py
index 26270002d..e92509505 100755
--- a/share/extensions/grid_cartesian.py
+++ b/share/extensions/grid_cartesian.py
@@ -44,6 +44,9 @@ def draw_SVG_rect(x,y,w,h, width, fill, name, parent):
class Grid_Polar(inkex.Effect):
def __init__(self):
inkex.Effect.__init__(self)
+ self.OptionParser.add_option("--tab",
+ action="store", type="string",
+ dest="tab", default="x_tab")
self.OptionParser.add_option("--x_divs",
action="store", type="int",
dest="x_divs", default=5,
diff --git a/share/extensions/hpgl_input.py b/share/extensions/hpgl_input.py
index 2b275cbf8..13d6d00ec 100755
--- a/share/extensions/hpgl_input.py
+++ b/share/extensions/hpgl_input.py
@@ -26,6 +26,8 @@ import hpgl_decoder
import inkex
import sys
+inkex.localize()
+
# parse options
parser = inkex.optparse.OptionParser(usage='usage: %prog [options] HPGLfile', option_class=inkex.InkOption)
parser.add_option('--resolutionX', action='store', type='float', dest='resolutionX', default=1016.0, help='Resolution X (dpi)')
diff --git a/share/extensions/hpgl_output.py b/share/extensions/hpgl_output.py
index 58f82da71..f31c3fc2d 100755
--- a/share/extensions/hpgl_output.py
+++ b/share/extensions/hpgl_output.py
@@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# standard library
import sys
+from inkex import NSS
# local libraries
import hpgl_encoder
import inkex
@@ -44,10 +45,18 @@ class HpglOutput(inkex.Effect):
self.OptionParser.add_option('--precut', action='store', type='inkbool', dest='precut', default='TRUE', help='Use precut')
self.OptionParser.add_option('--flat', action='store', type='float', dest='flat', default=1.2, help='Curve flatness')
self.OptionParser.add_option('--autoAlign', action='store', type='inkbool', dest='autoAlign', default='TRUE', help='Auto align')
+ self.DOCROTATE = "{http://www.inkscape.org/namespaces/inkscape}document_rotation"
def effect(self):
self.options.debug = False
# get hpgl data
+ svg = self.document.getroot()
+ xpathStr = '//sodipodi:namedview'
+ nv = svg.xpath(xpathStr, namespaces=NSS)
+ document_rotate = "0"
+ if nv != []:
+ document_rotate = nv[0].get(self.DOCROTATE)
+ nv[0].set(self.DOCROTATE,"0")
myHpglEncoder = hpgl_encoder.hpglEncoder(self)
try:
self.hpgl, debugObject = myHpglEncoder.getHpgl()
@@ -56,9 +65,13 @@ class HpglOutput(inkex.Effect):
# issue error if no paths found
inkex.errormsg(_("No paths where found. Please convert all objects you want to save into paths."))
self.hpgl = ''
+ if nv != [] and document_rotate:
+ nv[0].set("inkscape:document_rotation",document_rotate)
return
else:
type, value, traceback = sys.exc_info()
+ if nv != [] and document_rotate:
+ nv[0].set("inkscape:document_rotation",document_rotate)
raise ValueError, ("", type, value), traceback
# convert raw HPGL to HPGL
hpglInit = 'IN'
@@ -67,6 +80,8 @@ class HpglOutput(inkex.Effect):
if self.options.speed > 0:
hpglInit += ';VS%d' % self.options.speed
self.hpgl = hpglInit + self.hpgl + ';SP0;PU0,0;IN; '
+ if nv != [] and document_rotate:
+ nv[0].set("inkscape:document_rotation",document_rotate)
def output(self):
# print to file
diff --git a/share/extensions/measure.py b/share/extensions/measure.py
index b605ffe93..d025f142c 100755
--- a/share/extensions/measure.py
+++ b/share/extensions/measure.py
@@ -51,6 +51,9 @@ try:
except locale.Error:
locale.setlocale(locale.LC_ALL, 'C')
+# Initialize gettext for messages outside an inkex derived class
+inkex.localize()
+
# third party
try:
import numpy
diff --git a/share/extensions/perspective.py b/share/extensions/perspective.py
index ea08b98dc..f15deaad5 100755
--- a/share/extensions/perspective.py
+++ b/share/extensions/perspective.py
@@ -39,6 +39,8 @@ try:
from numpy import *
from numpy.linalg import *
except:
+ # Initialize gettext for messages outside an inkex derived class
+ inkex.localize()
inkex.errormsg(_("Failed to import the numpy or numpy.linalg modules. These modules are required by this extension. Please install them and try again. On a Debian-like system this can be done with the command, sudo apt-get install python-numpy."))
exit()
diff --git a/share/extensions/polyhedron_3d.py b/share/extensions/polyhedron_3d.py
index 86203d4bc..a74a64e69 100755
--- a/share/extensions/polyhedron_3d.py
+++ b/share/extensions/polyhedron_3d.py
@@ -57,6 +57,9 @@ import inkex
import simplestyle
from simpletransform import computePointInNode
+# Initialize gettext for messages outside an inkex derived class
+inkex.localize()
+
# third party
try:
from numpy import *
diff --git a/share/extensions/print_win32_vector.py b/share/extensions/print_win32_vector.py
index 7151a3f88..984a10eed 100755
--- a/share/extensions/print_win32_vector.py
+++ b/share/extensions/print_win32_vector.py
@@ -35,6 +35,7 @@ import simplestyle
import simpletransform
import cubicsuperpath
+inkex.localize() # Initialize gettext
if not inkex.sys.platform.startswith('win'):
exit(_("sorry, this will run only on Windows, exiting..."))
@@ -61,7 +62,7 @@ class MyEffect(inkex.Effect):
if style['stroke'] and style['stroke'] != 'none' and style['stroke'][0:3] != 'url':
rgb = simplestyle.parseColor(style['stroke'])
if style.has_key('stroke-width'):
- stroke = self.unittouu(style['stroke-width'])
+ stroke = self.unittouu(style['stroke-width'])/self.unittouu('1px')
stroke = int(stroke*self.scale)
if style.has_key('fill'):
if style['fill'] and style['fill'] != 'none' and style['fill'][0:3] != 'url':
@@ -198,6 +199,7 @@ class MyEffect(inkex.Effect):
exit() # user clicked Cancel
self.scale = (ord(pDevMode[58]) + 256.0*ord(pDevMode[59]))/96 # use PrintQuality from DEVMODE
+ self.scale /= self.unittouu('1px')
self.groupmat = [[[self.scale, 0.0, 0.0], [0.0, self.scale, 0.0]]]
doc = self.document.getroot()
self.process_group(doc)
diff --git a/share/extensions/scour.inkscape.py b/share/extensions/scour.inkscape.py
index eb31f308f..3d3f35bdb 100755
--- a/share/extensions/scour.inkscape.py
+++ b/share/extensions/scour.inkscape.py
@@ -1,10 +1,23 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-import sys, platform, inkex
+
+import platform
+import sys
+
+from distutils.version import StrictVersion
+
+import inkex
try:
import scour
- from scour.scour import scourString
+ try:
+ from scour.scour import scourString
+ except ImportError: # compatibility for very old Scour (<= 0.26) - deprecated!
+ try:
+ from scour import scourString
+ scour.__version__ = scour.VER
+ except:
+ raise
except Exception as e:
inkex.errormsg("Failed to import Python module 'scour'.\nPlease make sure it is installed (e.g. using 'pip install scour' or 'sudo apt-get install python-scour') and try again.")
inkex.errormsg("\nDetails:\n" + str(e))
@@ -17,10 +30,13 @@ except Exception as e:
inkex.errormsg("\nDetails:\n" + str(e))
sys.exit()
+
class ScourInkscape (inkex.Effect):
def __init__(self):
inkex.Effect.__init__(self)
+
+ # Scour options
self.OptionParser.add_option("--tab", type="string", action="store", dest="tab")
self.OptionParser.add_option("--simplify-colors", type="inkbool", action="store", dest="simple_colors")
self.OptionParser.add_option("--style-to-xml", type="inkbool", action="store", dest="style_to_xml")
@@ -46,7 +62,26 @@ class ScourInkscape (inkex.Effect):
self.OptionParser.add_option("--enable-comment-stripping", type="inkbool", action="store", dest="strip_comments")
self.OptionParser.add_option("--renderer-workaround", type="inkbool", action="store", dest="renderer_workaround")
+ # options for internal use of the extension
+ self.OptionParser.add_option("--scour-version", type="string", action="store", dest="scour_version")
+ self.OptionParser.add_option("--scour-version-warn-old", type="inkbool", action="store", dest="scour_version_warn_old")
+
def effect(self):
+ # version check if enabled in options
+ if (self.options.scour_version_warn_old):
+ scour_version = scour.__version__
+ scour_version_min = self.options.scour_version
+ if (StrictVersion(scour_version) < StrictVersion(scour_version_min)):
+ inkex.errormsg("The extension 'Optimized SVG Output' is designed for Scour " + scour_version_min + " and later "
+ "but you're using the older version Scour " + scour_version + ".")
+ inkex.errormsg("This usually works just fine but not all options available in the UI might be supported "
+ "by the version of Scour installed on your system "
+ "(see https://github.com/scour-project/scour/blob/master/HISTORY.md for release notes of Scour).")
+ inkex.errormsg("Note: You can permanently disable this message on the 'About' tab of the extension window.")
+ del self.options.scour_version
+ del self.options.scour_version_warn_old
+
+ # do the scouring
try:
input = file(self.args[0], "r")
self.options.infilename = self.args[0]
@@ -61,6 +96,7 @@ class ScourInkscape (inkex.Effect):
inkex.errormsg("Scour version: " + scour.__version__)
sys.exit()
+
if __name__ == '__main__':
e = ScourInkscape()
e.affect(output=False)
diff --git a/share/extensions/scour.inx b/share/extensions/scour.inx
index f7b8aedf7..5cad00780 100644
--- a/share/extensions/scour.inx
+++ b/share/extensions/scour.inx
@@ -92,6 +92,22 @@
_gui-description="Preserve all IDs that start with the specified prefix (e.g. specify &quot;flag&quot; to preserve &quot;flag-mx&quot;, &quot;flag-pt&quot;, etc.)."
name="protect-ids-prefix" type="string"></param>
</page>
+ <page name="About" _gui-text="About">
+ <param name="spacer" type="description">&#160;</param>
+ <_param name="about_name_desc" type="description">Optimized SVG Output is provided by</_param>
+ <param name="about_name" type="description" appearance="header"> Scour - An SVG Scrubber</param>
+ <param name="spacer" type="description">&#160;</param>
+ <_param name="about_link_desc" type="description">For details please refer to</_param>
+ <param name="about_link" type="description"> https://github.com/scour-project/scour</param>
+ <param name="spacer" type="description">&#160;</param>
+ <param name="spacer" type="description">&#160;</param>
+ <param name="spacer" type="description">&#160;</param>
+ <_param name="about_version_desc" type="description">This version of the extension is designed for</_param>
+ <param name="about_version" type="description">Scour 0.31+</param>
+ <param name="version" type="string" gui-hidden="true">0.31</param>
+ <param _gui-text="Show warnings for older versions of Scour"
+ name="version_warn_old" type="boolean" indent="1">true</param>
+ </page>
</param>
<output>
<extension>.svg</extension>
diff --git a/share/extensions/synfig_output.py b/share/extensions/synfig_output.py
index bcd1eeaf3..461078951 100755
--- a/share/extensions/synfig_output.py
+++ b/share/extensions/synfig_output.py
@@ -1046,6 +1046,11 @@ def extract_width(style, width_attrib, mtx):
###### Main Class #########################################
class SynfigExport(SynfigPrep):
def __init__(self):
+ svg = self.document.getroot()
+ xpathStr = '//http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd}:namedview'
+ res = svg.xpath(xpathStr, namespaces=inkex.NSS)
+ self.document_rotate = res[0].get("inkscape:document_rotation")
+ res[0].set("inkscape:document_rotation","0")
SynfigPrep.__init__(self)
def effect(self):
@@ -1073,6 +1078,10 @@ class SynfigExport(SynfigPrep):
root_canvas.append(layer)
d.get_root_tree().write(sys.stdout)
+ svg = self.document.getroot()
+ xpathStr = '//http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd}:namedview'
+ res = svg.xpath(xpathStr, namespaces=inkex.NSS)
+ res[0].set("inkscape:document_rotation",self.document_rotate)
def convert_node(self, node, d):
"""Convert an SVG node to a list of Synfig layers"""
diff --git a/share/extensions/test/run-all-extension-tests b/share/extensions/test/run-all-extension-tests
index e7faf672a..ff739c311 100755
--- a/share/extensions/test/run-all-extension-tests
+++ b/share/extensions/test/run-all-extension-tests
@@ -38,20 +38,25 @@ failed_tests=$( $MKTEMP )
if coverage.py erase >/dev/null 2>/dev/null; then
has_py_coverage=true
cover_py_cmd=coverage.py
-else
- if coverage erase >/dev/null 2>/dev/null; then
- has_py_coverage=true
- cover_py_cmd=coverage
- else
- if python-coverage erase >/dev/null 2>/dev/null; then
- has_py_coverage=true
- cover_py_cmd=python-coverage
- fi
- fi
+ else
+ if coverage erase >/dev/null 2>/dev/null; then
+ has_py_coverage=true
+ cover_py_cmd=coverage
+ else
+ if python-coverage erase >/dev/null 2>/dev/null; then
+ has_py_coverage=true
+ cover_py_cmd=python-coverage
+ else
+ if coverage-script.py erase >/dev/null 2>/dev/null; then
+ has_py_coverage=true
+ cover_py_cmd=coverage-script.py
+ fi
+ fi
+ fi
fi
if $has_py_coverage; then
- echo -e "\nRunning tests with coverage"
+ echo -e "\nRunning tests with coverage (${cover_py_cmd})"
fi
#if $has_py_coverage; then
# $cover_py_cmd -e
diff --git a/share/extensions/test/simpletransform.test.py b/share/extensions/test/simpletransform.test.py
new file mode 100755
index 000000000..9e5dbc3b2
--- /dev/null
+++ b/share/extensions/test/simpletransform.test.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+
+import os
+import sys
+import unittest
+
+sys.path.append('..') # this line allows to import the extension code
+
+import inkex
+from simpletransform import *
+
+class ComputeBBoxTest(unittest.TestCase):
+ def setUp(self):
+ args = [ 'svg/simpletransform.test.svg' ]
+ self.e = inkex.Effect()
+ self.e.affect(args, False)
+
+ def test_scaled_object(self):
+ "Object in the defs with 50,50 scaled by 0.5 when used"
+ bbox = computeBBox(self.e.document.xpath("//svg:g", namespaces=inkex.NSS))
+ text_bbox = "{} {} {} {}".format(bbox[0], bbox[1], bbox[2], bbox[3])
+ self.assertEqual(text_bbox, "0.0 25.0 0.0 25.0")
+
+
+
+if __name__ == '__main__':
+ suite = unittest.TestLoader().loadTestsFromTestCase(ComputeBBoxTest)
+ unittest.TextTestRunner(verbosity=2).run(suite)
diff --git a/share/extensions/test/svg/simpletransform.test.svg b/share/extensions/test/svg/simpletransform.test.svg
new file mode 100644
index 000000000..62876eea7
--- /dev/null
+++ b/share/extensions/test/svg/simpletransform.test.svg
@@ -0,0 +1,8 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100">
+ <g>
+ <defs>
+ <rect width="50" height="50" id="rect"/>
+ </defs>
+ <use xlink:href="#rect" transform="scale(.5)"/>
+ </g>
+</svg> \ No newline at end of file
diff --git a/share/extensions/uniconv-ext.py b/share/extensions/uniconv-ext.py
index c84ee2e0a..876cc4642 100755
--- a/share/extensions/uniconv-ext.py
+++ b/share/extensions/uniconv-ext.py
@@ -51,10 +51,11 @@ if cmd == None:
import imp
imp.find_module("uniconvertor")
except ImportError:
- sys.stderr.write(_('You need to install the UniConvertor software.\n'+\
+ inkex.localize()
+ inkex.errormsg(_('You need to install the UniConvertor software.\n'+\
'For GNU/Linux: install the package python-uniconvertor.\n'+\
'For Windows: download it from\n'+\
- 'http://sk1project.org/modules.php?name=Products&product=uniconvertor\n'+\
+ 'https://sk1project.net/modules.php?name=Products&product=uniconvertor&op=download\n'+\
'and install into your Inkscape\'s Python location\n'))
sys.exit(1)
cmd = 'python -c "import uniconvertor; uniconvertor.uniconv_run()"'
diff --git a/share/extensions/uniconv_output.py b/share/extensions/uniconv_output.py
index 7815137b6..de6b6409f 100755
--- a/share/extensions/uniconv_output.py
+++ b/share/extensions/uniconv_output.py
@@ -118,10 +118,11 @@ def get_command():
import imp
imp.find_module("uniconvertor")
except ImportError:
- sys.stderr.write(_('You need to install the UniConvertor software.\n'+\
+ inkex.localize()
+ inkex.errormsg(_('You need to install the UniConvertor software.\n'+\
'For GNU/Linux: install the package python-uniconvertor.\n'+\
'For Windows: download it from\n'+\
- 'http://sk1project.org/modules.php?name=Products&product=uniconvertor\n'+\
+ 'https://sk1project.net/modules.php?name=Products&product=uniconvertor&op=download\n'+\
'and install into your Inkscape\'s Python location\n'))
sys.exit(1)
cmd = 'python -c "import uniconvertor; uniconvertor.uniconv_run();"'