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