refactor: make labelinfo strongly typed

This commit is contained in:
Jan Christian Grünhage 2023-11-25 16:38:49 +01:00
parent a6b9eb5069
commit 46f3a2fb6f
No known key found for this signature in database
GPG key ID: EEC1170CE56FA2ED
2 changed files with 25 additions and 21 deletions

View file

@ -27,6 +27,6 @@ def main():
label = avery_labels.AveryLabel(args.format)
label.open(args.output_file)
# by default, we render all labels possible on a single sheet
count = avery_labels.labelInfo[args.format][0]*avery_labels.labelInfo[args.format][1]
count = avery_labels.labelInfo[args.format].labels_horizontal*avery_labels.labelInfo[args.format].labels_vertical
label.render(render, count )
label.close()