Pages légales : CGU et confidentialité prêtes à publier, liens en pied de page (tâche #132)
- cgu.html, confidentialite.html : version 1.0, marques [À COMPLÉTER]/[À VÉRIFIER] et bandeau « projet » retirés, « Service non ouvert » remplacé (forum ouvert le 05/11/2026), IP des auteurs 12 mois (comme purge.py), option B (IP) supprimée - a-propos : mentions mises à jour (forum, cookie de session), pied de page avec mentions, CGU, confidentialité - liens en pied de page : climat, charte, 404, statistiques, forum ; <link rel> pointent vers /cgu et /confidentialite - assembler.py : publie cgu.html et confidentialite.html, ne retire plus leurs liens, sitemap complété Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cette révision appartient à :
1 Parent
1df8be2be1
révision
bac5ee08bc
11 fichiers modifiés
+74
-99
Aucun fichier ne correspond à votre recherche
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Assemble le site publiable de vercors.me dans <projet>/site-v2/ à partir de la maquette.
|
||||
|
||||
site-v2/index.html, a-propos.html, statistiques.html, 404.html, llms.txt, llms-full.txt, (cgu.html, confidentialite.html si présents), polices/, tuiles/, data/ (vide)
|
||||
site-v2/index.html, a-propos.html, statistiques.html, 404.html, llms.txt, llms-full.txt, cgu.html, confidentialite.html, polices/, tuiles/, data/ (vide)
|
||||
Les JSON de données (data/*.json, data/semaine/) sont produits sur cornafserver et copiés sur le serveur public à part.
|
||||
Usage : python assembler.py
|
||||
"""
|
||||
@@ -12,8 +12,8 @@ import sys
|
||||
|
||||
ICI = os.path.dirname(os.path.abspath(__file__))
|
||||
DEST = os.path.join(os.path.dirname(os.path.dirname(ICI)), "site-v2")
|
||||
# CGU et confidentialité : retirées de la version publique jusqu'à la relecture juridique (textes dans maquettes/ et Documents/Meteo-Vercors/08-Juridique)
|
||||
PAGES = ("index.html", "a-propos.html", "statistiques.html", "climat.html")
|
||||
# CGU et confidentialité publiées avec le reste (conformité F1/F2, tâche #132) ; sources de rédaction : Documents/Meteo-Vercors/08-Juridique
|
||||
PAGES = ("index.html", "a-propos.html", "statistiques.html", "climat.html", "cgu.html", "confidentialite.html")
|
||||
|
||||
|
||||
def main():
|
||||
@@ -23,19 +23,10 @@ def main():
|
||||
src = os.path.join(ICI, "a-propos-build.html" if nom == "a-propos.html" else nom)
|
||||
if os.path.exists(src):
|
||||
shutil.copy(src, os.path.join(DEST, nom))
|
||||
# forum non ouvert : pas de lien vers des pages qui n'existent pas encore en ligne
|
||||
ip = os.path.join(DEST, "index.html")
|
||||
t = open(ip, encoding="utf-8").read()
|
||||
t = re.sub(r'<li><a href="(?:cgu|confidentialite)\.html"[^>]*>[^<]*</a></li>', '', t) # pages en attente de l'avocate
|
||||
# forum ouvert le 05/11/2026 : les liens /forum/ restent tels quels
|
||||
open(ip, "w", encoding="utf-8").write(t)
|
||||
# statistiques : CGU et confidentialité non publiées, on retire leurs liens de la page copiée
|
||||
sp = os.path.join(DEST, "statistiques.html")
|
||||
if os.path.exists(sp):
|
||||
t = open(sp, encoding="utf-8").read()
|
||||
t = t.replace(' Voir la <a href="confidentialite.html">politique de confidentialité</a>.', '')
|
||||
t = t.replace('<a href="cgu.html">Conditions d\'utilisation</a> · <a href="confidentialite.html">Confidentialité</a> · ', '')
|
||||
open(sp, "w", encoding="utf-8").write(t)
|
||||
for fixe in ("404.html", "llms.txt", "llms-full.txt", "charte.html", "charte-vercors.pdf"):
|
||||
if os.path.exists(os.path.join(ICI, fixe)):
|
||||
shutil.copy(os.path.join(ICI, fixe), os.path.join(DEST, fixe))
|
||||
@@ -51,7 +42,7 @@ def main():
|
||||
os.makedirs(os.path.join(DEST, ".well-known"), exist_ok=True)
|
||||
for fixe in ("security.txt", "tdmrep.json"):
|
||||
shutil.copy(os.path.join(ICI, "well-known", fixe), os.path.join(DEST, ".well-known", fixe))
|
||||
urls = "".join("<url><loc>https://vercors.me/%s</loc></url>" % u for u in ("", "climat", "a-propos", "statistiques", "charte", "forum/"))
|
||||
urls = "".join("<url><loc>https://vercors.me/%s</loc></url>" % u for u in ("", "climat", "a-propos", "statistiques", "cgu", "confidentialite", "charte", "forum/"))
|
||||
open(os.path.join(DEST, "sitemap.xml"), "w", encoding="utf-8").write('<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">%s</urlset>\n' % urls)
|
||||
for dossier in ("polices", "tuiles"):
|
||||
src = os.path.join(ICI, dossier)
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur