py script

This commit is contained in:
nora 2023-04-17 20:07:54 +02:00
parent 2be0e28305
commit 851d491846
4 changed files with 31 additions and 6 deletions

19
apply.py Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/python3
with open("src/tiles.rs") as f:
content: str = f.read()
result = ''
while True:
next_add = content.find("//ADD")
if next_add == -1:
break
result += content[:next_add]
content = content[(next_add + 5):]
result += content
with open("src/tiles.rs", "w") as f:
f.write(result)