#
# Copyright (C) 2007 Martin Owens
#
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.
#
"""
Python barcode renderer for Code93 barcodes. Designed for use with Inkscape.
"""
"""Extended ENCODE maps for full ASCII Code93"""
result = {}
pos = 10
return result
# MapA is eclectic, but B, C, D are all ASCII ranges
123, 124, 125, 126, 127, 0, 64, 96, 127, 127, 127]) # %
ENCODE = [
'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', ''
]
# start marker
# Extend to ASCII charset ( return Array )
# Calculate the checksums
# Now convert text into the ENCODE bits (black and white stripes)
# end marker and termination bar
"""Generate a code 93 checksum"""
check = 0
# Reset the weight is required
if weight == 0:
# Some charicters need re-ENCODE into the code93 specification
result = []
return result