Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nimarion committed May 5, 2024
1 parent 1faf253 commit 80f5a88
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Automatically generate DIN A5 (148 x 210) bibs for sports events. Text size is a


```bash
python3 .\main.py --data .\example\data.csv --footer .\example\footer.png --output .\example\output\ --font .\example\agency_fb.ttf --header-offset 60 --seperator ';'
python3 .\main.py --data .\example\data.csv --footer .\example\footer.png --output .\example\output\ --font .\example\agency_fb.ttf --seperator ';'
```

## Manual input

```bash
python3 .\bib.py --text LYLES --output .\example\output\Lyles.png --header .\example\globus.png --font .\example\agency_fb.ttf --footer .\example\footer.png --header-offset 60--footer .\example\footer.png --header-offset 60
python3 .\bib.py --text LYLES --output .\example\output\Lyles.png --header .\example\globus.png --font .\example\agency_fb.ttf --footer .\example\footer.png --footer .\example\footer.png --header-offset 60
```

![image](https://github.com/nimarion/bib-generator/assets/23435250/5a7272fb-e5bb-4117-b3e0-b769daf06912)
Expand Down
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

firstname = str(row['firstname'])
lastname = str(row['lastname'])
text = lastname.upper()
text = lastname.replace('ß', 'ẞ').upper()
text = text.replace('ẞ'.upper(), 'ß')

# check if lastname is duplicated in the csv file preprend the firstname initial
if df[df['lastname'] == lastname].shape[0] > 1:
Expand Down
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def generate_bib(
raise HTTPException(status_code=404, detail="Font not found")
print("hi")
image = generate_image(text, header_folder + "/" + header, footer_folder + "/" + footer,
font_folder + "/" + font, header_offset)
font_folder + "/" + font)
return Response(content=image, media_type="image/png", headers={"Content-Disposition": "filename=" + text + ".png"})


Expand Down

0 comments on commit 80f5a88

Please sign in to comment.