Skip to content

Commit

Permalink
Remove punctuation from game display names because it was messing up …
Browse files Browse the repository at this point in the history
…the capitalization
  • Loading branch information
DrgnFireYellow committed Dec 27, 2023
1 parent 5e2d4f0 commit 14b7e62
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import re
import shutil
from string import punctuation

from rich import print
from rich.align import Align
Expand Down Expand Up @@ -73,6 +74,8 @@ def make_player(gamefile, system, htmlname):
gamedisplayname = gamedisplayname.replace("-", " ")
gamedisplayname = gamedisplayname.replace(";", " - ")
gamedisplayname = gamedisplayname.replace("_", " ")
for symbol in punctuation:
gamedisplayname = gamedisplayname.replace(symbol, "")
gamedisplayname = gamedisplayname.title()
gamedisplayname += " "
logging.info(f"Creating page for {game}")
Expand Down

0 comments on commit 14b7e62

Please sign in to comment.