You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
291 B
Python

import random
import string
import barcode
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)