refactor barcode generations to use kode256
parent
9c8e26b426
commit
596c49a964
@ -1,11 +1,11 @@
|
|||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
|
|
||||||
import barcode
|
import kode256
|
||||||
|
|
||||||
chars = string.ascii_letters + string.digits
|
chars = string.ascii_letters + string.digits
|
||||||
for code in range(30):
|
for code in range(30):
|
||||||
code = ''.join(random.choice(chars) for _ in range(5))
|
code = ''.join(random.choice(chars) for _ in range(5))
|
||||||
code = "SAp." + code
|
code = "SAp." + code
|
||||||
out_file = "/tmp/" + code + ".svg"
|
out_file = "/tmp/" + code + ".svg"
|
||||||
barcode.generate("code128", code, output=out_file)
|
kode256.svg(code).save(out_file)
|
||||||
|
Loading…
Reference in New Issue