#!/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()