diff --git a/CHANGELOG.md b/CHANGELOG.md index f3924f3..dc748ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ Format basé sur [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/), et [Semantic Versioning](https://semver.org/spec/v2.0.0.html). > **En cours de développement** : les changements à venir sont listés dans la section -> [Unreleased](#unreleased). La dernière version livrée est **2.13.0**. +> [Unreleased](#unreleased). La dernière version livrée est **2.13.1**. --- @@ -14,6 +14,10 @@ et [Semantic Versioning](https://semver.org/spec/v2.0.0.html). --- +## [2.13.1] — 2026-09-18 + +--- + ## [2.13.0] — 2026-09-18 ### Ajouté @@ -41,6 +45,18 @@ et [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Source de vérité du nouveau contenu : `scripts/guide_content.py` (locales générées, jamais éditées à la main). Tests : `tests/test_guide.py` (11). +### Modifié (ajustements retour utilisateur sur #105) + +- Boutons de téléchargement du guide : **icônes seules** (plus de libellé « Markdown »/ + « PDF »), tooltip i18n explicite sur chaque bouton. +- PDF du guide : le bloc Mermaid de la section Architecture est converti en **diagramme + rendu** (PNG pré-rendu commité via `scripts/build_guide_diagrams.py` + + `scripts/render_guide_diagram.mjs`, inséré par `diagram_png_for()`), au lieu du code + brut ; le Markdown garde le fenced ` ```mermaid ` (copiable). +- PDF du guide : emoji rendus **en couleur** au lieu de rectangles — `fonts-noto-color-emoji` + ajouté à l'image Docker et `"Noto Color Emoji"` en fin de pile de polices du PDF + (la TOC était correcte car elle utilise DejaVu, qui n'a pas les emoji pleine chasse). + ### Corrigé - **BUG-067 - Guide : entrée « 📱 Mobile » morte** : le sommaire pointait vers diff --git a/Dockerfile b/Dockerfile index cdb5f52..e105833 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ COPY --from=builder /install /usr/local # WeasyPrint runtime dependencies RUN apt-get update \ - && apt-get install -y --no-install-recommends libpango-1.0-0 libpangocairo-1.0-0 shared-mime-info \ + && apt-get install -y --no-install-recommends libpango-1.0-0 libpangocairo-1.0-0 shared-mime-info fonts-noto-color-emoji \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/README.fr.md b/README.fr.md index c88cba8..ac675f5 100644 --- a/README.fr.md +++ b/README.fr.md @@ -4,7 +4,7 @@ **Porte d'entrée web ultra-léger pour vos vaults Obsidian** — Accédez, naviguez et recherchez dans toutes vos notes Obsidian depuis n'importe quel appareil via une interface web moderne et responsive. -[![Version](https://img.shields.io/badge/Version-2.13.0-blue.svg)]() +[![Version](https://img.shields.io/badge/Version-2.13.1-blue.svg)]() [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](https://www.docker.com/) [![Python](https://img.shields.io/badge/Python-3.11+-green.svg)](https://www.python.org/) @@ -927,8 +927,8 @@ Ce projet est sous licence **MIT** — voir le fichier [LICENSE](LICENSE) pour l ## 📝 Changelog -Consultez le [CHANGELOG.md](./CHANGELOG.md) pour l'historique complet de toutes les versions (v1.0.0 → v2.13.0). +Consultez le [CHANGELOG.md](./CHANGELOG.md) pour l'historique complet de toutes les versions (v1.0.0 → v2.13.1). --- -*Projet : ObsiGate | Version : 2.13.0 | Dernière mise à jour : Juin 2026* +*Projet : ObsiGate | Version : 2.13.1 | Dernière mise à jour : Juin 2026* diff --git a/README.md b/README.md index ec14699..a1b1332 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Ultra-light web gateway for your Obsidian vaults** — Access, browse, and search all your Obsidian notes from any device via a modern, responsive web interface. -[![Version](https://img.shields.io/badge/Version-2.13.0-blue.svg)]() +[![Version](https://img.shields.io/badge/Version-2.13.1-blue.svg)]() [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](https://www.docker.com/) [![Python](https://img.shields.io/badge/Python-3.11+-green.svg)](https://www.python.org/) @@ -1096,8 +1096,8 @@ This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) ## 📝 Changelog -See [CHANGELOG.md](./CHANGELOG.md) for the complete version history (v1.0.0 → v2.13.0). +See [CHANGELOG.md](./CHANGELOG.md) for the complete version history (v1.0.0 → v2.13.1). --- -*Project: ObsiGate | Version: 2.13.0 | Last updated: May 2026* +*Project: ObsiGate | Version: 2.13.1 | Last updated: May 2026* diff --git a/VERSION b/VERSION index fb2c076..94f15e9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.13.0 +2.13.1 diff --git a/backend/assets/guide_diagrams/df7366a40db6a5a2.png b/backend/assets/guide_diagrams/df7366a40db6a5a2.png new file mode 100644 index 0000000..e76b1a0 Binary files /dev/null and b/backend/assets/guide_diagrams/df7366a40db6a5a2.png differ diff --git a/backend/guide_export.py b/backend/guide_export.py index aac2800..cd66d74 100644 --- a/backend/guide_export.py +++ b/backend/guide_export.py @@ -13,6 +13,7 @@ quand les bibliothèques natives GTK manquent (Windows). from __future__ import annotations import datetime +import hashlib import html import json import logging @@ -26,6 +27,17 @@ ROOT = Path(__file__).resolve().parent.parent INDEX_HTML = ROOT / "frontend" / "index.html" LOCALES_DIR = ROOT / "frontend" / "locales" VERSION_FILE = ROOT / "VERSION" +DIAGRAMS_DIR = ROOT / "backend" / "assets" / "guide_diagrams" + + +def diagram_png_for(code: str) -> Path | None: + """Chemin du PNG pré-rendu (scripts/build_guide_diagrams.py) pour un code + Mermaid, ou None. Le hash doit rester synchrone avec le script de build : + sha1(unescape(code).strip())[:16].""" + normalized = html.unescape(code).strip() + sha = hashlib.sha1(normalized.encode("utf-8")).hexdigest()[:16] + png = DIAGRAMS_DIR / (sha + ".png") + return png if png.exists() else None # Éléments décoratifs exclus des exports _SKIP_CLASSES = {"help-hero-visual", "editor-modal", "help-nav"} @@ -388,8 +400,15 @@ def _html_block(node: Node | str, out: list[str], loc: dict[str, str]) -> None: tag = node.tag if tag == "pre": - raw = html.escape(_pre_text(node), quote=False) - out.append(f"
{raw}
") + raw = _pre_text(node) + classes = _pre_classes(node) + if "language-mermaid" in classes: + png = diagram_png_for(raw) + if png is not None: + url = "file:///" + str(png).replace("\\", "/").lstrip("/") + out.append(f'') + return + out.append(f"
{html.escape(raw, quote=False)}
") return kids = _resolve_i18n(node, loc) diff --git a/backend/pdf_export.py b/backend/pdf_export.py index 139dfbf..3aea691 100644 --- a/backend/pdf_export.py +++ b/backend/pdf_export.py @@ -43,7 +43,7 @@ def build_pdf_html(body_html: str, title: str, theme: str = "light") -> str: {title}