mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
14 lines
338 B
Python
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"))
|