added more barcodes + logo
This commit is contained in:
parent
55aa6c75af
commit
18dfbff231
BIN
binary_kitchen.png
Normal file
BIN
binary_kitchen.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
11
drinks.csv
11
drinks.csv
@ -1,9 +1,12 @@
|
|||||||
code,drink,filename
|
code,drink,filename
|
||||||
133742000000,KitchenTschunk,tschunk
|
133742000000,KitchenTschunk2cl,tschunk2cl
|
||||||
|
133742000009,KitchenTschunk4cl,tschunk4cl
|
||||||
133742000001,VirginTschunk,vir_tschunk
|
133742000001,VirginTschunk,vir_tschunk
|
||||||
133742000002,MoscowMule,moscowmule
|
133742000007,GinTonic,gintonic
|
||||||
133742000003,VirginMoscowMule,vir_moscowmule
|
|
||||||
133742000004,Schnaps2cl,schnaps2cl
|
133742000004,Schnaps2cl,schnaps2cl
|
||||||
133742000005,Schnaps4cl,schnaps4cl
|
133742000005,Schnaps4cl,schnaps4cl
|
||||||
133742000006,Likoer2cl,likoer2cl
|
133742000006,Likoer2cl,likoer2cl
|
||||||
133742000007,GinTonic,gintonic
|
133742000010,Likoer4cl,likoer4cl
|
||||||
|
133742000002,$Dollar$Mule,dollarmule
|
||||||
|
133742000003,Virgin$Dollar$Mule,vir_dollarmule
|
||||||
|
133742000008,generic beer,generic_beer
|
||||||
|
|
9
main.py
9
main.py
@ -13,6 +13,8 @@ pdf = FPDF()
|
|||||||
pdf_row = 0
|
pdf_row = 0
|
||||||
pdf_colum = 0
|
pdf_colum = 0
|
||||||
|
|
||||||
|
pdf_logo = 'binary_kitchen.png'
|
||||||
|
|
||||||
def generate_barcode(filename, content, label):
|
def generate_barcode(filename, content, label):
|
||||||
if not os.path.exists('out'):
|
if not os.path.exists('out'):
|
||||||
os.makedirs('out')
|
os.makedirs('out')
|
||||||
@ -44,6 +46,7 @@ def pdf_add_barcode(imagepath):
|
|||||||
y = 10
|
y = 10
|
||||||
pdf_row = 0
|
pdf_row = 0
|
||||||
pdf.add_page()
|
pdf.add_page()
|
||||||
|
pdf.image(pdf_logo, x=100, y=265, h=24)
|
||||||
|
|
||||||
# determine x-position
|
# determine x-position
|
||||||
if pdf_colum == 0:
|
if pdf_colum == 0:
|
||||||
@ -58,10 +61,14 @@ def pdf_add_barcode(imagepath):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
generate_barcode_username('raven\t', 'raven', 'raven')
|
generate_barcode_username('raven', 'raven\t', 'raven')
|
||||||
|
generate_barcode_username('voidptrs Geburtstagsfeier', '\tvoidptrs Geburtstagsfeier\t', 'voidptrs Geburtstagsfeier')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pdf.add_page()
|
pdf.add_page()
|
||||||
pdf.set_font("Arial", size=15)
|
pdf.set_font("Arial", size=15)
|
||||||
|
pdf.image(pdf_logo, x=180, y=7, h=24)
|
||||||
|
|
||||||
filename = 'drinks.csv'
|
filename = 'drinks.csv'
|
||||||
with open(filename, 'r') as csvfile:
|
with open(filename, 'r') as csvfile:
|
||||||
|
Loading…
Reference in New Issue
Block a user