From ca1c4f3277931fde47e47036ecbbb757902fda86 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Wed, 18 Jul 2012 01:02:30 +0200 Subject: [PATCH] barcodes.py: Move and document sheet variables --- barcodes.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/barcodes.py b/barcodes.py index f6224c6..8f780c3 100755 --- a/barcodes.py +++ b/barcodes.py @@ -1,7 +1,7 @@ #!/usr/bin/python # # accept strings on stdin and put them to a SVG in grid layout -# compatible with our sticker papers +# compatible with our sticker sheets # # example: seq -f %06g 0 1000 | ./barcodes.py # @@ -19,6 +19,13 @@ parser = argparse.ArgumentParser() parser.add_argument('-b', '--brmlabel', action='store_true') args = parser.parse_args() +# This setting is appropriate for printing to 7x2 sticker sheets +# oriented at landscape, with 5 codes per sticker. +cntx = 7 +cnty = 10 +scalex = 1 +scaley = 0.8 + svghead = """ """ @@ -27,11 +34,6 @@ svgfoot = """ """ -cntx = 7 -cnty = 10 -scalex = 1 -scaley = 0.8 - f = open('barcodes.svg','w') f.write(svghead)