From c02557077deb4afacafa635de3621489e5b8a6a7 Mon Sep 17 00:00:00 2001 From: Floke Date: Fri, 27 Jun 2025 08:47:32 +0000 Subject: [PATCH] =?UTF-8?q?reindent.py=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reindent.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 reindent.py diff --git a/reindent.py b/reindent.py new file mode 100644 index 00000000..6b543ca9 --- /dev/null +++ b/reindent.py @@ -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}")