summaryrefslogtreecommitdiffstats
path: root/share/extensions
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-06-19 00:29:52 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-06-19 00:29:52 +0000
commitfd8dc80e78f402e37d9c4ef29094e69d90653ea6 (patch)
treea858ce047096b8ddb581d76805760e773a251a5f /share/extensions
parentRemoved original path helper paths pointed by LiamW (diff)
parentadd win64 files to distribution (Makefile.am) (diff)
downloadinkscape-fd8dc80e78f402e37d9c4ef29094e69d90653ea6.tar.gz
inkscape-fd8dc80e78f402e37d9c4ef29094e69d90653ea6.zip
Update to latest tip (trunk r13432)
(bzr r13341.1.62)
Diffstat (limited to 'share/extensions')
-rw-r--r--share/extensions/Barcode/Base.py31
-rw-r--r--share/extensions/Barcode/Code128.py49
-rw-r--r--share/extensions/Barcode/Code25i.py3
-rw-r--r--share/extensions/Barcode/Code39.py7
-rw-r--r--share/extensions/Barcode/Code39Ext.py6
-rw-r--r--share/extensions/Barcode/Code93.py2
-rw-r--r--share/extensions/Barcode/Ean13.py (renamed from share/extensions/Barcode/EAN13.py)2
-rw-r--r--share/extensions/Barcode/Ean5.py (renamed from share/extensions/Barcode/EAN5.py)6
-rw-r--r--share/extensions/Barcode/Ean8.py (renamed from share/extensions/Barcode/EAN8.py)2
-rw-r--r--share/extensions/Barcode/Makefile.am12
-rw-r--r--share/extensions/Barcode/Rm4scc.py (renamed from share/extensions/Barcode/RM4CC.py)2
-rw-r--r--share/extensions/Barcode/Upca.py (renamed from share/extensions/Barcode/UPCA.py)2
-rw-r--r--share/extensions/Barcode/Upce.py (renamed from share/extensions/Barcode/UPCE.py)6
-rw-r--r--share/extensions/Barcode/__init__.py61
-rw-r--r--share/extensions/Makefile.am3
-rw-r--r--share/extensions/README18
-rw-r--r--share/extensions/guides_creator.inx189
-rwxr-xr-xshare/extensions/guides_creator.py4
-rw-r--r--share/extensions/hershey.inx66
-rw-r--r--share/extensions/hpgl_input.inx38
-rw-r--r--share/extensions/hpgl_output.inx86
-rw-r--r--share/extensions/inkscape_help_relnotes.inx2
-rw-r--r--share/extensions/inkscape_help_reportabug.inx2
-rw-r--r--share/extensions/plotter.inx158
-rw-r--r--share/extensions/render_barcode.inx22
-rwxr-xr-xshare/extensions/render_barcode.py79
-rw-r--r--share/extensions/scour.py9
-rwxr-xr-xshare/extensions/svg_transform.py9
-rwxr-xr-xshare/extensions/test/render_barcode.test.py32
-rwxr-xr-xshare/extensions/yocto_css.py9
30 files changed, 465 insertions, 452 deletions
diff --git a/share/extensions/Barcode/Base.py b/share/extensions/Barcode/Base.py
index b86185388..b7429f84f 100644
--- a/share/extensions/Barcode/Base.py
+++ b/share/extensions/Barcode/Base.py
@@ -34,6 +34,7 @@ class Barcode(object):
"""Cause an error to be reported"""
sys.stderr.write(
"Error encoding '%s' as %s barcode: %s\n" % (bar, self.name, msg))
+ return "ERROR"
def __init__(self, param={}):
self.document = param.get('document', None)
@@ -50,29 +51,33 @@ class Barcode(object):
self.width = len(self.string)
self.data = self.graphicalArray(self.string)
- def generate(self):
- """Generate the actual svg from the coding"""
- svg_uri = u'http://www.w3.org/2000/svg'
- if not self.string or not self.data:
- return
+ def get_id(self):
+ """Get the next useful id"""
if not self.document:
- return self.error("No document defined")
-
- data = self.data
- # Collect document ids
+ return "barcode"
doc_ids = {}
docIdNodes = self.document.xpath('//@id')
for m in docIdNodes:
doc_ids[m] = 1
- # We don't have svg documents so lets do something raw:
name = 'barcode'
- # Make sure that the id/name is inique
index = 0
while (doc_ids.has_key(name)):
- name = 'barcode' + str(index)
- index = index + 1
+ index += 1
+ name = 'barcode%d' % index
+ return name
+
+ def generate(self):
+ """Generate the actual svg from the coding"""
+ svg_uri = u'http://www.w3.org/2000/svg'
+ if self.string == 'ERROR':
+ return
+ if not self.string or not self.data:
+ raise ValueError("No string specified for barcode.")
+
+ data = self.data
+ name = self.get_id()
# use an svg group element to contain the barcode
barcode = etree.Element('{%s}%s' % (svg_uri,'g'))
diff --git a/share/extensions/Barcode/Code128.py b/share/extensions/Barcode/Code128.py
index 8734fc330..618ce7817 100644
--- a/share/extensions/Barcode/Code128.py
+++ b/share/extensions/Barcode/Code128.py
@@ -27,7 +27,29 @@ from Base import Barcode
import math
import re
-map = [ '11011001100','11001101100','11001100110','10010011000','10010001100','10001001100','10011001000','10011000100','10001100100','11001001000','11001000100','11000100100','10110011100','10011011100','10011001110','10111001100','10011101100','10011100110','11001110010','11001011100','11001001110','11011100100','11001110100','11101101110','11101001100','11100101100','11100100110','11101100100','11100110100','11100110010','11011011000','11011000110','11000110110','10100011000','10001011000','10001000110','10110001000','10001101000','10001100010','11010001000','11000101000','11000100010','10110111000','10110001110','10001101110','10111011000','10111000110','10001110110','11101110110','11010001110','11000101110','11011101000','11011100010','11011101110','11101011000','11101000110','11100010110','11101101000','11101100010','11100011010','11101111010','11001000010','11110001010','10100110000','10100001100','10010110000','10010000110','10000101100','10000100110','10110010000','10110000100','10011010000','10011000010','10000110100','10000110010','11000010010','11001010000','11110111010','11000010100','10001111010','10100111100','10010111100','10010011110','10111100100','10011110100','10011110010','11110100100','11110010100','11110010010','11011011110','11011110110','11110110110','10101111000','10100011110','10001011110','10111101000','10111100010','11110101000','11110100010','10111011110','10111101110','11101011110','11110101110','11010000100','11010010000','11010011100','11000111010','11' ]
+codeMap = [
+ '11011001100','11001101100','11001100110','10010011000','10010001100',
+ '10001001100','10011001000','10011000100','10001100100','11001001000',
+ '11001000100','11000100100','10110011100','10011011100','10011001110',
+ '10111001100','10011101100','10011100110','11001110010','11001011100',
+ '11001001110','11011100100','11001110100','11101101110','11101001100',
+ '11100101100','11100100110','11101100100','11100110100','11100110010',
+ '11011011000','11011000110','11000110110','10100011000','10001011000',
+ '10001000110','10110001000','10001101000','10001100010','11010001000',
+ '11000101000','11000100010','10110111000','10110001110','10001101110',
+ '10111011000','10111000110','10001110110','11101110110','11010001110',
+ '11000101110','11011101000','11011100010','11011101110','11101011000',
+ '11101000110','11100010110','11101101000','11101100010','11100011010',
+ '11101111010','11001000010','11110001010','10100110000','10100001100',
+ '10010110000','10010000110','10000101100','10000100110','10110010000',
+ '10110000100','10011010000','10011000010','10000110100','10000110010',
+ '11000010010','11001010000','11110111010','11000010100','10001111010',
+ '10100111100','10010111100','10010011110','10111100100','10011110100',
+ '10011110010','11110100100','11110010100','11110010010','11011011110',
+ '11011110110','11110110110','10101111000','10100011110','10001011110',
+ '10111101000','10111100010','11110101000','11110100010','10111011110',
+ '10111101110','11101011110','11110101110','11010000100','11010010000',
+ '11010011100','11000111010','11' ]
def mapExtra(sd, chars):
result = list(sd)
@@ -44,7 +66,8 @@ charAB = list(' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^
charA = mapExtra(charAB, range(0, 31)) # Offset 64
charB = mapExtra(charAB, range(96, 125)) # Offset -32
-class Object(Barcode):
+class Code128(Barcode):
+ """Main barcode object, generates the encoding bits here"""
def encode(self, text):
result = ''
blocks = []
@@ -65,7 +88,7 @@ class Object(Barcode):
if block:
blocks.append(self.bestBlock(block))
block = '';
-
+
self.inclabel = text
return self.encodeBlocks(blocks)
@@ -74,12 +97,12 @@ class Object(Barcode):
if block.upper() == block:
return [ 'A', block ]
return [ 'B', block ]
-
+
def encodeBlocks(self, blocks):
total = 0
pos = 0
encode = '';
-
+
for block in blocks:
set = block[0]
datum = block[1]
@@ -103,7 +126,7 @@ class Object(Barcode):
i = 1
total = total + num * i
- encode = encode + map[num]
+ encode = encode + codeMap[num]
pos = pos + 1
if set == 'A' or set == 'B':
@@ -113,18 +136,18 @@ class Object(Barcode):
for char in datum:
total = total + (chars.index(char) * pos)
- encode = encode + map[chars.index(char)]
+ encode = encode + codeMap[chars.index(char)]
pos = pos + 1
else:
for char in (datum[i:i+2] for i in range(0, len(datum), 2)):
total = total + (int(char) * pos)
- encode = encode + map[int(char)]
+ encode = encode + codeMap[int(char)]
pos = pos + 1
-
+
checksum = total % 103
- encode = encode + map[checksum]
- encode = encode + map[106]
- encode = encode + map[107]
-
+ encode = encode + codeMap[checksum]
+ encode = encode + codeMap[106]
+ encode = encode + codeMap[107]
+
return encode
diff --git a/share/extensions/Barcode/Code25i.py b/share/extensions/Barcode/Code25i.py
index 518a306f2..51346be60 100644
--- a/share/extensions/Barcode/Code25i.py
+++ b/share/extensions/Barcode/Code25i.py
@@ -34,14 +34,13 @@ encoding = {
'7' : '00011',
'8' : '10010',
'9' : '01010',
-
}
# Start and stop code are already encoded into white (0) and black(1) bars
start_code = '1010'
stop_code = '1101'
-class Object(Barcode):
+class Code25i(Barcode):
# Convert a text into string binary of black and white markers
def encode(self, number):
self.label = number
diff --git a/share/extensions/Barcode/Code39.py b/share/extensions/Barcode/Code39.py
index 64b22f352..ade397463 100644
--- a/share/extensions/Barcode/Code39.py
+++ b/share/extensions/Barcode/Code39.py
@@ -68,7 +68,7 @@ encoding = {
' ' : '011000100',
}
-class Object(Barcode):
+class Code39(Barcode):
# Convert a text into string binary of black and white markers
def encode(self, text):
text = text.upper()
@@ -93,10 +93,7 @@ class Object(Barcode):
encoded = encoded + colour + colour
else:
encoded = encoded + colour
- if colour == '1':
- colour = '0'
- else:
- colour = '1'
+ colour = colour == '1' and '0' or '1'
self.inclabel = text
return encoded;
diff --git a/share/extensions/Barcode/Code39Ext.py b/share/extensions/Barcode/Code39Ext.py
index 8f1e77826..b6df47de2 100644
--- a/share/extensions/Barcode/Code39Ext.py
+++ b/share/extensions/Barcode/Code39Ext.py
@@ -19,7 +19,7 @@
Python barcode renderer for Code39 Extended barcodes. Designed for Inkscape.
"""
-import Code39
+from Code39 import Code39
encode = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
@@ -46,7 +46,7 @@ mapB = getMap(range(1, 26)) # $
mapC = getMap(range(33, 58)) # /
mapD = getMap(range(97, 122)) # +
-class Object(Code39.Object):
+class Code39Ext(Code39):
def encode(self, text):
# We are only going to extend the Code39 barcodes
result = ''
@@ -61,5 +61,5 @@ class Object(Code39.Object):
char = '+' + mapD[char]
result = result + char
- return Code39.Object.encode(self, result);
+ return Code39.encode(self, result);
diff --git a/share/extensions/Barcode/Code93.py b/share/extensions/Barcode/Code93.py
index 76cbf683b..866ec6036 100644
--- a/share/extensions/Barcode/Code93.py
+++ b/share/extensions/Barcode/Code93.py
@@ -56,7 +56,7 @@ mapD = getMap(range(97, 122)) # +
encoding = '100010100 101001000 101000100 101000010 100101000 100100100 100100010 101010000 100010010 100001010 110101000 110100100 110100010 110010100 110010010 110001010 101101000 101100100 101100010 100110100 100011010 101011000 101001100 101000110 100101100 100010110 110110100 110110010 110101100 110100110 110010110 110011010 101101100 101100110 100110110 100111010 100101110 111010100 111010010 111001010 101101110 101110110 110101110 100100110 111011010 111010110 100110010 101011110'.split()
-class Object(Barcode):
+class Code93(Barcode):
def encode(self, text):
# start marker
bits = self.encode93('MARKER')
diff --git a/share/extensions/Barcode/EAN13.py b/share/extensions/Barcode/Ean13.py
index 41681173b..3bad5d6e5 100644
--- a/share/extensions/Barcode/EAN13.py
+++ b/share/extensions/Barcode/Ean13.py
@@ -23,7 +23,7 @@ Python barcode renderer for EAN13 barcodes. Designed for use with Inkscape.
from BaseEan import EanBarcode
-class Object(EanBarcode):
+class Ean13(EanBarcode):
"""Provide an Ean13 barcode generator"""
name = 'ean13'
lengths = [ 12 ]
diff --git a/share/extensions/Barcode/EAN5.py b/share/extensions/Barcode/Ean5.py
index 68ff99738..1bd26a4bd 100644
--- a/share/extensions/Barcode/EAN5.py
+++ b/share/extensions/Barcode/Ean5.py
@@ -25,14 +25,14 @@ from BaseEan import EanBarcode
FAMS = [ '11000','10100','10010','10001','01100','00110','00011','01010','01001','00101' ]
START = '01011'
-class Object(EanBarcode):
+class Ean5(EanBarcode):
"""Provide an Ean5 barcode generator"""
name = 'ean5'
length = 5
def _encode(self, number):
- self.x += 110.0 # horiz offset so it does not overlap EAN13
- self.y -= self.height + 5 # move the text to the top
+ self.x += 110.0*self.scale # horiz offset so it does not overlap EAN13
+ self.y -= (self.height + 5)*self.scale # move the text to the top
self.label = ' '.join(self.space(number))
family = sum([int(n)*int(m) for n,m in zip(number, '39393')]) % 10
return START + '01'.join(self.encode_interleaved(family, number, FAMS))
diff --git a/share/extensions/Barcode/EAN8.py b/share/extensions/Barcode/Ean8.py
index 05b4d7bb7..83e82814a 100644
--- a/share/extensions/Barcode/EAN8.py
+++ b/share/extensions/Barcode/Ean8.py
@@ -21,7 +21,7 @@ Python barcode renderer for EAN8 barcodes. Designed for use with Inkscape.
from BaseEan import EanBarcode
-class Object(EanBarcode):
+class Ean8(EanBarcode):
"""Provide an EAN8 barcode generator"""
name = 'ean8'
lengths = [ 7 ]
diff --git a/share/extensions/Barcode/Makefile.am b/share/extensions/Barcode/Makefile.am
index 691120cb6..7a1e889c0 100644
--- a/share/extensions/Barcode/Makefile.am
+++ b/share/extensions/Barcode/Makefile.am
@@ -9,13 +9,13 @@ barcode_DATA = \
Code39.py \
Code25i.py \
Code93.py \
- EAN13.py \
- EAN8.py \
- EAN5.py \
+ Ean13.py \
+ Ean8.py \
+ Ean5.py \
__init__.py \
- RM4CC.py \
- UPCA.py \
- UPCE.py
+ Rm4scc.py \
+ Upca.py \
+ Upce.py
EXTRA_DIST = \
$(barcode_DATA)
diff --git a/share/extensions/Barcode/RM4CC.py b/share/extensions/Barcode/Rm4scc.py
index d980c6c86..0fb154280 100644
--- a/share/extensions/Barcode/RM4CC.py
+++ b/share/extensions/Barcode/Rm4scc.py
@@ -65,7 +65,7 @@ map = {
check = ['ZUVWXY','501234','B6789A','HCDEFG','NIJKLM','TOPQRS']
(BAR_TRACK, BAR_DOWN, BAR_UP, BAR_FULL, BAR_NONE, WHITE_SPACE) = range(6)
-class Object(Barcode):
+class Rm4scc(Barcode):
def encode(self, text):
result = ''
diff --git a/share/extensions/Barcode/UPCA.py b/share/extensions/Barcode/Upca.py
index 6ac10943c..d69ed11e6 100644
--- a/share/extensions/Barcode/UPCA.py
+++ b/share/extensions/Barcode/Upca.py
@@ -21,7 +21,7 @@ Python barcode renderer for UPCA barcodes. Designed for use with Inkscape.
from BaseEan import EanBarcode
-class Object(EanBarcode):
+class Upca(EanBarcode):
"""Provides a renderer for EAN12 aka UPC-A Barcodes"""
name = 'upca'
lengths = [ 11 ]
diff --git a/share/extensions/Barcode/UPCE.py b/share/extensions/Barcode/Upce.py
index dba5d48ea..eee2a739c 100644
--- a/share/extensions/Barcode/UPCE.py
+++ b/share/extensions/Barcode/Upce.py
@@ -27,7 +27,7 @@ import sys
FAMS = [ '111000', '110100', '110010', '110001', '101100',
'100110', '100011', '101010', '101001', '100101' ]
-class Object(EanBarcode):
+class Upce(EanBarcode):
"""Generate EAN6/UPC-E barcode generator"""
name = 'upce'
lengths = [ 6, 11 ]
@@ -56,7 +56,7 @@ class Object(EanBarcode):
# All UPC-E Numbers use number system 0
if number[0] != '0' or len(number)!=11:
# If not then the code is invalid
- return None
+ raise ValueError("Invalid UPC Number")
# Most of the conversions deal
# with the specific code parts
@@ -83,7 +83,7 @@ class Object(EanBarcode):
return manufacturer + product[4]
else:
# Invalid UPC-A Numbe
- return None
+ raise ValueError("Invalid UPC Number")
def ConvertEtoA(self, number):
"""Convert UPC-E to UPC-A by padding with zeros"""
diff --git a/share/extensions/Barcode/__init__.py b/share/extensions/Barcode/__init__.py
index 370839f45..e4e328ae3 100644
--- a/share/extensions/Barcode/__init__.py
+++ b/share/extensions/Barcode/__init__.py
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2010 Martin Owens
+# Copyright (C) 2014 Martin Owens
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,10 +16,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
"""
-Renderer for barcodes, SVG extention for Inkscape.
+Renderer for barcodes, SVG extention for Inkscape.
For supported barcodes see Barcode module directory.
-
"""
# This lists all known Barcodes missing from this package
@@ -40,45 +39,19 @@ For supported barcodes see Barcode module directory.
import sys
-def getBarcode(format, param={}):
- if format:
- format = str(format).lower()
- format = format.replace('-', '')
- format = format.replace(' ', '')
- if format=='code25i':
- import Code25i
- return Code25i.Object(param)
- elif format=='code39':
- import Code39
- return Code39.Object(param)
- elif format=='code39ext':
- import Code39Ext
- return Code39Ext.Object(param)
- elif format=='code93':
- import Code93
- return Code93.Object(param)
- elif format=='code128':
- import Code128
- return Code128.Object(param)
-
- elif format in ['rm4cc', 'rm4scc']:
- import RM4CC
- return RM4CC.Object(param)
-
- elif format == 'upca':
- import UPCA
- return UPCA.Object(param)
- elif format == 'upce':
- import UPCE
- return UPCE.Object(param)
- elif format == 'ean5':
- import EAN5
- return EAN5.Object(param)
- elif format in ['ean8', 'ucc8']:
- import EAN8
- return EAN8.Object(param)
- elif format in ['ean13', 'ucc13','jan']:
- import EAN13
- return EAN13.Object(param)
- sys.stderr.write("Invalid format for barcode: " + str(format) + "\n")
+def getBarcode(code, **kwargs):
+ """Gets a barcode from a list of available barcode formats"""
+ if not code:
+ return sys.stderr.write("No barcode format given!\n")
+
+
+ code = str(code).replace('-', '').strip()
+ try:
+ barcode = getattr(__import__('Barcode.'+code, fromlist=['Barcode']), code)
+ return barcode(kwargs)
+ except ImportError:
+ sys.stderr.write("Invalid type of barcode: %s\n" % code)
+ except AttributeError:
+ raise
+ sys.stderr.write("Barcode module is missing the barcode class: %s\n" % code)
diff --git a/share/extensions/Makefile.am b/share/extensions/Makefile.am
index 2c1e23954..e8be5d777 100644
--- a/share/extensions/Makefile.am
+++ b/share/extensions/Makefile.am
@@ -26,7 +26,8 @@ otherstuff_DATA = \
jessyInk_video.svg \
svg2fxg.xsl \
svg2xaml.xsl \
- xaml2svg.xsl
+ xaml2svg.xsl \
+ inkscape.extension.rng
module_DATA = $(wildcard $(srcdir)/*.inx)
diff --git a/share/extensions/README b/share/extensions/README
index ba0251dc4..0d6e544e8 100644
--- a/share/extensions/README
+++ b/share/extensions/README
@@ -1,10 +1,12 @@
-This folder contains Inkscape extensions, i.e. the scripts
-that implement some commands that you can use from within
-Inkscape. Most of these commands are in the Effects menu.
+This folder contains Inkscape extensions, i.e. the scripts that
+implement some commands that you can use from within Inkscape. Most of
+these commands are in the Extensions menu.
-Each *.inx file describes an extension,
-listing its name, purpose, prerequisites, etc. These
-files are read by Inkscape on launch. Other files are
-the scripts themselves (Perl, Python, and Ruby are
-supported, as well as shell scripts).
+Each *.inx file describes an extension, listing its name, purpose,
+prerequisites, location within the menu, etc. These files are read by
+Inkscape on launch. Other files are the scripts themselves (Perl,
+Python, and Ruby are supported, as well as shell scripts).
+Only include extensions here which are GPL-compatible. This includes
+Apache-2, MPL 1.1, certain Creative Commons licenses, and more. See
+https://www.gnu.org/licenses/license-list.html for guidance.
diff --git a/share/extensions/guides_creator.inx b/share/extensions/guides_creator.inx
index ddc706097..4d032e024 100644
--- a/share/extensions/guides_creator.inx
+++ b/share/extensions/guides_creator.inx
@@ -1,97 +1,96 @@
-<inkscape-extension>
- <_name>Guides creator</_name>
- <id>org.inkscape.effect.guidescreator</id>
- <dependency type="executable" location="extensions">guides_creator.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <param name="tab" type="notebook">
- <page name="regular_guides" _gui-text="Regular guides">
- <param name="guides_preset" type="enum" appearance="minimal" _gui-text="Guides preset">
- <item value="custom">Custom...</item>
- <item value="golden">Golden ratio</item>
- <item value="3;3">Rule-of-third</item>
- </param>
- <param name="vertical_guides" type="int" min="1" max="1000" _gui-text="Columns">2</param>
- <param name="horizontal_guides" type="int" min="1" max="1000" _gui-text="Rows">3</param>
- <param name="start_from_edges" type="boolean" _gui-text="Start from edges">false</param>
- <param name="delete_existing_guides" type="boolean" _gui-text="Delete existing guides">false</param>
- </page>
- <page name="diagonal_guides" _gui-text="Diagonal guides">
- <param name="ul" type="boolean" _gui-text="Upper left corner">false</param>
- <param name="ur" type="boolean" _gui-text="Upper right corner">false</param>
- <param name="ll" type="boolean" _gui-text="Lower left corner">false</param>
- <param name="lr" type="boolean" _gui-text="Lower right corner">false</param>
- <param name="delete_existing_guides2" type="boolean" _gui-text="Delete existing guides">false</param>
- </page>
- <page name="margins" _gui-text="Margins">
- <param name="margins_preset" type="enum" appearance="minimal" _gui-text="Margins preset">
- <item value="custom">Custom...</item>
- <item value="book_left">Left book page</item>
- <item value="book_right">Right book page</item>
- </param>
- <param name="header_margin" type="enum" appearance="minimal" _gui-text="Header margin">
- <item value="10">1/10</item>
- <item value="9">1/9</item>
- <item value="8">1/8</item>
- <item value="7">1/7</item>
- <item value="6">1/6</item>
- <item value="5">1/5</item>
- <item value="4">1/4</item>
- <item value="3">1/3</item>
- <item value="2">1/2</item>
- <item value="0">None</item>
- </param>
- <param name="footer_margin" type="enum" appearance="minimal" _gui-text="Footer margin">
- <item value="10">1/10</item>
- <item value="9">1/9</item>
- <item value="8">1/8</item>
- <item value="7">1/7</item>
- <item value="6">1/6</item>
- <item value="5">1/5</item>
- <item value="4">1/4</item>
- <item value="3">1/3</item>
- <item value="2">1/2</item>
- <item value="0">None</item>
- </param>
- <param name="left_margin" type="enum" appearance="minimal" _gui-text="Left margin">
- <item value="10">1/10</item>
- <item value="9">1/9</item>
- <item value="8">1/8</item>
- <item value="7">1/7</item>
- <item value="6">1/6</item>
- <item value="5">1/5</item>
- <item value="4">1/4</item>
- <item value="3">1/3</item>
- <item value="2">1/2</item>
- <item value="0">None</item>
- </param>
- <param name="right_margin" type="enum" appearance="minimal" _gui-text="Right margin">
- <item value="10">1/10</item>
- <item value="9">1/9</item>
- <item value="8">1/8</item>
- <item value="7">1/7</item>
- <item value="6">1/6</item>
- <item value="5">1/5</item>
- <item value="4">1/4</item>
- <item value="3">1/3</item>
- <item value="2">1/2</item>
- <item value="0">None</item>
- </param>
-
- <param name="vertical_subdivisions" type="int" min="1" max="1000" _gui-text="Columns">2</param>
- <param name="horizontal_subdivisions" type="int" min="1" max="1000" _gui-text="Rows">3</param>
- <param name="start_from_edges2" type="boolean" _gui-text="Start from edges">false</param>
- <param name="delete_existing_guides3" type="boolean" _gui-text="Delete existing guides">false</param>
-
- </page>
- </param>
- <effect>
- <object-type>all</object-type>
- <effects-menu>
- <submenu _name="Render"/>
- </effects-menu>
- </effect>
- <script>
- <command reldir="extensions" interpreter="python">guides_creator.py</command>
- </script>
+<?xml version="1.0" encoding="UTF-8"?>
+<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
+ <_name>Guides creator</_name>
+ <id>org.inkscape.effect.guidescreator</id>
+ <dependency type="executable" location="extensions">guides_creator.py</dependency>
+ <dependency type="executable" location="extensions">inkex.py</dependency>
+ <param name="tab" type="notebook">
+ <page name="regular_guides" _gui-text="Regular guides">
+ <param name="guides_preset" type="enum" appearance="minimal" _gui-text="Guides preset:">
+ <_item value="custom">Custom...</_item>
+ <_item value="golden">Golden ratio</_item>
+ <_item value="3;3">Rule-of-third</_item>
+ </param>
+ <param name="vertical_guides" type="int" min="1" max="1000" _gui-text="Columns:">2</param>
+ <param name="horizontal_guides" type="int" min="1" max="1000" _gui-text="Rows:">3</param>
+ <param name="start_from_edges" type="boolean" _gui-text="Start from edges">false</param>
+ <param name="delete_existing_guides" type="boolean" _gui-text="Delete existing guides">false</param>
+ </page>
+ <page name="diagonal_guides" _gui-text="Diagonal guides">
+ <param name="ul" type="boolean" _gui-text="Upper left corner">false</param>
+ <param name="ur" type="boolean" _gui-text="Upper right corner">false</param>
+ <param name="ll" type="boolean" _gui-text="Lower left corner">false</param>
+ <param name="lr" type="boolean" _gui-text="Lower right corner">false</param>
+ <param name="delete_existing_guides2" type="boolean" _gui-text="Delete existing guides">false</param>
+ </page>
+ <page name="margins" _gui-text="Margins">
+ <param name="margins_preset" type="enum" appearance="minimal" _gui-text="Margins preset:">
+ <_item value="custom">Custom...</_item>
+ <_item value="book_left">Left book page</_item>
+ <_item value="book_right">Right book page</_item>
+ </param>
+ <param name="header_margin" type="enum" appearance="minimal" _gui-text="Header margin:">
+ <item value="10">1/10</item>
+ <item value="9">1/9</item>
+ <item value="8">1/8</item>
+ <item value="7">1/7</item>
+ <item value="6">1/6</item>
+ <item value="5">1/5</item>
+ <item value="4">1/4</item>
+ <item value="3">1/3</item>
+ <item value="2">1/2</item>
+ <_item value="0">None</_item>
+ </param>
+ <param name="footer_margin" type="enum" appearance="minimal" _gui-text="Footer margin:">
+ <item value="10">1/10</item>
+ <item value="9">1/9</item>
+ <item value="8">1/8</item>
+ <item value="7">1/7</item>
+ <item value="6">1/6</item>
+ <item value="5">1/5</item>
+ <item value="4">1/4</item>
+ <item value="3">1/3</item>
+ <item value="2">1/2</item>
+ <_item value="0">None</_item>
+ </param>
+ <param name="left_margin" type="enum" appearance="minimal" _gui-text="Left margin:">
+ <item value="10">1/10</item>
+ <item value="9">1/9</item>
+ <item value="8">1/8</item>
+ <item value="7">1/7</item>
+ <item value="6">1/6</item>
+ <item value="5">1/5</item>
+ <item value="4">1/4</item>
+ <item value="3">1/3</item>
+ <item value="2">1/2</item>
+ <_item value="0">None</_item>
+ </param>
+ <param name="right_margin" type="enum" appearance="minimal" _gui-text="Right margin:">
+ <item value="10">1/10</item>
+ <item value="9">1/9</item>
+ <item value="8">1/8</item>
+ <item value="7">1/7</item>
+ <item value="6">1/6</item>
+ <item value="5">1/5</item>
+ <item value="4">1/4</item>
+ <item value="3">1/3</item>
+ <item value="2">1/2</item>
+ <_item value="0">None</_item>
+ </param>
+ <param name="vertical_subdivisions" type="int" min="1" max="1000" _gui-text="Columns:">2</param>
+ <param name="horizontal_subdivisions" type="int" min="1" max="1000" _gui-text="Rows:">3</param>
+ <param name="start_from_edges2" type="boolean" _gui-text="Start from edges">false</param>
+ <param name="delete_existing_guides3" type="boolean" _gui-text="Delete existing guides">false</param>
+ </page>
+ </param>
+ <effect>
+ <object-type>all</object-type>
+ <effects-menu>
+ <submenu _name="Render"/>
+ </effects-menu>
+ </effect>
+ <script>
+ <command reldir="extensions" interpreter="python">guides_creator.py</command>
+ </script>
</inkscape-extension>
diff --git a/share/extensions/guides_creator.py b/share/extensions/guides_creator.py
index 21df1cd50..77ece2e36 100755
--- a/share/extensions/guides_creator.py
+++ b/share/extensions/guides_creator.py
@@ -297,8 +297,8 @@ class Guides_Creator(inkex.Effect):
svg = self.document.getroot()
# getting the width and height attributes of the canvas
- width = float(svg.get('width'))
- height = float(svg.get('height'))
+ width = self.unittouu(svg.get('width'))/self.unittouu('1px')
+ height = self.unittouu(svg.get('height'))/self.unittouu('1px')
# getting edges coordinates
h_orientation = '0,' + str(round(width,4))
diff --git a/share/extensions/hershey.inx b/share/extensions/hershey.inx
index ed20c6bd3..4d923f046 100644
--- a/share/extensions/hershey.inx
+++ b/share/extensions/hershey.inx
@@ -10,42 +10,40 @@
<page name="splash" _gui-text="Render Text">
<param name="text" type="string" _gui-text="Text:">Hershey Text for Inkscape</param>
- <param name="action" type="optiongroup" appearance="minimal"
- _gui-text=" Action: ">
- <_option value="render">Typeset that text</_option>
- <_option value="table" >Write glyph table</_option>
+ <param name="action" type="enum" _gui-text="Action: ">
+ <_item value="render">Typeset that text</_item>
+ <_item value="table" >Write glyph table</_item>
</param>
- <param name="fontface" type="optiongroup" appearance="minimal"
- _gui-text=" Font face: ">
- <_option value="futural">Sans 1-stroke</_option>
- <_option value="futuram">Sans bold</_option>
-
- <_option value="timesr">Serif medium</_option>
- <_option value="timesi">Serif medium italic</_option>
- <_option value="timesib">Serif bold italic</_option>
- <_option value="timesrb">Serif bold</_option>
-
- <_option value="scripts">Script 1-stroke</_option>
- <_option value="cursive">Script 1-stroke (alt)</_option>
- <_option value="scriptc">Script medium</_option>
-
- <_option value="gothiceng">Gothic English</_option>
- <_option value="gothicger">Gothic German</_option>
- <_option value="gothicita">Gothic Italian</_option>
-
- <_option value="greek">Greek 1-stroke</_option>
- <_option value="timesg">Greek medium</_option>
- <_option value="cyrillic">Cyrillic</_option>
- <_option value="japanese">Japanese</_option>
-
- <_option value="astrology">Astrology</_option>
- <_option value="mathlow">Math (lower)</_option>
- <_option value="mathupp">Math (upper)</_option>
- <_option value="markers">Markers</_option>
- <_option value="meteorology">Meteorology</_option>
- <_option value="music">Music</_option>
- <_option value="symbolic">Symbolic</_option>
+ <param name="fontface" type="enum" _gui-text="Font face: ">
+ <_item value="futural">Sans 1-stroke</_item>
+ <_item value="futuram">Sans bold</_item>
+
+ <_item value="timesr">Serif medium</_item>
+ <_item value="timesi">Serif medium italic</_item>
+ <_item value="timesib">Serif bold italic</_item>
+ <_item value="timesrb">Serif bold</_item>
+
+ <_item value="scripts">Script 1-stroke</_item>
+ <_item value="cursive">Script 1-stroke (alt)</_item>
+ <_item value="scriptc">Script medium</_item>
+
+ <_item value="gothiceng">Gothic English</_item>
+ <_item value="gothicger">Gothic German</_item>
+ <_item value="gothicita">Gothic Italian</_item>
+
+ <_item value="greek">Greek 1-stroke</_item>
+ <_item value="timesg">Greek medium</_item>
+ <_item value="cyrillic">Cyrillic</_item>
+ <_item value="japanese">Japanese</_item>
+
+ <_item value="astrology">Astrology</_item>
+ <_item value="mathlow">Math (lower)</_item>
+ <_item value="mathupp">Math (upper)</_item>
+ <_item value="markers">Markers</_item>
+ <_item value="meteorology">Meteorology</_item>
+ <_item value="music">Music</_item>
+ <_item value="symbolic">Symbolic</_item>
</param>
<_param name="emptyspace" type="description" xml:space="preserve">
diff --git a/share/extensions/hpgl_input.inx b/share/extensions/hpgl_input.inx
index f40fd4ec0..4cbbba812 100644
--- a/share/extensions/hpgl_input.inx
+++ b/share/extensions/hpgl_input.inx
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>HPGL Input</_name>
- <id>org.inkscape.input.hpgl</id>
- <dependency type="executable" location="extensions">hpgl_input.py</dependency>
- <dependency type="executable" location="extensions">hpgl_decoder.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <_param name="introduction" type="description">Please note that you can only open HPGL files written by Inkscape, to open other HPGL files please change their file extension to .plt, make sure you have UniConverter installed and open them again.</_param>
- <param name="space" type="description">&#xa0;</param>
- <param name="resolutionX" type="float" min="1.0" max="4096.0" precision="1" _gui-text="Resolution X (dpi)" _gui-description="The amount of steps the plotter moves if it moves for 1 inch on the X axis. (Default: 1016.0)">1016.0</param>
- <param name="resolutionY" type="float" min="1.0" max="4096.0" precision="1" _gui-text="Resolution Y (dpi)" _gui-description="The amount of steps the plotter moves if it moves for 1 inch on the Y axis. (Default: 1016.0)">1016.0</param>
- <param name="showMovements" type="boolean" _gui-text="Show movements between paths" _gui-description="Check this to show movements between paths. (Default: Unchecked)">false</param>
- <input>
- <extension>.hpgl</extension>
- <mimetype>image/hpgl</mimetype>
- <_filetypename>HP Graphics Language file (*.hpgl)</_filetypename>
- <_filetypetooltip>Import an HP Graphics Language file</_filetypetooltip>
- </input>
- <script>
- <command reldir="extensions" interpreter="python">hpgl_input.py</command>
- </script>
+ <_name>HPGL Input</_name>
+ <id>org.inkscape.input.hpgl</id>
+ <dependency type="executable" location="extensions">hpgl_input.py</dependency>
+ <dependency type="executable" location="extensions">hpgl_decoder.py</dependency>
+ <dependency type="executable" location="extensions">inkex.py</dependency>
+ <_param name="introduction" type="description">Please note that you can only open HPGL files written by Inkscape, to open other HPGL files please change their file extension to .plt, make sure you have UniConverter installed and open them again.</_param>
+ <param name="space" type="description">&#xa0;</param>
+ <param name="resolutionX" type="float" min="1.0" max="4096.0" precision="1" _gui-text="Resolution X (dpi):" _gui-description="The amount of steps the plotter moves if it moves for 1 inch on the X axis (Default: 1016.0)">1016.0</param>
+ <param name="resolutionY" type="float" min="1.0" max="4096.0" precision="1" _gui-text="Resolution Y (dpi):" _gui-description="The amount of steps the plotter moves if it moves for 1 inch on the Y axis (Default: 1016.0)">1016.0</param>
+ <param name="showMovements" type="boolean" _gui-text="Show movements between paths" _gui-description="Check this to show movements between paths (Default: Unchecked)">false</param>
+ <input>
+ <extension>.hpgl</extension>
+ <mimetype>image/hpgl</mimetype>
+ <_filetypename>HP Graphics Language file (*.hpgl)</_filetypename>
+ <_filetypetooltip>Import an HP Graphics Language file</_filetypetooltip>
+ </input>
+ <script>
+ <command reldir="extensions" interpreter="python">hpgl_input.py</command>
+ </script>
</inkscape-extension>
diff --git a/share/extensions/hpgl_output.inx b/share/extensions/hpgl_output.inx
index d16cc55e5..bfb3e3567 100644
--- a/share/extensions/hpgl_output.inx
+++ b/share/extensions/hpgl_output.inx
@@ -1,46 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>HPGL Output</_name>
- <id>org.ekips.output.hpgl</id>
- <dependency type="extension">org.inkscape.output.svg.inkscape</dependency>
- <dependency type="executable" location="extensions">hpgl_output.py</dependency>
- <dependency type="executable" location="extensions">hpgl_encoder.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <_param name="introduction" type="description">Please make sure that all objects you want to save are converted to paths. Please use the plotter extension (Extensions menu) to plot directly over a serial connection.</_param>
- <param name="tab" type="notebook">
- <page name="plotter" _gui-text="Plotter Settings ">
- <param name="resolutionX" type="float" min="1.0" max="4096.0" precision="1" _gui-text="Resolution X (dpi)" _gui-description="The amount of steps the plotter moves if it moves for 1 inch on the X axis. (Default: 1016.0)">1016.0</param>
- <param name="resolutionY" type="float" min="1.0" max="4096.0" precision="1" _gui-text="Resolution Y (dpi)" _gui-description="The amount of steps the plotter moves if it moves for 1 inch on the Y axis. (Default: 1016.0)">1016.0</param>
- <param name="pen" type="int" min="0" max="99" _gui-text="Pen number" _gui-description="The number of the pen (tool) to use. (Standard: '1')">1</param>
- <param name="force" type="int" min="0" max="1000" _gui-text="Pen force (g)" _gui-description="The amount of force pushing down the pen in grams, set to 0 to omit command. Most plotters ignore this command. (Default: 0)">0</param>
- <param name="speed" type="int" min="0" max="10000" _gui-text="Pen speed (cm/s or mm/s)" _gui-description="The speed the pen will move with in centimeters or millimeters per second (depending on your plotter model), set to 0 to omit command. Most plotters ignore this command. (Default: 0)">0</param>
- <param name="orientation" type="optiongroup" appearance="minimal" _gui-text="Rotation (Clockwise)" _gui-description="Rotation of the drawing. (Default: 0°)">
- <option value="0">0°</option>
- <option value="90">90°</option>
- <option value="180">180°</option>
- <option value="270">270°</option>
- </param>
- <param name="mirrorX" type="boolean" _gui-text="Mirror X axis" _gui-description="Check this to mirror the X axis. (Default: Unchecked)">false</param>
- <param name="mirrorY" type="boolean" _gui-text="Mirror Y axis" _gui-description="Check this to mirror the Y axis. (Default: Unchecked)">false</param>
- <param name="center" type="boolean" _gui-text="Center zero point" _gui-description="Check this if your plotter uses a centered zero point. (Default: Unchecked)">false</param>
- </page>
- <page name="overcutToolOffset" _gui-text="Plot Features ">
- <param name="overcut" type="float" min="0.0" max="100.0" precision="2" _gui-text="Overcut (mm)" _gui-description="The distance in mm that will be cut over the starting point of the path to prevent open paths, set to 0.0 to omit command. (Default: 1.00)">1.00</param>
- <param name="toolOffset" type="float" min="0.0" max="20.0" precision="2" _gui-text="Tool offset (mm)" _gui-description="The offset from the tool tip to the tool axis in mm, set to 0.0 to omit command. (Default: 0.25)">0.25</param>
- <param name="precut" type="boolean" _gui-text="Use precut" _gui-description="Check this to cut a small line before the real drawing starts to correctly align the tool orientation. (Default: Checked)">true</param>
- <param name="flat" type="float" min="0.1" max="10.0" precision="1" _gui-text="Curve flatness" _gui-description="Curves are divided into lines, this number controls how fine the curves will be reproduced, the smaller the finer. (Default: '1.2')">1.2</param>
- <param name="autoAlign" type="boolean" _gui-text="Auto align" _gui-description="Check this to auto align the drawing to the zero point (Plus the tool offset if used). If unchecked you have to make sure that all parts of your drawing are within the document border! (Default: Checked)">true</param>
- </page>
- </param>
- <_param name="settingsHelp" type="description">All these settings depend on the plotter you use, for more information please consult the manual or homepage for your plotter.</_param>
- <output>
- <extension>.hpgl</extension>
- <mimetype>image/hpgl</mimetype>
- <_filetypename>HP Graphics Language file (*.hpgl)</_filetypename>
- <_filetypetooltip>Export an HP Graphics Language file</_filetypetooltip>
- <dataloss>true</dataloss>
- </output>
- <script>
- <command reldir="extensions" interpreter="python">hpgl_output.py</command>
- </script>
+ <_name>HPGL Output</_name>
+ <id>org.ekips.output.hpgl</id>
+ <dependency type="extension">org.inkscape.output.svg.inkscape</dependency>
+ <dependency type="executable" location="extensions">hpgl_output.py</dependency>
+ <dependency type="executable" location="extensions">hpgl_encoder.py</dependency>
+ <dependency type="executable" location="extensions">inkex.py</dependency>
+ <_param name="introduction" type="description">Please make sure that all objects you want to save are converted to paths. Please use the plotter extension (Extensions menu) to plot directly over a serial connection.</_param>
+ <param name="tab" type="notebook">
+ <page name="plotter" _gui-text="Plotter Settings ">
+ <param name="resolutionX" type="float" min="1.0" max="4096.0" precision="1" _gui-text="Resolution X (dpi):" _gui-description="The amount of steps the plotter moves if it moves for 1 inch on the X axis (Default: 1016.0)">1016.0</param>
+ <param name="resolutionY" type="float" min="1.0" max="4096.0" precision="1" _gui-text="Resolution Y (dpi):" _gui-description="The amount of steps the plotter moves if it moves for 1 inch on the Y axis (Default: 1016.0)">1016.0</param>
+ <param name="pen" type="int" min="0" max="99" _gui-text="Pen number:" _gui-description="The number of the pen (tool) to use (Standard: '1')">1</param>
+ <param name="force" type="int" min="0" max="1000" _gui-text="Pen force (g):" _gui-description="The amount of force pushing down the pen in grams, set to 0 to omit command; most plotters ignore this command (Default: 0)">0</param>
+ <param name="speed" type="int" min="0" max="10000" _gui-text="Pen speed (cm/s or mm/s):" _gui-description="The speed the pen will move with in centimeters or millimeters per second (depending on your plotter model), set to 0 to omit command; most plotters ignore this command (Default: 0)">0</param>
+ <param name="orientation" type="enum" _gui-text="Rotation (°, Clockwise):" _gui-description="Rotation of the drawing (Default: 0°)">
+ <item value="0">0</item>
+ <item value="90">90</item>
+ <item value="180">180</item>
+ <item value="270">270</item>
+ </param>
+ <param name="mirrorX" type="boolean" _gui-text="Mirror X axis" _gui-description="Check this to mirror the X axis (Default: Unchecked)">false</param>
+ <param name="mirrorY" type="boolean" _gui-text="Mirror Y axis" _gui-description="Check this to mirror the Y axis (Default: Unchecked)">false</param>
+ <param name="center" type="boolean" _gui-text="Center zero point" _gui-description="Check this if your plotter uses a centered zero point (Default: Unchecked)">false</param>
+ </page>
+ <page name="overcutToolOffset" _gui-text="Plot Features ">
+ <param name="overcut" type="float" min="0.0" max="100.0" precision="2" _gui-text="Overcut (mm):" _gui-description="The distance in mm that will be cut over the starting point of the path to prevent open paths, set to 0.0 to omit command (Default: 1.00)">1.00</param>
+ <param name="toolOffset" type="float" min="0.0" max="20.0" precision="2" _gui-text="Tool offset (mm):" _gui-description="The offset from the tool tip to the tool axis in mm, set to 0.0 to omit command (Default: 0.25)">0.25</param>
+ <param name="precut" type="boolean" _gui-text="Use precut" _gui-description="Check this to cut a small line before the real drawing starts to correctly align the tool orientation. (Default: Checked)">true</param>
+ <param name="flat" type="float" min="0.1" max="10.0" precision="1" _gui-text="Curve flatness:" _gui-description="Curves are divided into lines, this number controls how fine the curves will be reproduced, the smaller the finer (Default: '1.2')">1.2</param>
+ <param name="autoAlign" type="boolean" _gui-text="Auto align" _gui-description="Check this to auto align the drawing to the zero point (Plus the tool offset if used). If unchecked you have to make sure that all parts of your drawing are within the document border! (Default: Checked)">true</param>
+ </page>
+ </param>
+ <_param name="settingsHelp" type="description">All these settings depend on the plotter you use, for more information please consult the manual or homepage for your plotter.</_param>
+ <output>
+ <extension>.hpgl</extension>
+ <mimetype>image/hpgl</mimetype>
+ <_filetypename>HP Graphics Language file (*.hpgl)</_filetypename>
+ <_filetypetooltip>Export an HP Graphics Language file</_filetypetooltip>
+ <dataloss>true</dataloss>
+ </output>
+ <script>
+ <command reldir="extensions" interpreter="python">hpgl_output.py</command>
+ </script>
</inkscape-extension>
diff --git a/share/extensions/inkscape_help_relnotes.inx b/share/extensions/inkscape_help_relnotes.inx
index 9f59513ba..d032eb7e0 100644
--- a/share/extensions/inkscape_help_relnotes.inx
+++ b/share/extensions/inkscape_help_relnotes.inx
@@ -4,7 +4,7 @@
<id>org.inkscape.help.relnotes</id>
<dependency type="executable" location="extensions">launch_webbrowser.py</dependency>
<!-- i18n. Please don't translate it unless a page exists in your language -->
- <_param name="url" gui-hidden="true" type="string">http://wiki.inkscape.org/wiki/index.php/Release_notes/0.49</_param>
+ <_param name="url" gui-hidden="true" type="string">http://wiki.inkscape.org/wiki/index.php/Release_notes/0.91</_param>
<effect needs-document="false">
<object-type>all</object-type>
<effects-menu hidden="true" />
diff --git a/share/extensions/inkscape_help_reportabug.inx b/share/extensions/inkscape_help_reportabug.inx
index 8c3929f3e..81239a8ed 100644
--- a/share/extensions/inkscape_help_reportabug.inx
+++ b/share/extensions/inkscape_help_reportabug.inx
@@ -3,7 +3,7 @@
<_name>Report a Bug</_name>
<id>org.inkscape.help.reportabug</id>
<dependency type="executable" location="extensions">launch_webbrowser.py</dependency>
- <param name="url" gui-hidden="true" type="string">http://inkscape.org/report_bugs.php</param>
+ <param name="url" gui-hidden="true" type="string">http://inkscape.org/contribute/report-bugs/</param>
<effect needs-document="false">
<object-type>all</object-type>
<effects-menu hidden="true"/>
diff --git a/share/extensions/plotter.inx b/share/extensions/plotter.inx
index fc620f8a3..4ed5ce9de 100644
--- a/share/extensions/plotter.inx
+++ b/share/extensions/plotter.inx
@@ -1,82 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
- <_name>Plot</_name>
- <id>org.ekips.filter.plot</id>
- <dependency type="executable" location="extensions">plotter.py</dependency>
- <dependency type="executable" location="extensions">hpgl_decoder.py</dependency>
- <dependency type="executable" location="extensions">hpgl_encoder.py</dependency>
- <dependency type="executable" location="extensions">inkex.py</dependency>
- <_param name="introduction" type="description">Please make sure that all objects you want to plot are converted to paths.</_param>
- <param name="tab" type="notebook">
- <page name="misc" _gui-text="Connection Settings ">
- <param name="serialPort" type="string" _gui-text="Serial port" _gui-description="The port of your serial connection, on Windows something like 'COM1', on Linux something like: '/dev/ttyUSB0'. (Default: COM1)">COM1</param>
- <param name="serialBaudRate" type="optiongroup" appearance="minimal" _gui-text="Serial baud rate" _gui-description="The Baud rate of your serial connection. (Default: 9600)">
- <option value="9600">9600</option>
- <option value="110">110</option>
- <option value="300">300</option>
- <option value="600">600</option>
- <option value="1200">1200</option>
- <option value="2400">2400</option>
- <option value="4800">4800</option>
- <option value="9600">9600</option>
- <option value="14400">14400</option>
- <option value="19200">19200</option>
- <option value="28800">28800</option>
- <option value="38400">38400</option>
- <option value="56000">56000</option>
- <option value="57600">57600</option>
- <option value="115200">115200</option>
- </param>
- <param name="flowControl" type="optiongroup" appearance="minimal" _gui-text="Flow control" _gui-description="The Software / Hardware flow control of your serial connection. (Default: Software)">
- <_option value="xonxoff">Software (XON/XOFF)</_option>
- <_option value="rtscts">Hardware (RTS/CTS)</_option>
- <_option value="dsrdtrrtscts">Hardware (DSR/DTR + RTS/CTS)</_option>
- <_option value="">None</_option>
- </param>
- <param name="commandLanguage" type="optiongroup" appearance="minimal" _gui-text="Command language" _gui-description="The command language to use. (Default: HPGL)">
- <option value="HPGL">HPGL</option>
- <option value="DMPL">DMPL</option>
- <option value="ZING">KNK Zing (HPGL variant)</option>
- </param>
- <param name="space" type="description">&#xa0;</param>
- <_param name="freezeHelp" type="description">Using wrong settings can under certain circumstances cause Inkscape to freeze. Always save your work before plotting!</_param>
- <_param name="serialHelp" type="description">This can be a physical serial connection or a USB-to-Serial bridge. Ask your plotter manufacturer for drivers if needed.</_param>
- <_param name="parallelHelp" type="description">Parallel (LPT) connections are not supported.</_param>
- </page>
- <page name="plotter" _gui-text="Plotter Settings ">
- <param name="resolutionX" type="float" min="1.0" max="4096.0" precision="1" _gui-text="Resolution X (dpi)" _gui-description="The amount of steps the plotter moves if it moves for 1 inch on the X axis. (Default: 1016.0)">1016.0</param>
- <param name="resolutionY" type="float" min="1.0" max="4096.0" precision="1" _gui-text="Resolution Y (dpi)" _gui-description="The amount of steps the plotter moves if it moves for 1 inch on the Y axis. (Default: 1016.0)">1016.0</param>
- <param name="pen" type="int" min="0" max="99" _gui-text="Pen number" _gui-description="The number of the pen (tool) to use. (Standard: '1')">1</param>
- <param name="force" type="int" min="0" max="1000" _gui-text="Pen force (g)" _gui-description="The amount of force pushing down the pen in grams, set to 0 to omit command. Most plotters ignore this command. (Default: 0)">0</param>
- <param name="speed" type="int" min="0" max="10000" _gui-text="Pen speed (cm/s or mm/s)" _gui-description="The speed the pen will move with in centimeters or millimeters per second (depending on your plotter model), set to 0 to omit command. Most plotters ignore this command. (Default: 0)">0</param>
- <param name="orientation" type="optiongroup" appearance="minimal" _gui-text="Rotation (Clockwise)" _gui-description="Rotation of the drawing. (Default: 0°)">
- <option value="0">0°</option>
- <option value="90">90°</option>
- <option value="180">180°</option>
- <option value="270">270°</option>
- </param>
- <param name="mirrorX" type="boolean" _gui-text="Mirror X axis" _gui-description="Check this to mirror the X axis. (Default: Unchecked)">false</param>
- <param name="mirrorY" type="boolean" _gui-text="Mirror Y axis" _gui-description="Check this to mirror the Y axis. (Default: Unchecked)">false</param>
- <param name="center" type="boolean" _gui-text="Center zero point" _gui-description="Check this if your plotter uses a centered zero point. (Default: Unchecked)">false</param>
- </page>
- <page name="misc" _gui-text="Plot Features ">
- <param name="overcut" type="float" min="0.0" max="100.0" precision="2" _gui-text="Overcut (mm)" _gui-description="The distance in mm that will be cut over the starting point of the path to prevent open paths, set to 0.0 to omit command. (Default: 1.00)">1.00</param>
- <param name="toolOffset" type="float" min="0.0" max="20.0" precision="2" _gui-text="Tool offset (mm)" _gui-description="The offset from the tool tip to the tool axis in mm, set to 0.0 to omit command. (Default: 0.25)">0.25</param>
- <param name="precut" type="boolean" _gui-text="Use precut" _gui-description="Check this to cut a small line before the real drawing starts to correctly align the tool orientation. (Default: Checked)">true</param>
- <param name="flat" type="float" min="0.1" max="10.0" precision="1" _gui-text="Curve flatness" _gui-description="Curves are divided into lines, this number controls how fine the curves will be reproduced, the smaller the finer. (Default: '1.2')">1.2</param>
- <param name="autoAlign" type="boolean" _gui-text="Auto align" _gui-description="Check this to auto align the drawing to the zero point (Plus the tool offset if used). If unchecked you have to make sure that all parts of your drawing are within the document border! (Default: Checked)">true</param>
- <param name="space" type="description">&#xa0;</param>
- <param name="debug" type="boolean" _gui-text="Show debug information" _gui-description="Check this to get verbose information about the plot without actually sending something to the plotter (A.k.a. data dump). (Default: Unchecked)">false</param>
- </page>
- </param>
- <_param name="settingsHelp" type="description">All these settings depend on the plotter you use, for more information please consult the manual or homepage for your plotter.</_param>
- <effect needs-live-preview="false" needs-document="true">
- <object-type>path</object-type>
- <effects-menu>
- <submenu _name="Export"/>
- </effects-menu>
- </effect>
- <script>
- <command reldir="extensions" interpreter="python">plotter.py</command>
- </script>
+ <_name>Plot</_name>
+ <id>org.ekips.filter.plot</id>
+ <dependency type="executable" location="extensions">plotter.py</dependency>
+ <dependency type="executable" location="extensions">hpgl_decoder.py</dependency>
+ <dependency type="executable" location="extensions">hpgl_encoder.py</dependency>
+ <dependency type="executable" location="extensions">inkex.py</dependency>
+ <_param name="introduction" type="description">Please make sure that all objects you want to plot are converted to paths.</_param>
+ <param name="tab" type="notebook">
+ <page name="misc" _gui-text="Connection Settings ">
+ <param name="serialPort" type="string" _gui-text="Serial port:" _gui-description="The port of your serial connection, on Windows something like 'COM1', on Linux something like: '/dev/ttyUSB0' (Default: COM1)">COM1</param>
+ <param name="serialBaudRate" type="enum" _gui-text="Serial baud rate:" _gui-description="The Baud rate of your serial connection (Default: 9600)">
+ <item value="9600">9600</item>
+ <item value="110">110</item>
+ <item value="300">300</item>
+ <item value="600">600</item>
+ <item value="1200">1200</item>
+ <item value="2400">2400</item>
+ <item value="4800">4800</item>
+ <item value="9600">9600</item>
+ <item value="14400">14400</item>
+ <item value="19200">19200</item>
+ <item value="28800">28800</item>
+ <item value="38400">38400</item>
+ <item value="56000">56000</item>
+ <item value="57600">57600</item>
+ <item value="115200">115200</item>
+ </param>
+ <param name="flowControl" type="enum" _gui-text="Flow control:" _gui-description="The Software / Hardware flow control of your serial connection (Default: Software)">
+ <_item value="xonxoff">Software (XON/XOFF)</_item>
+ <_item value="rtscts">Hardware (RTS/CTS)</_item>
+ <_item value="dsrdtrrtscts">Hardware (DSR/DTR + RTS/CTS)</_item>
+ <_item value="">None</_item>
+ </param>
+ <param name="commandLanguage" type="enum" _gui-text="Command language:" _gui-description="The command language to use (Default: HPGL)">
+ <_item value="HPGL">HPGL</_item>
+ <_item value="DMPL">DMPL</_item>
+ <_item value="ZING">KNK Zing (HPGL variant)</_item>
+ </param>
+ <param name="space" type="description">&#xa0;</param>
+ <_param name="freezeHelp" type="description">Using wrong settings can under certain circumstances cause Inkscape to freeze. Always save your work before plotting!</_param>
+ <_param name="serialHelp" type="description">This can be a physical serial connection or a USB-to-Serial bridge. Ask your plotter manufacturer for drivers if needed.</_param>
+ <_param name="parallelHelp" type="description">Parallel (LPT) connections are not supported.</_param>
+ </page>
+ <page name="plotter" _gui-text="Plotter Settings ">
+ <param name="resolutionX" type="float" min="1.0" max="4096.0" precision="1" _gui-text="Resolution X (dpi):" _gui-description="The amount of steps the plotter moves if it moves for 1 inch on the X axis (Default: 1016.0)">1016.0</param>
+ <param name="resolutionY" type="float" min="1.0" max="4096.0" precision="1" _gui-text="Resolution Y (dpi):" _gui-description="The amount of steps the plotter moves if it moves for 1 inch on the Y axis (Default: 1016.0)">1016.0</param>
+ <param name="pen" type="int" min="0" max="99" _gui-text="Pen number:" _gui-description="The number of the pen (tool) to use (Standard: '1')">1</param>
+ <param name="force" type="int" min="0" max="1000" _gui-text="Pen force (g):" _gui-description="The amount of force pushing down the pen in grams, set to 0 to omit command; most plotters ignore this command (Default: 0)">0</param>
+ <param name="speed" type="int" min="0" max="10000" _gui-text="Pen speed (cm/s or mm/s):" _gui-description="The speed the pen will move with in centimeters or millimeters per second (depending on your plotter model), set to 0 to omit command. Most plotters ignore this command. (Default: 0)">0</param>
+ <param name="orientation" type="enum" _gui-text="Rotation (°, clockwise):" _gui-description="Rotation of the drawing (Default: 0°)">
+ <item value="0">0</item>
+ <item value="90">90</item>
+ <item value="180">180</item>
+ <item value="270">270</item>
+ </param>
+ <param name="mirrorX" type="boolean" _gui-text="Mirror X axis" _gui-description="Check this to mirror the X axis (Default: Unchecked)">false</param>
+ <param name="mirrorY" type="boolean" _gui-text="Mirror Y axis" _gui-description="Check this to mirror the Y axis (Default: Unchecked)">false</param>
+ <param name="center" type="boolean" _gui-text="Center zero point" _gui-description="Check this if your plotter uses a centered zero point (Default: Unchecked)">false</param>
+ </page>
+ <page name="misc" _gui-text="Plot Features ">
+ <param name="overcut" type="float" min="0.0" max="100.0" precision="2" _gui-text="Overcut (mm):" _gui-description="The distance in mm that will be cut over the starting point of the path to prevent open paths, set to 0.0 to omit command (Default: 1.00)">1.00</param>
+ <param name="toolOffset" type="float" min="0.0" max="20.0" precision="2" _gui-text="Tool offset (mm):" _gui-description="The offset from the tool tip to the tool axis in mm, set to 0.0 to omit command (Default: 0.25)">0.25</param>
+ <param name="precut" type="boolean" _gui-text="Use precut" _gui-description="Check this to cut a small line before the real drawing starts to correctly align the tool orientation. (Default: Checked)">true</param>
+ <param name="flat" type="float" min="0.1" max="10.0" precision="1" _gui-text="Curve flatness:" _gui-description="Curves are divided into lines, this number controls how fine the curves will be reproduced, the smaller the finer (Default: '1.2')">1.2</param>
+ <param name="autoAlign" type="boolean" _gui-text="Auto align" _gui-description="Check this to auto align the drawing to the zero point (Plus the tool offset if used). If unchecked you have to make sure that all parts of your drawing are within the document border! (Default: Checked)">true</param>
+ <param name="space" type="description">&#xa0;</param>
+ <param name="debug" type="boolean" _gui-text="Show debug information" _gui-description="Check this to get verbose information about the plot without actually sending something to the plotter (A.k.a. data dump) (Default: Unchecked)">false</param>
+ </page>
+ </param>
+ <_param name="settingsHelp" type="description">All these settings depend on the plotter you use, for more information please consult the manual or homepage for your plotter.</_param>
+ <effect needs-live-preview="false" needs-document="true">
+ <object-type>path</object-type>
+ <effects-menu>
+ <submenu _name="Export"/>
+ </effects-menu>
+ </effect>
+ <script>
+ <command reldir="extensions" interpreter="python">plotter.py</command>
+ </script>
</inkscape-extension>
diff --git a/share/extensions/render_barcode.inx b/share/extensions/render_barcode.inx
index 64d828a19..debefadad 100644
--- a/share/extensions/render_barcode.inx
+++ b/share/extensions/render_barcode.inx
@@ -5,17 +5,17 @@
<dependency type="executable" location="extensions">inkex.py</dependency>
<dependency type="executable" location="extensions">render_barcode.py</dependency>
<param name="type" type="enum" _gui-text="Barcode Type:">
- <item value="ean5">EAN5</item>
- <item value="ean8">EAN8</item>
- <item value="ean13">EAN13</item>
- <item value="upca">UPC-A</item>
- <item value="upce">UPC-E</item>
- <item value="code25i">Code25 Interleaved 2 of 5</item>
- <item value="code39">Code39</item>
- <item value="code39ext">Code39 Extended</item>
- <item value="code93">Code93</item>
- <item value="code128">Code128</item>
- <item value="rm4scc">RM4CC / RM4SCC</item>
+ <item value="Ean5">EAN5</item>
+ <item value="Ean8">EAN8</item>
+ <item value="Ean13">EAN13</item>
+ <item value="Upca">UPC-A</item>
+ <item value="Upce">UPC-E</item>
+ <item value="Code25i">Code25 Interleaved 2 of 5</item>
+ <item value="Code39">Code39</item>
+ <item value="Code39Ext">Code39 Extended</item>
+ <item value="Code93">Code93</item>
+ <item value="Code128">Code128</item>
+ <item value="Rm4scc">RM4CC / RM4SCC</item>
</param>
<param name="text" type="string" _gui-text="Barcode Data:"></param>
<param name="height" type="int" _gui-text="Bar Height:" min="20" max="80">30</param>
diff --git a/share/extensions/render_barcode.py b/share/extensions/render_barcode.py
index c3b809c9e..694dcc8f3 100755
--- a/share/extensions/render_barcode.py
+++ b/share/extensions/render_barcode.py
@@ -26,41 +26,52 @@ import sys
from Barcode import getBarcode
class InsertBarcode(inkex.Effect):
- def __init__(self):
- inkex.Effect.__init__(self)
- self.OptionParser.add_option("-l", "--height",
- action="store", type="int",
- dest="height", default=30,
- help="Barcode Height")
- self.OptionParser.add_option("-t", "--type",
- action="store", type="string",
- dest="type", default='',
- help="Barcode Type")
- self.OptionParser.add_option("-d", "--text",
- action="store", type="string",
- dest="text", default='',
- help="Text to print on barcode")
+ def __init__(self):
+ inkex.Effect.__init__(self)
+ self.OptionParser.add_option("-l", "--height",
+ action="store", type="int",
+ dest="height", default=30,
+ help="Barcode Height")
+ self.OptionParser.add_option("-t", "--type",
+ action="store", type="string",
+ dest="type", default='',
+ help="Barcode Type")
+ self.OptionParser.add_option("-d", "--text",
+ action="store", type="string",
+ dest="text", default='',
+ help="Text to print on barcode")
+
+ def effect(self):
+ x, y = self.view_center
+ bargen = getBarcode( self.options.type,
+ text=self.options.text,
+ height=self.options.height,
+ document=self.document,
+ x=x, y=y,
+ scale=self.unittouu('1px'),
+ )
+ if bargen is not None:
+ barcode = bargen.generate()
+ if barcode is not None:
+ self.current_layer.append(barcode)
+ else:
+ sys.stderr.write("No barcode was generated\n")
+ else:
+ sys.stderr.write("Unable to make barcode with: " + str(self.options) + "\n")
+
+def test_barcode():
+ bargen = getBarcode("Ean13", text="123456789101")
+ if bargen is not None:
+ barcode = bargen.generate()
+ if barcode:
+ print inkex.etree.tostring(barcode, pretty_print=True)
- def effect(self):
- x, y = self.view_center
- bargen = getBarcode( self.options.type, {
- 'text' : self.options.text,
- 'height' : self.options.height,
- 'document' : self.document,
- 'x' : x,
- 'y' : y,
- 'scale' : self.unittouu('1px'),
- } )
- if bargen is not None:
- barcode = bargen.generate()
- if barcode is not None:
- self.current_layer.append(barcode)
- else:
- sys.stderr.write("No barcode was generated\n")
- else:
- sys.stderr.write("Unable to make barcode with: " + str(self.options) + "\n")
if __name__ == '__main__':
- e = InsertBarcode()
- e.affect()
+ if len(sys.argv) == 1:
+ # Debug mode without inkex
+ test_barcode()
+ exit(0)
+ e = InsertBarcode()
+ e.affect()
diff --git a/share/extensions/scour.py b/share/extensions/scour.py
index 7fdd55b28..be40a27bd 100644
--- a/share/extensions/scour.py
+++ b/share/extensions/scour.py
@@ -8,11 +8,14 @@
#
# This file is part of Scour, http://www.codedread.com/scour/
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# This library is free software; you can redistribute it and/or modify
+# it either under the terms of the Apache License, Version 2.0, or, at
+# your option, under the terms and conditions of the GNU General
+# Public License, Version 2 or newer as published by the Free Software
+# Foundation. You may obtain a copy of these Licenses at:
#
# http://www.apache.org/licenses/LICENSE-2.0
+# https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/share/extensions/svg_transform.py b/share/extensions/svg_transform.py
index 07b523cc8..860c1df5d 100755
--- a/share/extensions/svg_transform.py
+++ b/share/extensions/svg_transform.py
@@ -7,11 +7,14 @@
#
# This file is part of Scour, http://www.codedread.com/scour/
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# This library is free software; you can redistribute it and/or modify
+# it either under the terms of the Apache License, Version 2.0, or, at
+# your option, under the terms and conditions of the GNU General
+# Public License, Version 2 or newer as published by the Free Software
+# Foundation. You may obtain a copy of these Licenses at:
#
# http://www.apache.org/licenses/LICENSE-2.0
+# https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/share/extensions/test/render_barcode.test.py b/share/extensions/test/render_barcode.test.py
index 79f4ff979..f2ce23873 100755
--- a/share/extensions/test/render_barcode.test.py
+++ b/share/extensions/test/render_barcode.test.py
@@ -10,15 +10,10 @@ import random
import unittest
# Allow import of the extension code and modules
-sys.path.append('..')
+sys.path.append('..')
from render_barcode import *
-import Barcode.EAN5
-import Barcode.EAN8
-import Barcode.EAN13
-import Barcode.UPCA
-import Barcode.UPCE
digits = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' ]
@@ -35,39 +30,40 @@ class InsertBarcodeBasicTest(unittest.TestCase):
self.data[btype].append( [ text, code ] )
fhl.close()
- def test_run_without_parameters(self):
- args = [ 'minimal-blank.svg' ]
- e = InsertBarcode()
- e.affect( args, False )
+ #def test_run_without_parameters(self):
+ # args = [ 'minimal-blank.svg', '-t', 'Ean5' ]
+ # e = InsertBarcode()
+ # e.affect( args, False )
#self.assertEqual( e.something, 'some value', 'A commentary about that.' )
def test_render_barcode_ian5(self):
"""Barcode IAN5"""
- self.barcode_test( 'ean5', Barcode.EAN5 )
+ self.barcode_test( 'Ean5' )
def test_render_barcode_ian8(self):
"""Barcode IAN5"""
- self.barcode_test( 'ean8', Barcode.EAN8 )
+ self.barcode_test( 'Ean8' )
def test_render_barcode_ian13(self):
"""Barcode IAN5"""
- self.barcode_test( 'ean13', Barcode.EAN13 )
+ self.barcode_test( 'Ean13' )
def test_render_barcode_upca(self):
"""Barcode IAN5"""
- self.barcode_test( 'upca', Barcode.UPCA )
+ self.barcode_test( 'Upca' )
def test_render_barcode_upce(self):
"""Barcode UPCE"""
- self.barcode_test( 'upce', Barcode.UPCE )
+ self.barcode_test( 'Upce' )
- def barcode_test(self, name, module):
+ def barcode_test(self, name):
"""Base module for all barcode testing"""
- for datum in self.data[name]:
+ for datum in self.data[name.lower()]:
(text, code) = datum
if not text or not code:
continue
- code2 = module.Object( {'text': text} ).encode(text)
+ coder = getBarcode( name, text=text)
+ code2 = coder.encode( text )
self.assertEqual(code, code2)
diff --git a/share/extensions/yocto_css.py b/share/extensions/yocto_css.py
index a73e5f2a5..c6bd0c37e 100755
--- a/share/extensions/yocto_css.py
+++ b/share/extensions/yocto_css.py
@@ -7,11 +7,14 @@
#
# This file is part of Scour, http://www.codedread.com/scour/
#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
+# This library is free software; you can redistribute it and/or modify
+# it either under the terms of the Apache License, Version 2.0, or, at
+# your option, under the terms and conditions of the GNU General
+# Public License, Version 2 or newer as published by the Free Software
+# Foundation. You may obtain a copy of these Licenses at:
#
# http://www.apache.org/licenses/LICENSE-2.0
+# https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,