projects-jenz/fastdl_sync/svencoop_lowercasing/lowercase_res_content.py

16 lines
458 B
Python

#!/usr/bin/python3
from pathlib import Path
#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())
if __name__ == "__main__":
main()