mirror of
https://forge.chapril.org/tykayn/orgmode-to-gemini-blog
synced 2025-06-20 09:04:42 +02:00
up style
This commit is contained in:
parent
086287fad3
commit
1d224cb8e4
1995 changed files with 66244 additions and 8957 deletions
|
@ -161,32 +161,7 @@ def generer_index(dossier_source, fichier_index):
|
|||
contenu_index_html = f"{config_title}\n{'- ' * len(config_title)}\n\n"
|
||||
|
||||
contenu_index_gmi += "\n# Navigation\n-------------------------\n"
|
||||
contenu_index_html += "<h1>Navigation</h1>"
|
||||
for fichier in files_static:
|
||||
# print(" -------- fichier ", fichier)
|
||||
link_html = fichier.replace('.gmi', '.html')
|
||||
link_org = fichier.replace('.gmi', '.org')
|
||||
file_path_org = os.path.join(dossier_parent, "sources", website_name, link_org)
|
||||
article_name = trouver_nom_article(file_path_org, 'org')
|
||||
|
||||
if article_name:
|
||||
contenu_index_gmi += f"=> {fichier} {article_name}\n"
|
||||
else:
|
||||
contenu_index_gmi += f"=> {fichier}\n"
|
||||
|
||||
if fichier != "index.gmi":
|
||||
# print(' -------- rechercher le nom de l article dans le fichier ')
|
||||
if use_article_file_for_name:
|
||||
article_name = link_html
|
||||
else:
|
||||
article_name = trouver_nom_article(file_path_org, 'org')
|
||||
|
||||
if not article_name:
|
||||
article_name = link_html
|
||||
else:
|
||||
article_name = 'Index'
|
||||
article_name = article_name.replace('_', ' ')
|
||||
contenu_index_html += f"<br><a href=/{link_html}>{article_name}</a>"
|
||||
|
||||
# ne préciser la langue français que si on a des articles en Anglais
|
||||
if len(files_en):
|
||||
|
@ -222,6 +197,33 @@ def generer_index(dossier_source, fichier_index):
|
|||
else:
|
||||
contenu_index_html += f"<br><a href=/{lang_folder}/{link_html}>{link_html}</a>"
|
||||
|
||||
contenu_index_html += "<hr/>"
|
||||
contenu_index_html += "<h1>Navigation</h1>"
|
||||
for fichier in files_static:
|
||||
# print(" -------- fichier ", fichier)
|
||||
link_html = fichier.replace('.gmi', '.html')
|
||||
link_org = fichier.replace('.gmi', '.org')
|
||||
file_path_org = os.path.join(dossier_parent, "sources", website_name, link_org)
|
||||
article_name = trouver_nom_article(file_path_org, 'org')
|
||||
|
||||
if article_name:
|
||||
contenu_index_gmi += f"=> {fichier} {article_name}\n"
|
||||
else:
|
||||
contenu_index_gmi += f"=> {fichier}\n"
|
||||
|
||||
if fichier != "index.gmi":
|
||||
# print(' -------- rechercher le nom de l article dans le fichier ')
|
||||
if use_article_file_for_name:
|
||||
article_name = link_html
|
||||
else:
|
||||
article_name = trouver_nom_article(file_path_org, 'org')
|
||||
|
||||
if not article_name:
|
||||
article_name = link_html
|
||||
else:
|
||||
article_name = 'Index'
|
||||
article_name = article_name.replace('_', ' ')
|
||||
contenu_index_html += f"<br><a href=/{link_html}>{article_name}</a>"
|
||||
# ---------------- pareil en anglais TODO
|
||||
# contenu_index_gmi += "\n# Articles in English\n-------------------------\n"
|
||||
# contenu_index_html += "<h1>Articles in English</h1>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue