reindent.py hinzugefügt

This commit is contained in:
2025-06-27 08:47:32 +00:00
parent 6ac980f172
commit ef413a1291

18
reindent.py Normal file
View File

@@ -0,0 +1,18 @@
# reindent.py
import sys
in_path = sys.argv[1]
out_path = sys.argv[2]
with open(in_path, 'r', encoding='utf-8') as f:
lines = f.readlines()
fixed = []
for line in lines:
# Tabs → 4 Spaces, Strip trailing Spaces
new = line.expandtabs(4).rstrip()
fixed.append(new + '\n')
with open(out_path, 'w', encoding='utf-8') as f:
f.writelines(fixed)
print(f"Neu eingerückt und gespeichert: {out_path}")