Rm4scc.py revision ad9933c3bdd809813acc78673fcc580cd326bcd6
#
# 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-1301, USA.
#
"""
Python barcode renderer for RM4CC barcodes. Designed for use with Inkscape.
"""
map = {
'(' : '25',
')' : '3',
'0' : '05053535',
'1' : '05152535',
'2' : '05153525',
'3' : '15052535',
'4' : '15053525',
'5' : '15152525',
'6' : '05251535',
'7' : '05350535',
'8' : '05351525',
'9' : '15250535',
'A' : '15251525',
'B' : '15350525',
'C' : '05253515',
'D' : '05352515',
'E' : '05353505',
'F' : '15252515',
'G' : '15253505',
'H' : '15352505',
'I' : '25051535',
'J' : '25150535',
'K' : '25151525',
'L' : '35050535',
'M' : '35051525',
'N' : '35150525',
'O' : '25053525',
'P' : '25152515',
'Q' : '25153505',
'R' : '35052515',
'S' : '35053505',
'T' : '35152505',
'U' : '25251515',
'V' : '25350515',
'W' : '25351505',
'X' : '35250515',
'Y' : '35251505',
'Z' : '35350505',
}
default_height = 18
result = ''
i = 0
i = i + 1
return result;
# given a string of data, return the check character
total_lower = 0
total_upper = 0
lower = 0
upper = 0
return checkchar
"""Royal Mail Barcodes use a completely different style"""
return result