{% extends "base.html" %} {% block title %}{{ result.document_name }} - Détails{% endblock %} {% block content %} {# Dictionnaire de traduction des types de chunks #} {% set chunk_types = { 'main_content': {'label': 'Contenu principal', 'icon': '📄', 'desc': 'Paragraphe de contenu substantiel', 'color': 'rgba(125, 110, 88, 0.15)'}, 'exposition': {'label': 'Exposition', 'icon': '📖', 'desc': 'Présentation d\'idées ou de contexte', 'color': 'rgba(85, 107, 99, 0.15)'}, 'argument': {'label': 'Argument', 'icon': '💭', 'desc': 'Raisonnement ou argumentation', 'color': 'rgba(164, 132, 92, 0.15)'}, 'définition': {'label': 'Définition', 'icon': '📌', 'desc': 'Définition de concept ou terme', 'color': 'rgba(125, 110, 88, 0.2)'}, 'example': {'label': 'Exemple', 'icon': '💡', 'desc': 'Illustration ou cas pratique', 'color': 'rgba(218, 188, 134, 0.2)'}, 'citation': {'label': 'Citation', 'icon': '💬', 'desc': 'Citation d\'auteur ou référence', 'color': 'rgba(85, 107, 99, 0.2)'}, 'abstract': {'label': 'Résumé', 'icon': '📋', 'desc': 'Résumé ou synthèse', 'color': 'rgba(164, 132, 92, 0.2)'}, 'preface': {'label': 'Préface', 'icon': '✍️', 'desc': 'Préface, avant-propos ou avertissement', 'color': 'rgba(85, 107, 99, 0.15)'}, 'conclusion': {'label': 'Conclusion', 'icon': '🎯', 'desc': 'Conclusion d\'une argumentation', 'color': 'rgba(125, 110, 88, 0.2)'} } %}

📄 {{ result.document_name }}

Détails du document traité

· · ·
{{ result.pages or 0 }}
Pages
{{ result.chunks_count or 0 }}
Chunks
{% if result.weaviate_ingest and result.weaviate_ingest.success %}
{{ result.weaviate_ingest.count }}
Dans Weaviate
{% endif %} {% if result.toc %}
{{ result.flat_toc|length if result.flat_toc else result.toc|length }}
Entrées TOC
{% endif %}

📖 Informations du document

{% if result.metadata.title %} {% endif %} {% if result.metadata.author %} {% endif %} {% if result.metadata.publisher %} {% endif %} {% if result.metadata.year %} {% endif %} {% if result.metadata.doi %} {% endif %} {% if result.metadata.isbn %} {% endif %}
Titre {{ result.metadata.title }}
Auteur {{ result.metadata.author }}
Éditeur {{ result.metadata.publisher }}
Année {{ result.metadata.year }}
DOI {{ result.metadata.doi }}
ISBN {{ result.metadata.isbn }}
Pages {{ result.pages or 0 }}
Chunks {{ result.chunks_count or 0 }} segments de texte
{% if result.toc and result.toc|length > 0 %}

📑 Table des matières ({{ result.flat_toc|length if result.flat_toc else '?' }} entrées)

    {% macro render_toc(items) %} {% for item in items %}
  • {{ item.title }}
    {% if item.children and item.children|length > 0 %}
      {{ render_toc(item.children) }}
    {% endif %}
  • {% endfor %} {% endmacro %} {{ render_toc(result.toc) }}
{% endif %}

📁 Fichiers générés

{% if result.files.markdown %} {% endif %} {% if result.files.chunks %} {% endif %} {% if result.files.weaviate %} {% endif %}
Markdown Voir le fichier
Chunks JSON Voir le fichier
OCR brut Voir le fichier
Weaviate JSON Voir le fichier
{% if result.chunks and result.chunks|length > 0 %}

📝 Passages ({{ result.chunks|length }})

{% for chunk in result.chunks %} {% set level = chunk.section_level or chunk.sectionLevel or 1 %}
{% if chunk.chapter_title and chunk.chapter_title != chunk.section and level > 1 %} {{ chunk.chapter_title }} › {% endif %} {% if chunk.subsection_title and chunk.subsection_title != chunk.chapter_title and chunk.subsection_title != chunk.section %} {{ chunk.subsection_title }} › {% endif %} {% if chunk.paragraph_number %} § {{ chunk.paragraph_number }} {% endif %} {% if level == 1 %}📚{% elif level == 2 %}📖{% else %}📄{% endif %} {{ chunk.section or 'Sans section' }} {% if chunk.type %} {% set type_info = chunk_types.get(chunk.type, {'label': chunk.type, 'icon': '📝', 'desc': 'Type de contenu', 'color': 'rgba(125, 110, 88, 0.15)'}) %} {{ type_info.icon }} {{ type_info.label }} {% endif %}
{% if chunk.summary %}
{{ chunk.summary[:100] }}{% if chunk.summary|length > 100 %}...{% endif %}
{% endif %}
{{ chunk.chunk_id or 'chunk_' ~ loop.index0 }}
{% set level = chunk.section_level or chunk.sectionLevel or 1 %}
{% if chunk.chapter_title and chunk.chapter_title != chunk.section %} 📚 {{ chunk.chapter_title }} {% endif %} {% if chunk.section %} {% if level == 1 %}📖{% elif level == 2 %}📄{% else %}📃{% endif %} {{ chunk.section }} {% endif %} {% if chunk.type %} {% set type_info = chunk_types.get(chunk.type, {'label': chunk.type, 'icon': '📝', 'desc': 'Type de contenu', 'color': 'rgba(125, 110, 88, 0.15)'}) %} {{ type_info.icon }} {{ type_info.label }} {% endif %} Niv. {{ level }} {% if chunk.paragraph_number %} § {{ chunk.paragraph_number }} {% endif %}
{% if chunk.concepts and chunk.concepts|length > 0 %}
{% for concept in chunk.concepts %} {{ concept }} {% endfor %}
{% endif %}
{{ chunk.text }}
{% endfor %}
{% endif %} {% if result.weaviate_ingest %}

🗄️ Ingestion Weaviate

{% if result.weaviate_ingest.success %}
✓ Ingestion réussie : {{ result.weaviate_ingest.count }} passages insérés dans la collection Passage
{% else %}
⚠️ Erreur d'ingestion : {{ result.weaviate_ingest.error }}
{% endif %}
{% endif %} {% if result.files.images %}

🖼️ Images extraites ({{ result.files.images|length }})

{% for img in result.files.images[:12] %}
Image
{{ img.split('/')[-1].split('\\')[-1] }}
{% endfor %} {% if result.files.images|length > 12 %}
+ {{ result.files.images|length - 12 }} autres
{% endif %}
{% endif %}
← Retour aux documents Analyser un autre PDF
{% endblock %}