feat: aggiunti: loggica random, tema scuro, correzioni mail, miglioramenti generali, cache;
This commit is contained in:
26
rename_script.py
Normal file
26
rename_script.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import os
|
||||
|
||||
frontend_dir = r"\\wsl.localhost\Ubuntu\home\ssalemi\Progetti\Rocketscale\org-parking\frontend"
|
||||
|
||||
targets = [
|
||||
("Ufficio", "Gruppo"),
|
||||
("Uffici", "Gruppi"),
|
||||
("ufficio", "gruppo"),
|
||||
("uffici", "gruppi")
|
||||
]
|
||||
|
||||
for root, _, files in os.walk(frontend_dir):
|
||||
for filename in files:
|
||||
if filename.endswith(".html") or filename.endswith(".js"):
|
||||
filepath = os.path.join(root, filename)
|
||||
with open(filepath, "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
original_content = content
|
||||
# Replacing case sensitive
|
||||
for old, new in targets:
|
||||
content = content.replace(old, new)
|
||||
|
||||
if content != original_content:
|
||||
with open(filepath, "w", encoding="utf-8") as f:
|
||||
f.write(content)
|
||||
print(f"Updated {filepath}")
|
||||
Reference in New Issue
Block a user