index 866d80e9e32c01f6b2d42c18c6adade674577459..4ba89d2d6696dcde6ea153d95f982d11c1daf1eb 100644 (file)
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
-\r
+
import itertools
import sys
-from lxml import etree\r
+from lxml import etree
class Barcode:
def __init__(self, param={}):
self.width = len(self.string)
self.data = self.graphicalArray(self.string)
- def generate(self):\r
+ def generate(self):
svg_uri = u'http://www.w3.org/2000/svg'
if not self.string or not self.data:
return
if not self.document:
sys.stderr.write("No document defined to add barcode to\n")
return
- \r
- # Collect document ids\r
- doc_ids = {}\r
- docIdNodes = self.document.xpath('//@id')\r
- for m in docIdNodes:\r
- doc_ids[m] = 1\r
+
+ # Collect document ids
+ 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'