projects-jenz/fastdl_sync/svencoop_lowercasing/lowercase_res_content.py

16 lines
458 B
Python
Raw Normal View History

2024-09-13 15:16:44 +02:00
#!/usr/bin/python3
2024-09-13 15:16:44 +02:00
from pathlib import Path
2024-09-13 15:16:44 +02:00
#we just lowercase each line in each res file so fastdl is fine with everything being lowercase.
def main():
for p in Path("./svencoop_addon/maps/").glob('*.res'): #get all .res files in /maps
with open(p, 'r') as res:
lines = res.readlines()
with open(p, 'w') as res:
for line in lines:
res.write(line.lower())
2024-09-13 15:16:44 +02:00
if __name__ == "__main__":
main()