mirror of
https://github.com/brmlab/misc.git
synced 2025-06-07 17:34:08 +02:00
barcodes.py: Move and document sheet variables
This commit is contained in:
parent
5612275fc8
commit
ca1c4f3277
1 changed files with 8 additions and 6 deletions
14
barcodes.py
14
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 = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="1052.3622" height="744.09448" version="1.1" id="svg2" inkscape:version="0.47 r22583" sodipodi:docname="barcodes.svg">
|
||||
"""
|
||||
|
@ -27,11 +34,6 @@ svgfoot = """
|
|||
</svg>
|
||||
"""
|
||||
|
||||
cntx = 7
|
||||
cnty = 10
|
||||
scalex = 1
|
||||
scaley = 0.8
|
||||
|
||||
f = open('barcodes.svg','w')
|
||||
f.write(svghead)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue