mirror of
https://forge.chapril.org/tykayn/orgmode-to-gemini-blog
synced 2025-06-20 09:04:42 +02:00
generate tags pages with jinja template
This commit is contained in:
parent
8e32423dce
commit
367c7754c6
8 changed files with 178 additions and 42 deletions
10
utils.py
10
utils.py
|
@ -192,9 +192,13 @@ def add_tags_from_content(tags=None, file_content="", words_to_check=None):
|
|||
# Parcourir chaque mot à vérifier
|
||||
for word in words_to_check:
|
||||
# Vérifier si le mot est présent dans le contenu du fichier
|
||||
if word.lower() in file_content_lower:
|
||||
# Ajouter le tag correspondant à l'ensemble de tags
|
||||
tags.add(word)
|
||||
# Chercher une correspondance sans mettre en lowercase si le tag est en majuscule, c'est sans doute un acronyme/sigle.
|
||||
if word.isupper():
|
||||
if word in file_content:
|
||||
tags.add(word)
|
||||
else:
|
||||
if word.lower() in file_content_lower:
|
||||
tags.add(word)
|
||||
|
||||
return tags
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue