papermario/tools/old/new_lines.py
Alexander Faßbender 76c7e51f4a
Update and move tools (#596)
* update scripts and move outdated ones to /old/

* updates

* resolve issues
2022-01-02 13:10:49 +01:00

14 lines
338 B
Python

from pathlib import Path
def parse_folder(path):
for entry in path.iterdir():
if entry.is_dir():
parse_folder(entry)
else:
fd = entry.read_text().splitlines()
if fd[-1] != "":
fd.append("")
entry.write_text("\n".join(fd))
parse_folder(Path("src"))