summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b7ce264)
raw | patch | inline | side by side (parent: b7ce264)
author | Alvin Penner <penner@vaxxine.com> | |
Sun, 28 Feb 2010 22:40:23 +0000 (17:40 -0500) | ||
committer | Alvin Penner <penner@vaxxine.com> | |
Sun, 28 Feb 2010 22:40:23 +0000 (17:40 -0500) |
share/extensions/Barcode/Code128.py | patch | blob | history |
index 42342c40043c7ebb04bd396ae5268046dc2ac5c1..2f0b327ed44a988274efe53d1b390edca6ecb4d1 100644 (file)
Copyright (C) 2007 Martin Owens
Debugged by Ralf Heinecke & Martin Siepmann 09/07/2007
+Debugged by Horst Schottky Feb. 27. 2010
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
# Split up into sections of numbers, or charicters
# This makes sure that all the charicters are encoded
# In the best way posible for Code128
- for datum in re.findall(r'(?:(?:\d\d){2,})|.', text):
+ for datum in re.findall(r'(?:(?:\d\d){2,})|(?:^\d\d)|.', text):
if len(datum) == 1:
block = block + datum
else:
i = pos
if pos:
- num = num + (math.abs(num - 102) * 2)
+ num = 204 - num
else:
i = 1