4cade/bin/builddisplaynames.py
2021-10-23 00:53:23 -04:00

15 lines
398 B
Python
Executable File

#!/usr/bin/env python3
# usage:
# builddisplaynames.py < res/GAMES.CONF > build/GAMES.CONF.WITH.NAMES
import sys
for line in sys.stdin:
if "," not in line: continue
if line.startswith("#"): continue
if "=" not in line:
prefix, key = line.split(",")
line = prefix + "," + key.strip() + "=" + key.replace(".", " ").title().replace(" Ii", " II")
print(line, end="")