diff --git a/README.md b/README.md index 2282a104..f517ed9d 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,12 @@ python3 new_article.py cipherbliss_blog en "Creation of a gemini blog" ``` ## prérequis pour installation ```shell -sudo apt install pandoc -pip install uuid argparse os +bash install.sh ``` - +[2024-11-04] +Testé avec: +Pandoc 2.9.2.1 +Python 3.10.12 ## Conversion des fichiers Org vers gemini et html ```shell bash converters.sh @@ -66,7 +68,7 @@ Pandoc, PandocGmi - TODO config par site web de son nom de domaine - TODO réécriture des liens internes - +- template footer article: gestion article suivant et précédent # Fait - gestion des langues dans la source et la destination - gestion multi site et multi langue \ No newline at end of file diff --git a/converters.sh b/converters.sh index 33580dbe..713f3707 100755 --- a/converters.sh +++ b/converters.sh @@ -3,8 +3,8 @@ # liste des dossiers à convertir #blogs_folders=("dragonfeu_blog" "tykayn_blog" "cipherbliss_blog" "qzine_blog" "cil_gometz") -# blogs_folders=("dragonfeu_blog") - blogs_folders=("tykayn_blog" "qzine_blog" "dragonfeu_blog") +blogs_folders=("dragonfeu_blog") +# blogs_folders=("tykayn_blog" "qzine_blog" "dragonfeu_blog") # blogs_folders=("cil_gometz") # blogs_folders=("cipherbliss_blog") source_file_extension="org" @@ -26,7 +26,7 @@ convert_sources() { pandoc -f "${source_file_extension}" -t html -s "${i}" -o "converted/${i%.${source_file_extension}}.html" --metadata title="$website_name" # Transformer en gmi echo "to GMI:" - pandoc --template $templates_path../../template_gemini.lua -f "${source_file_extension}" -t $templates_path../../gmi.lua -s "${i}" -o "converted/${i%.${source_file_extension}}.gmi" + pandoc --template $templates_path../../templates/pandoc/template_gemini.lua -f "${source_file_extension}" -t $templates_path../../templates/pandoc/gmi.lua -s "${i}" -o "converted/${i%.${source_file_extension}}.gmi" # ajout des footers à chaque article # cat '../../templates/website_pages/footer-articles.md.gmi' >> "${i%.${source_file_extension}}.gmi" done diff --git a/install.sh b/install.sh new file mode 100644 index 00000000..e0e4ef57 --- /dev/null +++ b/install.sh @@ -0,0 +1,3 @@ +#!/bin/bash +sudo apt install pandoc python3-pip +pip install uuid argparse os \ No newline at end of file diff --git a/gmi.lua b/templates/pandoc/gmi.lua similarity index 100% rename from gmi.lua rename to templates/pandoc/gmi.lua diff --git a/template_gemini.lua b/templates/pandoc/template_gemini.lua similarity index 100% rename from template_gemini.lua rename to templates/pandoc/template_gemini.lua diff --git a/templates/website_pages/footer-articles.md b/templates/website_pages/footer-articles.md index 1242c94b..c2cbb185 100644 --- a/templates/website_pages/footer-articles.md +++ b/templates/website_pages/footer-articles.md @@ -4,5 +4,7 @@ Soutenez ce site Retour à l'index => index.gmi +$$ARTICLE_SUIVANT$$ +$$ARTICLE_PRECEDENT$$ => projets.gmi -----------------------------------