4cade/bin/builddisplaynames.py

14 lines
358 B
Python
Raw Normal View History

2021-10-23 04:53:23 +00:00
#!/usr/bin/env python3
# usage:
2021-10-23 05:20:34 +00:00
# builddisplaynames.py < build/GAMES.CONF > build/DISPLAY.CONF
2021-10-23 04:53:23 +00:00
import sys
for line in sys.stdin:
2021-10-23 05:20:34 +00:00
if line.startswith("["): continue
2021-10-23 04:53:23 +00:00
if "=" not in line:
prefix, key = line.split(",")
line = prefix + "," + key.strip() + "=" + key.replace(".", " ").title().replace(" Ii", " II")
print(line, end="")