Skip to content

Commit

Permalink
cast as string
Browse files Browse the repository at this point in the history
  • Loading branch information
nimarion committed Apr 25, 2024
1 parent 77629f3 commit 9ca6459
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions bib.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io

def generate_image(txt, header_file, footer_file, font_file, header_offset = 0):
print("Generating image", txt, header_file, footer_file, font_file, header_offset)
# A5 size
image = Image.new("RGB", (3508, 2480), "white")
header = Image.open(header_file)
Expand Down
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
df = pd.read_csv(data_file, sep=args.seperator)

for index, row in df.iterrows():
firstname = row['firstname']
lastname = row['lastname']

firstname = str(row['firstname'])
lastname = str(row['lastname'])
text = lastname.upper()

# check if lastname is duplicated in the csv file preprend the firstname initial
Expand All @@ -38,5 +39,4 @@

header_file = row['header']
output_file = output_folder + "/" + lastname + "_" + firstname + ".png"
print("Generating bib for", firstname, lastname, "with header", header_file)
bib_generator(text, output_file, header_file, footer_file, font_file, header_offset)

0 comments on commit 9ca6459

Please sign in to comment.