From f807a8ca9fe35d9cbea4d749262188e5cd63e881 Mon Sep 17 00:00:00 2001 From: Diex5 Date: Mon, 23 Sep 2024 08:51:05 +0200 Subject: [PATCH] feat: rename folders --- script.py | 39 ++++++++++++++++++ .../{AIOZ network => aioz-network}/index.yaml | 0 .../{AIOZ network => aioz-network}/logo.png | Bin .../{AnonKlub => anonklub}/index.yaml | 0 src/projects/{AnonKlub => anonklub}/logo.png | Bin src/projects/{Broearn => broearn}/index.yaml | 0 src/projects/{Broearn => broearn}/logo.png | Bin .../{Cloak-ai => cloak-ai}/index.yaml | 0 src/projects/{Cloak-ai => cloak-ai}/logo.png | Bin src/projects/{dragonX => dragonx}/index.yaml | 0 src/projects/{dragonX => dragonx}/logo.png | Bin .../{FairMath => fairmath}/index.yaml | 0 src/projects/{FairMath => fairmath}/logo.png | Bin src/projects/{Fhenix => fhenix}/index.yaml | 0 src/projects/{Fhenix => fhenix}/logo.png | Bin .../{Humanode => humanode}/index.yaml | 0 src/projects/{Humanode => humanode}/logo.png | Bin src/projects/{Inco => inco}/index.yaml | 0 src/projects/{Inco => inco}/logo.png | Bin src/projects/{Intmax => intmax}/index.yaml | 0 src/projects/{Intmax => intmax}/logo.png | Bin src/projects/{Kinto => kinto}/index.yaml | 0 src/projects/{Kinto => kinto}/logo.png | Bin .../index.yaml | 0 .../{Media network => media-network}/logo.png | Bin src/projects/{OxO => oxo}/index.yaml | 0 src/projects/{OxO => oxo}/logo.png | Bin src/projects/{Privy => privy}/index.yaml | 0 src/projects/{Privy => privy}/logo.png | Bin src/projects/{Synaps => synaps}/index.yaml | 0 src/projects/{Synaps => synaps}/logo.png | Bin .../index.yaml | 0 .../logo.png | Bin src/projects/{Zama => zama}/index.yaml | 0 src/projects/{Zama => zama}/logo.png | Bin src/projects/{ZkAGI => zkagi}/index.yaml | 0 src/projects/{ZkAGI => zkagi}/logo.png | Bin 37 files changed, 39 insertions(+) create mode 100644 script.py rename src/projects/{AIOZ network => aioz-network}/index.yaml (100%) rename src/projects/{AIOZ network => aioz-network}/logo.png (100%) rename src/projects/{AnonKlub => anonklub}/index.yaml (100%) rename src/projects/{AnonKlub => anonklub}/logo.png (100%) rename src/projects/{Broearn => broearn}/index.yaml (100%) rename src/projects/{Broearn => broearn}/logo.png (100%) rename src/projects/{Cloak-ai => cloak-ai}/index.yaml (100%) rename src/projects/{Cloak-ai => cloak-ai}/logo.png (100%) rename src/projects/{dragonX => dragonx}/index.yaml (100%) rename src/projects/{dragonX => dragonx}/logo.png (100%) rename src/projects/{FairMath => fairmath}/index.yaml (100%) rename src/projects/{FairMath => fairmath}/logo.png (100%) rename src/projects/{Fhenix => fhenix}/index.yaml (100%) rename src/projects/{Fhenix => fhenix}/logo.png (100%) rename src/projects/{Humanode => humanode}/index.yaml (100%) rename src/projects/{Humanode => humanode}/logo.png (100%) rename src/projects/{Inco => inco}/index.yaml (100%) rename src/projects/{Inco => inco}/logo.png (100%) rename src/projects/{Intmax => intmax}/index.yaml (100%) rename src/projects/{Intmax => intmax}/logo.png (100%) rename src/projects/{Kinto => kinto}/index.yaml (100%) rename src/projects/{Kinto => kinto}/logo.png (100%) rename src/projects/{Media network => media-network}/index.yaml (100%) rename src/projects/{Media network => media-network}/logo.png (100%) rename src/projects/{OxO => oxo}/index.yaml (100%) rename src/projects/{OxO => oxo}/logo.png (100%) rename src/projects/{Privy => privy}/index.yaml (100%) rename src/projects/{Privy => privy}/logo.png (100%) rename src/projects/{Synaps => synaps}/index.yaml (100%) rename src/projects/{Synaps => synaps}/logo.png (100%) rename src/projects/{The 4th Pillar => the-4th-pillar}/index.yaml (100%) rename src/projects/{The 4th Pillar => the-4th-pillar}/logo.png (100%) rename src/projects/{Zama => zama}/index.yaml (100%) rename src/projects/{Zama => zama}/logo.png (100%) rename src/projects/{ZkAGI => zkagi}/index.yaml (100%) rename src/projects/{ZkAGI => zkagi}/logo.png (100%) 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