feat(gui): localiser les documents livrés + bouton ouvrir le dossier (P1-5)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-29 19:10:14 +02:00
parent 416b347d7f
commit 1d65d42430
3 changed files with 193 additions and 0 deletions

25
gui_v6/fsutil.py Normal file
View File

@@ -0,0 +1,25 @@
"""Ouverture du gestionnaire de fichiers sur un dossier (cross-plateforme).
Best-effort : ne lève jamais (un échec d'ouverture ne doit pas casser l'UI).
"""
from __future__ import annotations
import subprocess
import sys
from pathlib import Path
def open_in_file_manager(path) -> None:
"""Ouvre ``path`` dans l'explorateur de fichiers du système."""
target = str(Path(path))
try:
if sys.platform.startswith("win"):
import os
os.startfile(target) # type: ignore[attr-defined] # noqa: S606
elif sys.platform == "darwin":
subprocess.Popen(["open", target])
else:
subprocess.Popen(["xdg-open", target])
except Exception:
pass