diff --git a/atom_generate.py b/atom_generate.py
index 0ea34b1d..b5c1a27f 100755
--- a/atom_generate.py
+++ b/atom_generate.py
@@ -26,15 +26,15 @@ org_files = []
limit_articles_feed=1000
count_articles=0
-print('atom generate: fichiers dans le dossier: ',len((blog_dir)))
+# print('atom generate: fichiers dans le dossier: ',len((blog_dir)))
# Parcourt le dossier source à la recherche de fichiers org-mode
for root, dirs, files in os.walk(blog_dir):
- print('fichiers fr dans le dossier source',len(files))
- print(files)
+# print('fichiers fr dans le dossier source',len(files))
+# print(files)
for file in files:
if file.endswith(".org"):
- print("org: ",file)
+# print("org: ",file)
date_str, annee, slug = find_year_and_slug_on_filename(file)
# Ouvre le fichier et recherche la première date dans le contenu de l'article
with open(os.path.join(root, file), "r", encoding="utf-8") as f:
@@ -52,10 +52,10 @@ for root, dirs, files in os.walk(blog_dir):
if count_articles > limit_articles_feed:
break
# Tri des fichiers par ordre décroissant de date
-print(org_files)
+# print(org_files)
org_files.sort(reverse=True)
-print(org_files)
-print("org_files:",org_files)
+# print(org_files)
+# print("org_files:",org_files)
# Génération du flux Atom
atom_feed = {"title": "Flux Atom des articles de "+args.blog_dir,
"link": f"{website_ndd}/feed",
@@ -122,4 +122,3 @@ with open(f"index_{args.blog_dir}.xml", "w", encoding="utf-8") as f:
f.write(' \n')
f.write(' \n')
f.write('')
- # os.rename(f"index_{args.blog_dir}.xml", f"html-websites/{args.blog_dir}/feed/index.xml")
diff --git a/build_indexes.py b/build_indexes.py
index 93780f6c..d515ba30 100755
--- a/build_indexes.py
+++ b/build_indexes.py
@@ -108,7 +108,7 @@ def generer_index(dossier_source, fichier_index):
print("article_relative_url",article_relative_url)
# déplacer le fichier html dans le dossier slug,
# et le renommer en index.html ensuite pour ne pas modifier l'index du blog
- contenu_index_html += f"
{annee} - {article_name}"
+ contenu_index_html += f"
{date_str} - {article_name}"
mylog(" -------- créer le dossier de l article ", new_folder_path_this_article)
os.makedirs(os.path.dirname(new_folder_path_this_article), exist_ok=True)
mylog('chemin_fichier_this_article_html',chemin_fichier_this_article_html)
diff --git a/concat_list_billets.sh b/concat_list_billets.sh
index d995eb23..72fb422c 100644
--- a/concat_list_billets.sh
+++ b/concat_list_billets.sh
@@ -26,7 +26,7 @@ echo "" > "$output_orgfile_list_billets"
# Réinitialisation du fichier de sortie
echo "" > "sources/$dossier/build/latests_posts.org"
-echo "billets sur la page d'accueil : $count_derniers_billets"
+echo "=========== billets sur la page d'accueil : $count_derniers_billets"
ls -nr sources/$dossier/lang_fr/*.org | head -n $count_derniers_billets
# ls -n sources/$dossier/lang_en/*.org | head -n $count_derniers_billets
# Récupération des derniers billets pour chaque langue
@@ -42,13 +42,14 @@ for file in $(ls -nr sources/$dossier/lang_fr/*.org | head -n $count_derniers_bi
done
-echo "Les $count_derniers_billets derniers billets ont été concaténés dans $output_orgfile_list_billets"
+echo "=========== Les $count_derniers_billets derniers billets ont été concaténés dans $output_orgfile_list_billets"
# cp "sources/$dossier/build/latests_posts_$langue_liste.org" "sources/$dossier/build/latests_posts.org"
#
pandoc "$output_orgfile_list_billets" -o "sources/$dossier/build/latests_posts.html"
#
-echo "conversion en html ok. Consulter le rendu:"
+echo "=========== conversion en html ok. Consulter le rendu:"
echo " "
echo "firefox \"sources/$dossier/build/latests_posts.html\""
echo " "
+echo "=========== "
diff --git a/enrich_html.py b/enrich_html.py
index 38a6e0a4..2ec42ca4 100755
--- a/enrich_html.py
+++ b/enrich_html.py
@@ -90,7 +90,8 @@ def enrich_one_file(html_content: str, partials: dict = {"header_page": "", "foo
Fukushima
]]
diff --git a/sass_styles.sh b/sass_styles.sh index dcf6334a..62240de8 100644 --- a/sass_styles.sh +++ b/sass_styles.sh @@ -3,9 +3,8 @@ # https://sass-lang.com sass templates/styles_src/style_general.scss templates/styles/style_general.css - -cp templates/styles/style_general.css html-websites/tykayn_blog/style.css -cp templates/styles/style_general.css html-websites/qzine_blog/style.css -cp templates/styles/style_general.css html-websites/cil_gometz/style.css -cp templates/styles/style_general.css html-websites/helia_blog/style.css -cp templates/styles/style_general.css html-websites/cipherbliss_blog/style.css \ No newline at end of file +for i in $(ls html-websites); +do + echo "copier templates/styles/style_general.css vers html-websites/$i/style.css" + cp templates/styles/style_general.css html-websites/$i/style.css; +done; \ No newline at end of file diff --git a/utils.py b/utils.py index 6dec8c14..4ebf3527 100644 --- a/utils.py +++ b/utils.py @@ -78,16 +78,11 @@ def find_year_and_slug_on_filename(fichier): date_str = boom[0] annee = date_str[:4] slug = boom[1].replace('.org', '') - # date = datetime.strptime(date_str, "%Y%m%dT%H%M%S") # Convertir la date en objet datetime if "-" in date_str: slug = enlever_premier_tiret_ou_underscore(slug) - # mylog(f" find_year_and_slug : Fichier: {fichier}") - # mylog(f" find_year_and_slug : année: {annee}") - # mylog(f" find_year_and_slug : str(date): {str(date)}") - # mylog(f" find_year_and_slug : slug: {slug}") mylog(f" find_year_and_slug : chemin: {annee}/{slug}/") return [date_str, annee, slug] return [date_str, annee, fichier.replace(' ', '-').replace('.org', '')]