Skip to content

Commit b152e7b

Browse files
committed
handle double names
1 parent c380281 commit b152e7b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

bib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def contains_umlaut(s):
88
pattern = r'[äöüëïíš]'
99
return bool(re.search(pattern, s))
1010

11-
def generate_image(txt, header_file, footer_file, font_file, offset_x=0, offset_y=-200):
11+
def generate_image(txt, header_file, footer_file, font_file, offset_x=0, offset_y=0):
1212
# A5 size
1313
image = Image.new("RGBA", (3508, 2480), "white")
1414
header = Image.open(header_file).convert("RGBA")

main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
text = lastname.replace('ß', 'ẞ').upper()
3838
text = text.replace('ẞ'.upper(), 'ß')
3939

40+
text = text.replace('-', '-\n').replace(' ', '\n')
41+
4042
# check if lastname is duplicated in the csv file preprend the firstname initial
4143
#if df[df['lastname'] == lastname].shape[0] > 1:
4244
# text = firstname[0].upper() + ". " + lastname.upper()

0 commit comments

Comments
 (0)