From 356a365eecd7a75fca685d0a8c974822420c1ea1 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Mon, 4 Nov 2024 11:00:41 +0100 Subject: [PATCH] up generation index --- build_index_gemini.py | 8 +- converters.sh | 6 +- gemini-capsules/dragonfeu_blog/index.gmi | 44 +++---- html-websites/dragonfeu_blog/index.html | 112 +----------------- templates/website_pages/{ => md}/a-propos.md | 0 templates/website_pages/{ => md}/accueil.md | 0 templates/website_pages/{ => md}/blogroll.md | 0 templates/website_pages/{ => md}/contact.md | 0 .../website_pages/{ => md}/footer-articles.md | 0 templates/website_pages/{ => md}/projets.md | 0 templates/website_pages/org/a-propos.org | 2 + templates/website_pages/org/accueil.org | 0 templates/website_pages/org/blogroll.org | 2 + templates/website_pages/org/contact.org | 1 + .../website_pages/org/footer-articles.org | 3 + templates/website_pages/org/projets.org | 2 + 16 files changed, 36 insertions(+), 144 deletions(-) rename templates/website_pages/{ => md}/a-propos.md (100%) rename templates/website_pages/{ => md}/accueil.md (100%) rename templates/website_pages/{ => md}/blogroll.md (100%) rename templates/website_pages/{ => md}/contact.md (100%) rename templates/website_pages/{ => md}/footer-articles.md (100%) rename templates/website_pages/{ => md}/projets.md (100%) create mode 100644 templates/website_pages/org/a-propos.org create mode 100644 templates/website_pages/org/accueil.org create mode 100644 templates/website_pages/org/blogroll.org create mode 100644 templates/website_pages/org/contact.org create mode 100644 templates/website_pages/org/footer-articles.org create mode 100644 templates/website_pages/org/projets.org diff --git a/build_index_gemini.py b/build_index_gemini.py index 88872c8b..8e1c32fc 100755 --- a/build_index_gemini.py +++ b/build_index_gemini.py @@ -60,16 +60,18 @@ def generer_index(dossier_md, fichier_index, titre_index): contenu_index_html += f"
{link_html}" contenu_index_gmi += "\n# Articles en Français\n-------------------------\n" + lang_folder="lang_fr/" for fichier in files_fr: contenu_index_gmi += f"=> {fichier}\n" link_html = fichier.replace('..gmi','.html') - contenu_index_html += f"
{link_html}" + contenu_index_html += f"
{link_html}" contenu_index_gmi += "\n# Articles in English\n-------------------------\n" + lang_folder="lang_en/" for fichier in files_en: contenu_index_gmi += f"=> {fichier}\n" link_html = fichier.replace('..gmi','.html') - contenu_index_html += f"
{link_html}" + contenu_index_html += f"
{link_html}" # Écrit le contenu dans le fichier d'index try: @@ -77,7 +79,7 @@ def generer_index(dossier_md, fichier_index, titre_index): file.write(contenu_index_gmi) print(f"Fichier d'index '{chemin_fichier_index_html}' généré avec succès.") - with open(chemin_fichier_index_gemini, 'w', encoding='utf-8') as file: + with open(chemin_fichier_index_html, 'w', encoding='utf-8') as file: file.write(''+args.title+''+contenu_index_html+'') print(f"Fichier d'index '{chemin_fichier_index_html}' généré avec succès.") except OSError as e: diff --git a/converters.sh b/converters.sh index 713f3707..7fe9776d 100755 --- a/converters.sh +++ b/converters.sh @@ -97,7 +97,7 @@ generate_website() { # Boucle à travers la liste des sites Web for website_name in "${blogs_folders[@]}"; do generate_website $website_name - python3 build_index_gemini.py $website_name - mv "index_$website_name.html" "html-websites/$website_name" - mv "index_$website_name.gmi" "gemini-capsules/$website_name" + python3 build_index_gemini.py $website_name "$website_name" + mv "index_$website_name.html" "html-websites/$website_name/index.html" + mv "index_$website_name.gmi" "gemini-capsules/$website_name/index.gmi" done diff --git a/gemini-capsules/dragonfeu_blog/index.gmi b/gemini-capsules/dragonfeu_blog/index.gmi index 4089b367..8eaf1c2c 100644 --- a/gemini-capsules/dragonfeu_blog/index.gmi +++ b/gemini-capsules/dragonfeu_blog/index.gmi @@ -1,33 +1,19 @@ + # dragonfeu_blog - Articles +- - - - - - - - - - - - - - - - - - - - - - - - - - - - +# Navigation +------------------------- +=> index..gmi +# Articles en Français +------------------------- +=> 2024-11-02-coucou-gemini..gmi +=> 2024-09-08-strategie-mitigation-accident-fusion-coeur-epr2..gmi +=> 2024-05-15-l-aventure-superphenix..gmi +=> 2023-06-10-recap-centrale-zaporijia..gmi +=> 2023-06-09-recapitulatif-contenu-threads..gmi - -``` ------------------------------------------------------------
-``` - - -Les trucs d'un dragon qui roule plus vite à vélo tel un neutron rapide, mais avec un casque opour le vélotaf chez Hexana. - - -``` ------------------------------------------------------------
-``` - - -À propos => a-propos.gmi - - -Projets => projets.gmi - - -Contact => contact.gmi - - -BlogRoll => blogroll.gmi - - -``` ------------------------------------------------------------
-``` +# Articles in English +------------------------- +=> 2024-11-02-coucou-gemini..gmi diff --git a/html-websites/dragonfeu_blog/index.html b/html-websites/dragonfeu_blog/index.html index 9fd9facb..b956aa4a 100644 --- a/html-websites/dragonfeu_blog/index.html +++ b/html-websites/dragonfeu_blog/index.html @@ -1,110 +1,4 @@ - - - - -dragonfeu_blog - - - - - - - - - dragonfeu_blog - - - -
-

dragonfeu_blog

-
-
-

Les trucs d'un dragon qui roule plus vite à vélo tel un neutron rapide, mais avec un casque opour le vélotaf chez Hexana.

-
-

À propos => a-propos.gmi

-

Projets => projets.gmi

-

Contact => contact.gmi

-

BlogRoll => blogroll.gmi

-
- - - - - \ No newline at end of file +
index.html
2024-11-02-coucou-gemini.html
2024-09-08-strategie-mitigation-accident-fusion-coeur-epr2.html
2024-05-15-l-aventure-superphenix.html
2023-06-10-recap-centrale-zaporijia.html
2023-06-09-recapitulatif-contenu-threads.html
2024-11-02-coucou-gemini.html \ No newline at end of file diff --git a/templates/website_pages/a-propos.md b/templates/website_pages/md/a-propos.md similarity index 100% rename from templates/website_pages/a-propos.md rename to templates/website_pages/md/a-propos.md diff --git a/templates/website_pages/accueil.md b/templates/website_pages/md/accueil.md similarity index 100% rename from templates/website_pages/accueil.md rename to templates/website_pages/md/accueil.md diff --git a/templates/website_pages/blogroll.md b/templates/website_pages/md/blogroll.md similarity index 100% rename from templates/website_pages/blogroll.md rename to templates/website_pages/md/blogroll.md diff --git a/templates/website_pages/contact.md b/templates/website_pages/md/contact.md similarity index 100% rename from templates/website_pages/contact.md rename to templates/website_pages/md/contact.md diff --git a/templates/website_pages/footer-articles.md b/templates/website_pages/md/footer-articles.md similarity index 100% rename from templates/website_pages/footer-articles.md rename to templates/website_pages/md/footer-articles.md diff --git a/templates/website_pages/projets.md b/templates/website_pages/md/projets.md similarity index 100% rename from templates/website_pages/projets.md rename to templates/website_pages/md/projets.md diff --git a/templates/website_pages/org/a-propos.org b/templates/website_pages/org/a-propos.org new file mode 100644 index 00000000..9162ef78 --- /dev/null +++ b/templates/website_pages/org/a-propos.org @@ -0,0 +1,2 @@ +* à propos +à propos de ce site \ No newline at end of file diff --git a/templates/website_pages/org/accueil.org b/templates/website_pages/org/accueil.org new file mode 100644 index 00000000..e69de29b diff --git a/templates/website_pages/org/blogroll.org b/templates/website_pages/org/blogroll.org new file mode 100644 index 00000000..791bd6cf --- /dev/null +++ b/templates/website_pages/org/blogroll.org @@ -0,0 +1,2 @@ +* Blogs recommandés +- \ No newline at end of file diff --git a/templates/website_pages/org/contact.org b/templates/website_pages/org/contact.org new file mode 100644 index 00000000..b6d9f7e4 --- /dev/null +++ b/templates/website_pages/org/contact.org @@ -0,0 +1 @@ +* Contact \ No newline at end of file diff --git a/templates/website_pages/org/footer-articles.org b/templates/website_pages/org/footer-articles.org new file mode 100644 index 00000000..bd48ead7 --- /dev/null +++ b/templates/website_pages/org/footer-articles.org @@ -0,0 +1,3 @@ +---------------- +Écrit par $$AUTHOR$$ $$DATE_ARTICLE$$. +Si vous aimez ce que nous faisons, soutenez vous diff --git a/templates/website_pages/org/projets.org b/templates/website_pages/org/projets.org new file mode 100644 index 00000000..79faa9a9 --- /dev/null +++ b/templates/website_pages/org/projets.org @@ -0,0 +1,2 @@ +* Projets +- mon projet 1 \ No newline at end of file