Code

code by Aaron Spike for EAN5
authorAlvin Penner <penner@vaxxine.com>
Mon, 21 Dec 2009 23:48:17 +0000 (18:48 -0500)
committerAlvin Penner <penner@vaxxine.com>
Mon, 21 Dec 2009 23:48:17 +0000 (18:48 -0500)
share/extensions/Barcode/Makefile.am
share/extensions/Barcode/__init__.py
share/extensions/render_barcode.inx

index 338c01c10545b4b5470e0cd512e011285c21ac62..fd5f1663b9fe3547c070ca9956964d3acf09f876 100644 (file)
@@ -9,6 +9,7 @@ barcode_SCRIPTS = \
        Code93.py \
        EAN13.py \
        EAN8.py \
+       EAN5.py \
        __init__.py \
        RM4CC.py \
        UPCA.py \
index a455c3b7c9ee10c6ca37bf929f25ab69910456ed..b2257ebcbdb84b737ac79608ea5443e5c74d6863 100644 (file)
@@ -74,6 +74,9 @@ def getBarcode(format, param={}):
                elif format in ['ean13', 'ucc13','jan']:
                        import EAN13
                        return EAN13.Object(param)
+               elif format == 'ean5':
+                       import EAN5
+                       return EAN5.Object(param)
                elif format in ['ean8', 'ucc8']:
                        import EAN8
                        return EAN8.Object(param)
index 610c8bf19fcca24d178f575150ca05845c40e71b..91dd1bbe434cdf60e8a6b2fb4724d40bb0f117be 100644 (file)
@@ -1,29 +1,30 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
-  <_name>Barcode</_name>
-  <id>org.inkscape.render.barcode</id>
-  <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="ean8">EAN8</item>
-    <item value="ean13">EAN13</item>
-    <item value="upca">UPC-A</item>
-    <item value="upce">UPC-E</item>
-    <item value="code39">Code39</item>
-    <item value="code39ext">Code39Ext</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>
-  <effect>
-    <object-type>all</object-type>
-    <effects-menu>
-      <submenu _name="Render"/>
-    </effects-menu>
-  </effect>
-  <script>
-    <command reldir="extensions" interpreter="python">render_barcode.py</command>
-  </script>
+       <_name>Barcode</_name>
+       <id>org.inkscape.render.barcode</id>
+       <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="ean8">EAN8</item>
+               <item value="ean13">EAN13</item>
+               <item value="ean5">EAN5</item>
+               <item value="upca">UPC-A</item>
+               <item value="upce">UPC-E</item>
+               <item value="code39">Code39</item>
+               <item value="code39ext">Code39Ext</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>
+       <effect>
+               <object-type>all</object-type>
+               <effects-menu>
+                       <submenu _name="Render"/>
+               </effects-menu>
+       </effect>
+       <script>
+               <command reldir="extensions" interpreter="python">render_barcode.py</command>
+       </script>
 </inkscape-extension>