diff --git a/script.py b/script.py new file mode 100644 index 00000000..412d09d1 --- /dev/null +++ b/script.py @@ -0,0 +1,39 @@ +import os + +# Cesta ke složce, kde jsou projekty +projects_folder = './src/projects' + +# Počítadla +total_folders = 0 +renamed_folders = 0 +skipped_folders = 0 + +# Projde všechny složky v složce projects +for root, dirs, files in os.walk(projects_folder): + for dir_name in dirs: + total_folders += 1 # Započítáme každou složku + + # Získáme původní cestu ke složce + original_path = os.path.join(root, dir_name) + + # Převést název složky na lowercase a nahradit mezery a podtržítka pomlčkami + new_dir_name = dir_name.lower().replace(' ', '-').replace('_', '-') + new_path = os.path.join(root, new_dir_name) + + # Pokud je původní název jiný než nový (abychom předešli zbytečným přejmenováním) + if original_path != new_path: + try: + os.rename(original_path, new_path) + print(f"Přejmenovávám složku: '{original_path}' -> '{new_path}'") + renamed_folders += 1 + except OSError as e: + print(f"Chyba při přejmenování složky {original_path}: {e}") + else: + print(f"Složka '{original_path}' již má správný název, preskakuji.") + skipped_folders += 1 + +# Výsledný souhrn +print("\n--- SOUHRN ---") +print(f"Celkový počet složek: {total_folders}") +print(f"Počet přejmenovaných složek: {renamed_folders}") +print(f"Počet přeskočených složek (již správné): {skipped_folders}") diff --git a/src/projects/AIOZ network/index.yaml b/src/projects/aioz-network/index.yaml similarity index 100% rename from src/projects/AIOZ network/index.yaml rename to src/projects/aioz-network/index.yaml diff --git a/src/projects/AIOZ network/logo.png b/src/projects/aioz-network/logo.png similarity index 100% rename from src/projects/AIOZ network/logo.png rename to src/projects/aioz-network/logo.png diff --git a/src/projects/AnonKlub/index.yaml b/src/projects/anonklub/index.yaml similarity index 100% rename from src/projects/AnonKlub/index.yaml rename to src/projects/anonklub/index.yaml diff --git a/src/projects/AnonKlub/logo.png b/src/projects/anonklub/logo.png similarity index 100% rename from src/projects/AnonKlub/logo.png rename to src/projects/anonklub/logo.png diff --git a/src/projects/Broearn/index.yaml b/src/projects/broearn/index.yaml similarity index 100% rename from src/projects/Broearn/index.yaml rename to src/projects/broearn/index.yaml diff --git a/src/projects/Broearn/logo.png b/src/projects/broearn/logo.png similarity index 100% rename from src/projects/Broearn/logo.png rename to src/projects/broearn/logo.png diff --git a/src/projects/Cloak-ai/index.yaml b/src/projects/cloak-ai/index.yaml similarity index 100% rename from src/projects/Cloak-ai/index.yaml rename to src/projects/cloak-ai/index.yaml diff --git a/src/projects/Cloak-ai/logo.png b/src/projects/cloak-ai/logo.png similarity index 100% rename from src/projects/Cloak-ai/logo.png rename to src/projects/cloak-ai/logo.png diff --git a/src/projects/dragonX/index.yaml b/src/projects/dragonx/index.yaml similarity index 100% rename from src/projects/dragonX/index.yaml rename to src/projects/dragonx/index.yaml diff --git a/src/projects/dragonX/logo.png b/src/projects/dragonx/logo.png similarity index 100% rename from src/projects/dragonX/logo.png rename to src/projects/dragonx/logo.png diff --git a/src/projects/FairMath/index.yaml b/src/projects/fairmath/index.yaml similarity index 100% rename from src/projects/FairMath/index.yaml rename to src/projects/fairmath/index.yaml diff --git a/src/projects/FairMath/logo.png b/src/projects/fairmath/logo.png similarity index 100% rename from src/projects/FairMath/logo.png rename to src/projects/fairmath/logo.png diff --git a/src/projects/Fhenix/index.yaml b/src/projects/fhenix/index.yaml similarity index 100% rename from src/projects/Fhenix/index.yaml rename to src/projects/fhenix/index.yaml diff --git a/src/projects/Fhenix/logo.png b/src/projects/fhenix/logo.png similarity index 100% rename from src/projects/Fhenix/logo.png rename to src/projects/fhenix/logo.png diff --git a/src/projects/Humanode/index.yaml b/src/projects/humanode/index.yaml similarity index 100% rename from src/projects/Humanode/index.yaml rename to src/projects/humanode/index.yaml diff --git a/src/projects/Humanode/logo.png b/src/projects/humanode/logo.png similarity index 100% rename from src/projects/Humanode/logo.png rename to src/projects/humanode/logo.png diff --git a/src/projects/Inco/index.yaml b/src/projects/inco/index.yaml similarity index 100% rename from src/projects/Inco/index.yaml rename to src/projects/inco/index.yaml diff --git a/src/projects/Inco/logo.png b/src/projects/inco/logo.png similarity index 100% rename from src/projects/Inco/logo.png rename to src/projects/inco/logo.png diff --git a/src/projects/Intmax/index.yaml b/src/projects/intmax/index.yaml similarity index 100% rename from src/projects/Intmax/index.yaml rename to src/projects/intmax/index.yaml diff --git a/src/projects/Intmax/logo.png b/src/projects/intmax/logo.png similarity index 100% rename from src/projects/Intmax/logo.png rename to src/projects/intmax/logo.png diff --git a/src/projects/Kinto/index.yaml b/src/projects/kinto/index.yaml similarity index 100% rename from src/projects/Kinto/index.yaml rename to src/projects/kinto/index.yaml diff --git a/src/projects/Kinto/logo.png b/src/projects/kinto/logo.png similarity index 100% rename from src/projects/Kinto/logo.png rename to src/projects/kinto/logo.png diff --git a/src/projects/Media network/index.yaml b/src/projects/media-network/index.yaml similarity index 100% rename from src/projects/Media network/index.yaml rename to src/projects/media-network/index.yaml diff --git a/src/projects/Media network/logo.png b/src/projects/media-network/logo.png similarity index 100% rename from src/projects/Media network/logo.png rename to src/projects/media-network/logo.png diff --git a/src/projects/OxO/index.yaml b/src/projects/oxo/index.yaml similarity index 100% rename from src/projects/OxO/index.yaml rename to src/projects/oxo/index.yaml diff --git a/src/projects/OxO/logo.png b/src/projects/oxo/logo.png similarity index 100% rename from src/projects/OxO/logo.png rename to src/projects/oxo/logo.png diff --git a/src/projects/Privy/index.yaml b/src/projects/privy/index.yaml similarity index 100% rename from src/projects/Privy/index.yaml rename to src/projects/privy/index.yaml diff --git a/src/projects/Privy/logo.png b/src/projects/privy/logo.png similarity index 100% rename from src/projects/Privy/logo.png rename to src/projects/privy/logo.png diff --git a/src/projects/Synaps/index.yaml b/src/projects/synaps/index.yaml similarity index 100% rename from src/projects/Synaps/index.yaml rename to src/projects/synaps/index.yaml diff --git a/src/projects/Synaps/logo.png b/src/projects/synaps/logo.png similarity index 100% rename from src/projects/Synaps/logo.png rename to src/projects/synaps/logo.png diff --git a/src/projects/The 4th Pillar/index.yaml b/src/projects/the-4th-pillar/index.yaml similarity index 100% rename from src/projects/The 4th Pillar/index.yaml rename to src/projects/the-4th-pillar/index.yaml diff --git a/src/projects/The 4th Pillar/logo.png b/src/projects/the-4th-pillar/logo.png similarity index 100% rename from src/projects/The 4th Pillar/logo.png rename to src/projects/the-4th-pillar/logo.png diff --git a/src/projects/Zama/index.yaml b/src/projects/zama/index.yaml similarity index 100% rename from src/projects/Zama/index.yaml rename to src/projects/zama/index.yaml diff --git a/src/projects/Zama/logo.png b/src/projects/zama/logo.png similarity index 100% rename from src/projects/Zama/logo.png rename to src/projects/zama/logo.png diff --git a/src/projects/ZkAGI/index.yaml b/src/projects/zkagi/index.yaml similarity index 100% rename from src/projects/ZkAGI/index.yaml rename to src/projects/zkagi/index.yaml diff --git a/src/projects/ZkAGI/logo.png b/src/projects/zkagi/logo.png similarity index 100% rename from src/projects/ZkAGI/logo.png rename to src/projects/zkagi/logo.png