accidentaly uploaded wrong content

This commit is contained in:
jenz 2024-09-13 15:16:44 +02:00
parent 1337172b91
commit 5c9de31835

View File

@ -1,16 +1,15 @@
#!/bin/bash
#!/usr/bin/python3
to_lowercase() {
find "$1" -depth -execdir rename 's/(.*)/\L$1/' {} +
./lowercase_res_content.py
}
from pathlib import Path
to_lowercase "./svencoop_addon"
inotifywait -m -r -e create -e moved_to -e modify --format '%w%f' "./svencoop_addon" | while read NEWFILE
do
echo "File change: $NEWFILE"
to_lowercase "./svencoop_addon"
sleep 1
done
#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()