Dernières modifications
This commit is contained in:
parent
c2cf505b48
commit
8a601aa24a
@ -701,6 +701,9 @@ def generate_critical_paths_section(data, results):
|
|||||||
|
|
||||||
return "\n".join(template)
|
return "\n".join(template)
|
||||||
|
|
||||||
|
def slugify(text):
|
||||||
|
return re.sub(r'\W+', '-', text.strip()).strip('-').lower()
|
||||||
|
|
||||||
def generate_report(data, results, config):
|
def generate_report(data, results, config):
|
||||||
"""
|
"""
|
||||||
Génère le rapport complet structuré selon les spécifications.
|
Génère le rapport complet structuré selon les spécifications.
|
||||||
@ -742,7 +745,8 @@ def generate_report(data, results, config):
|
|||||||
# Pour chaque mot-clé, écrire un fichier individuel
|
# Pour chaque mot-clé, écrire un fichier individuel
|
||||||
for mot_cle, contenu in chemins_critiques_sections.items():
|
for mot_cle, contenu in chemins_critiques_sections.items():
|
||||||
print(mot_cle)
|
print(mot_cle)
|
||||||
suffixe = f" - chemins critiques {mot_cle}"
|
mot_cle_slug = slugify(mot_cle)
|
||||||
|
suffixe = f" - chemins critiques {mot_cle_slug}"
|
||||||
fichier_personnalise = TEMPLATE_PATH.with_name(
|
fichier_personnalise = TEMPLATE_PATH.with_name(
|
||||||
TEMPLATE_PATH.name.replace(".md", f"{suffixe}.md")
|
TEMPLATE_PATH.name.replace(".md", f"{suffixe}.md")
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user