BookOCR

Application qui transforme un PDF de livre (scanné ou texte) en édition numérique fidèle et restructurée : Markdown étendu (source de vérité), PDF Typst et EPUB3 — 100 % local
📸 Aperçu
| Pipeline | Export |
|---|---|
![]() |
![]() |
📖 À propos
Application bureau qui transforme un PDF de livre (scanné ou texte) en édition numérique fidèle et restructurée : Markdown étendu (source de vérité), PDF Typst et EPUB3 — 100 % local par défaut (Ollama), APIs cloud optionnelles plus tard.
État : développement initial. Le pipeline et l’UI ci-dessous décrivent la cible produit ; l’implémentation avance par étapes.
🎯 Objectifs
- OCR / extraction fidèle — conserver le texte d’origine, y compris fautes et particularités. Aucune « correction » orthographique.
- Structure sensible à la mise en page — titres, notes de bas de page, notes de fin, en-têtes/pieds, figures + légendes, tableaux, citations, numéros de pages source.
- Recomposition typographique — agencement logique (pas un clone pixel du scan) ; styles d’export : academic / essay / novel.
- Préserver le front matter existant — réutiliser TOC, index et glossaire imprimés lorsqu’ils existent. La génération à la demande est prévue en V2 seulement.
- Automatique ou semi-automatique — revue humaine quand le pipeline doute (type de page, structure, appariement).
- Un livre à la fois, priorité à la qualité de sortie.
- Langues (livres + interface) : français, anglais, allemand, italien, espagnol.
- Cibles : sciences sociales universitaires, essais, romans. Pas de maths/formules pour l’instant ; jamais manga/BD.
🔄 Pipeline (vue d’ensemble)
PDF en entrée
├─ plutôt texte → OpenDataLoader PDF → normalisation → BookMD
└─ scan / aplati → prétraitement → rasterisation → Unlimited-OCR (Ollama)
→ parse des régions (type + bbox)
→ validation Clef-Flash (doute → gate humain)
→ normalisation → BookMD
BookMD
→ extraction TOC / index / glossaire existants
→ confirmation des métadonnées
→ export Markdown + PDF Typst + EPUB3
- Classifier — texte extractible vs scan (ou aplatir un mauvais PDF texte vers le chemin scan).
- PDF texte — OpenDataLoader PDF (plus léger que l’OCR quand ça suffit).
- Scans — redressement / contraste / recadrage (lisibilité seule), puis richardyoung/unlimited-ocr via Ollama (OCR layout avec boîtes ; compatible GPU AMD via Ollama).
- Décisions — clef-flash pour le type de page (
body,toc,index,glossary, …), heuristiques de notes, gates si confiance basse. - BookMD — Markdown étendu canonique (voir ci-dessous).
- Exports — Markdown + assets ; PDF via Typst ; EPUB3 via Pandoc (notes cliquables, pagebreaks, navigation).
Les stacks CUDA officielles Unlimited-OCR (Transformers / vLLM / SGLang) ne sont pas le chemin par défaut (GGUF Ollama, adapté AMD).
📝 BookMD (format canonique)
Le Markdown étendu est la source de vérité interne.
| Besoin | Convention |
|---|---|
| Page source | <!-- page: N --> (aussi mappé en labels Typst et pagebreaks EPUB3) |
| Notes | Inline Pandoc : ^[texte de la note] |
| Notes de fin / fin de chapitre | ^[<!-- note:end -->…] · ^[<!-- note:chapter-end -->…] (toujours inline dans le MD ; les exporteurs regroupent) |
| Figures |  + dossier assets |
| Tableaux | Markdown (HTML si besoin) |
| Citations | > … |
| En-têtes / pieds | Marqués / métadonnées — pas mélangés silencieusement au corps |
Les numéros de page figurent dans le Markdown, dans le PDF Typst le cas échéant, et comme marqueurs de pagebreak EPUB3 (pas forcément visibles dans le lecteur, mais présents dans le paquet).
📚 Politique d’enrichissement
| Élément | V1 | V2 |
|---|---|---|
| TOC | Détecter et préserver le sommaire imprimé ; lier aux chapitres si fiable | Générer depuis les titres à la demande |
| Index | Détecter et préserver l’index existant | Générer à la demande |
| Glossaire | Détecter et préserver le glossaire existant | Génération assistée à la demande |
| Métadonnées | Préremplir (page de titre / copyright) + confirmation | — |
Aucune génération silencieuse de TOC / index / glossaire en V1.
🧩 Stack
| Couche | Choix |
|---|---|
| Coque applicative | Tauri 2 + React / TypeScript |
| Pipeline | Rust (src-tauri, crates/bookmd) |
| Modèles locaux | Ollama — Unlimited-OCR + Clef-Flash |
| PDF texte | OpenDataLoader PDF (Java 11+) |
| Export PDF | Templates Typst (academic, essay, novel) |
| Export EPUB | Pandoc → EPUB3 |
| Licence | MIT |
Les fournisseurs cloud optionnels passeront par un trait Provider commun (désactivé par défaut).
📁 Organisation du dépôt
ATBookOCR/
README.md / README.en.md / README.de.md / README.es.md
LICENSE
src/ # UI React
src-tauri/ # Tauri + orchestration pipeline Rust
crates/bookmd/ # Parse / sérialisation BookMD
templates/typst/ # Styles d’export
📦 Dépendances externes
À installer et rendre disponibles dans le PATH (l’app les détecte au démarrage) :
- Ollama (version requise par Clef-Flash ; actuellement ≥ 0.35.1)
- Modèles (à tirer quand prêt) :
ollama pull richardyoung/unlimited-ocrollama pull clef-flash
- Java 11+ et CLI OpenDataLoader PDF
- Typst
- Pandoc
GPU : NVIDIA ou AMD via les backends supportés par Ollama ; CPU possible mais plus lent.
🖥 Interface (V1)
Parcours guidé minimal — pas d’éditeur Markdown intégré :
- Choisir le PDF + dossier de sortie
- Réglages (modèles Ollama, chemins des outils)
- Progression du pipeline
- Gates de revue en cas de doute (structure de page, etc.)
- Confirmer les métadonnées + aperçu du TOC / index / glossaire détectés + style d’export
- Exporter Markdown / PDF / EPUB
Langues UI : FR, EN, DE, IT, ES.
💻 Développement
# Prérequis : Node.js, Rust, prérequis Tauri pour votre OS
# https://v2.tauri.app/start/prerequisites/
npm install
npm run tauri dev
Build :
npm run tauri build
🗺 Feuille de route (courte)
- Scaffold Tauri + i18n + détection des dépendances
- Crate
bookmd+ tests - Branche PDF texte (OpenDataLoader → BookMD)
- Branche scan (prétraitement + Unlimited-OCR → BookMD)
- Clef-Flash + gates humains
- PDF Typst + EPUB3 Pandoc
- Extraction TOC / index / glossaire existants + métadonnées
- V2 — génération à la demande si absents
🤝 Contribution
Issues et PR bienvenues. Préférer des changements petits et relisibles. La fidélité du texte source est une règle non négociable.
🙏 Remerciements
- Baidu Unlimited-OCR et le build GGUF Ollama
- Clef-Flash (modèles décisionnels Cloudflare / Ollama)
- OpenDataLoader PDF
- Typst, Pandoc, Tauri, Ollama
📄 Licence
MIT — BookOCR by l’Atelier.
🌐 Liens
📸 Vorschau
| Pipeline | Export |
|---|---|
![]() |
![]() |
📖 Über
Desktop-Anwendung, die ein Buch-PDF (gescannt oder textbasiert) in eine getreue, neu strukturierte digitale Ausgabe verwandelt: erweitertes Markdown (Quelle der Wahrheit), Typst-PDF und EPUB3 — standardmäßig vollständig lokal (Ollama), optionale Cloud-APIs später.
Status: frühe Entwicklung. Pipeline und UI unten beschreiben das Produktziel; die Umsetzung erfolgt schrittweise.
🎯 Ziele
- Getreues OCR / Extraktion — Originalwortlaut behalten, inklusive Tippfehler und Eigenheiten. Keine orthografische „Verbesserung“.
- Layoutbewusste Struktur — Titel, Fußnoten, Endnoten, Kopf-/Fußzeilen, Abbildungen + Legenden, Tabellen, Zitate, Quellseitenzahlen.
- Typografische Neukomposition — logische Anordnung (kein Pixelklon des Scans); Exportstile: academic / essay / novel.
- Vorhandenes Front Matter bewahren — gedruckte TOC, Index und Glossar wiederverwenden, wenn vorhanden. Generierung auf Abruf erst in V2.
- Automatisch oder halbautomatisch — menschliche Prüfung, wenn die Pipeline unsicher ist (Seitentyp, Struktur, Zuordnung).
- Ein Buch gleichzeitig, Qualität vor Geschwindigkeit.
- Sprachen (Bücher + UI): Französisch, Englisch, Deutsch, Italienisch, Spanisch.
- Ziele: akademische Sozialwissenschaften, Essays, Romane. Keine Mathematik/Formeln vorerst; niemals Comics/Manga.
🔄 Pipeline (Überblick)
PDF-Eingabe
├─ textähnlich → OpenDataLoader PDF → Normalisierung → BookMD
└─ Scan/flach → Vorverarbeitung → Rasterisierung → Unlimited-OCR (Ollama)
→ Regionen parsen (Typ + bbox)
→ Clef-Flash-Validierung (Zweifel → menschliche Gate)
→ Normalisierung → BookMD
BookMD
→ vorhandene TOC / Index / Glossar extrahieren
→ Metadaten bestätigen
→ Export Markdown + Typst-PDF + EPUB3
- Klassifizieren — extrahierbarer Text vs Scan (oder schlechte Text-PDFs in den Scan-Pfad abflachen).
- Text-PDFs — OpenDataLoader PDF (leichter als OCR, wenn ausreichend).
- Scans — Entzerrung/Kontrast/Zuschnitt (nur Lesbarkeit), dann richardyoung/unlimited-ocr via Ollama (Layout-OCR mit Bounding Boxes; AMD-GPUs über Ollama).
- Entscheidungen — clef-flash für Seitentyp (
body,toc,index,glossary, …), Fußnotenheuristiken, Gates bei niedriger Konfidenz. - BookMD — kanonisches erweitertes Markdown (siehe unten).
- Exporte — Markdown + Assets; PDF via Typst; EPUB3 via Pandoc (klickbare Notizen, Seitenumbrüche, Navigation).
Offizielle Baidu-Unlimited-OCR-CUDA-Stacks (Transformers / vLLM / SGLang) sind nicht der Standardweg (stattdessen AMD-freundliches Ollama-GGUF).
📝 BookMD (kanonisches Format)
Erweitertes Markdown ist die interne Quelle der Wahrheit.
| Bedarf | Konvention |
|---|---|
| Quellseite | <!-- page: N --> (auch in Typst-Labels und EPUB3-Pagebreaks gemappt) |
| Fußnoten / Notizen | Pandoc inline: ^[Notiztext] |
| End- / Kapitelendnoten | ^[<!-- note:end -->…] · ^[<!-- note:chapter-end -->…] (weiterhin inline im MD; Exporteure gruppieren) |
| Abbildungen |  + Assets-Ordner |
| Tabellen | Markdown (HTML bei Bedarf) |
| Zitate | > … |
| Kopf-/Fußzeilen | Markiert / Metadaten — nicht stillschweigend in den Fließtext gemischt |
Seitenzahlen erscheinen im Markdown, im Typst-PDF wo sinnvoll und als EPUB3-Pagebreak-Marker (im Reader ggf. unsichtbar, aber im Paket vorhanden).
📚 Anreicherungsrichtlinie
| Element | V1 | V2 |
|---|---|---|
| TOC | Gedrucktes Inhaltsverzeichnis erkennen & bewahren; bei Zuverlässigkeit zu Kapiteln verlinken | Auf Abruf aus Überschriften erzeugen |
| Index | Vorhandenen Index erkennen & bewahren | Auf Abruf erzeugen |
| Glossar | Vorhandenes Glossar erkennen & bewahren | Assistierte Generierung auf Abruf |
| Metadaten | Vorfüllen (Titelseite / Copyright) + Bestätigung | — |
Keine stille Generierung von TOC / Index / Glossar in V1.
🧩 Stack
| Schicht | Wahl |
|---|---|
| Anwendungsschale | Tauri 2 + React / TypeScript |
| Kernpipeline | Rust (src-tauri, crates/bookmd) |
| Lokale Modelle | Ollama — Unlimited-OCR + Clef-Flash |
| Text-PDF | OpenDataLoader PDF (Java 11+) |
| PDF-Export | Typst-Templates (academic, essay, novel) |
| EPUB-Export | Pandoc → EPUB3 |
| Lizenz | MIT |
Optionale Cloud-LLM-Anbieter liegen hinter einem gemeinsamen Provider-Trait (standardmäßig aus).
📁 Repository-Struktur
ATBookOCR/
README.md / README.en.md / README.de.md / README.es.md
LICENSE
src/ # React-UI
src-tauri/ # Tauri + Rust-Pipeline-Orchestrierung
crates/bookmd/ # BookMD Parse / Serialisierung
templates/typst/ # Exportstile
📦 Externe Abhängigkeiten
Installieren und im PATH verfügbar machen (die App erkennt sie beim Start):
- Ollama ≥ von Clef-Flash geforderte Version (siehe Modellseite; derzeit 0.35.1+)
- Modelle (ziehen, wenn bereit):
ollama pull richardyoung/unlimited-ocrollama pull clef-flash
- Java 11+ und OpenDataLoader PDF-CLI
- Typst
- Pandoc
GPU: NVIDIA oder AMD über von Ollama unterstützte Backends; CPU funktioniert, ist aber langsamer.
🖥 UI (V1)
Minimaler geführter Ablauf — kein integrierter Markdown-Editor:
- PDF + Ausgabeordner wählen
- Einstellungen (Ollama-Modelle, Werkzeugpfade)
- Pipeline-Fortschritt
- Review-Gates bei Zweifel (Seitenstruktur usw.)
- Metadaten bestätigen + Vorschau der erkannten TOC / Index / Glossar + Exportstil
- Markdown / PDF / EPUB exportieren
UI-Sprachen: FR, EN, DE, IT, ES.
💻 Entwicklung
# Voraussetzungen: Node.js, Rust, Tauri-Voraussetzungen für Ihr OS
# https://v2.tauri.app/start/prerequisites/
npm install
npm run tauri dev
Build:
npm run tauri build
🗺 Roadmap (kurz)
- Scaffold Tauri + i18n + Abhängigkeitsprüfung
bookmd-Crate + Tests- Text-PDF-Zweig (OpenDataLoader → BookMD)
- Scan-Zweig (Vorverarbeitung + Unlimited-OCR → BookMD)
- Clef-Flash + menschliche Gates
- Typst-PDF + Pandoc-EPUB3
- Extraktion vorhandener TOC / Index / Glossar + Metadaten
- V2 — Generierung fehlender TOC / Index / Glossar auf Abruf
🤝 Mitwirken
Issues und PRs willkommen. Kleine, prüfbare Änderungen bevorzugen. Die Treue zum Quelltext ist unverhandelbar.
🙏 Danksagungen
- Baidu Unlimited-OCR und der Ollama-GGUF-Build
- Clef-Flash (Cloudflare-/Ollama-Entscheidungsmodelle)
- OpenDataLoader PDF
- Typst, Pandoc, Tauri, Ollama
📄 Lizenz
MIT — BookOCR by l’Atelier.
🌐 Links
📸 Preview
| Pipeline | Export |
|---|---|
![]() |
![]() |
📖 About
Desktop app that turns a book PDF (scanned or text-based) into a faithful, restructured digital edition: extended Markdown (source of truth), Typst PDF, and EPUB3 — fully local by default (Ollama), with optional cloud APIs later.
Status: early development. The pipeline and UI described below are the product target; implementation is incremental.
🎯 Goals
- Faithful OCR / extraction — keep the original wording, including typos and quirks. No spelling “improvement”.
- Layout-aware structure — titles, footnotes, endnotes, headers/footers, figures + captions, tables, quotations, source page numbers.
- Typographic recomposition — logical arrangement (not a pixel clone of the scan); export styles: academic / essay / novel.
- Preserve existing front matter — reuse printed TOC, index, and glossary when present. Generation on demand is planned for V2 only.
- Automatic or semi-automatic — human review when the pipeline is uncertain (page type, structure, matching).
- One book at a time, max output quality over speed.
- Languages (books + UI): French, English, German, Italian, Spanish.
- Targets: academic social sciences, essays, novels. No maths/formulas for now; never comics/manga.
🔄 Pipeline (overview)
PDF input
├─ text-like → OpenDataLoader PDF → normalize → BookMD
└─ scan/flat → preprocess → rasterize → Unlimited-OCR (Ollama)
→ parse regions (type + bbox)
→ Clef-Flash validation (doubt → human gate)
→ normalize → BookMD
BookMD
→ extract existing TOC / index / glossary
→ confirm metadata
→ export Markdown + Typst PDF + EPUB3
- Classify — extractable text vs scan (or flatten poor text PDFs into the scan path).
- Text PDFs — OpenDataLoader PDF (lighter than OCR when it works).
- Scans — deskew/contrast/crop (readability only), then richardyoung/unlimited-ocr via Ollama (layout OCR with bounding boxes; works on AMD GPUs through Ollama).
- Decisions — clef-flash for page type (
body,toc,index,glossary, …), footnote heuristics, low-confidence gates. - BookMD — canonical extended Markdown (see below).
- Exports — Markdown + assets; PDF via Typst; EPUB3 via Pandoc (clickable notes, page breaks, navigation).
Official Baidu Unlimited-OCR CUDA stacks (Transformers / vLLM / SGLang) are out of scope for the default path (AMD-friendly Ollama GGUF instead).
📝 BookMD (canonical format)
Extended Markdown is the internal source of truth.
| Concern | Convention |
|---|---|
| Source page | <!-- page: N --> (also mapped into Typst labels and EPUB3 pagebreaks) |
| Footnotes / notes | Pandoc inline: ^[note text] |
| End / chapter-end notes | ^[<!-- note:end -->…] · ^[<!-- note:chapter-end -->…] (still inline in MD; exporters regroup) |
| Figures |  + assets folder |
| Tables | Markdown (HTML when needed) |
| Quotations | > … |
| Headers/footers | Marked / metadata — not silently mixed into body |
Page numbers appear in Markdown, in the Typst PDF where appropriate, and as EPUB3 pagebreak markers (may be invisible in the reader UI but present in the package).
📚 Enrichment policy
| Element | V1 | V2 |
|---|---|---|
| TOC | Detect & preserve printed table of contents; link to chapters when reliable | Generate from headings on demand |
| Index | Detect & preserve existing index | Generate on demand |
| Glossary | Detect & preserve existing glossary | Assisted generation on demand |
| Metadata | Prefill (title page / copyright) + user confirmation | — |
No silent generation of TOC / index / glossary in V1.
🧩 Stack
| Layer | Choice |
|---|---|
| App shell | Tauri 2 + React / TypeScript |
| Core pipeline | Rust (src-tauri, crates/bookmd) |
| Local models | Ollama — Unlimited-OCR + Clef-Flash |
| Text PDF | OpenDataLoader PDF (Java 11+) |
| PDF export | Typst templates (academic, essay, novel) |
| EPUB export | Pandoc → EPUB3 |
| License | MIT |
Optional cloud LLM providers will sit behind a common Provider trait (off by default).
📁 Repository layout
ATBookOCR/
README.md / README.en.md / README.de.md / README.es.md
LICENSE
src/ # React UI
src-tauri/ # Tauri + Rust pipeline orchestration
crates/bookmd/ # BookMD parse / serialize
templates/typst/ # Export styles
📦 External dependencies
Install and ensure they are on PATH (the app will detect them at startup):
- Ollama ≥ version required by Clef-Flash (see model page; currently 0.35.1+)
- Models (pull when ready):
ollama pull richardyoung/unlimited-ocrollama pull clef-flash
- Java 11+ and OpenDataLoader PDF CLI
- Typst
- Pandoc
GPU: NVIDIA or AMD via Ollama’s supported backends; CPU works but is slower.
🖥 UI (V1)
Minimal guided flow — no built-in Markdown editor:
- Choose PDF + output folder
- Settings (Ollama models, tool paths)
- Pipeline progress
- Review gates on doubt (page structure, etc.)
- Confirm metadata + preview of detected TOC / index / glossary + export style
- Export Markdown / PDF / EPUB
UI languages: FR, EN, DE, IT, ES.
💻 Development
# Prerequisites: Node.js, Rust, Tauri prerequisites for your OS
# https://v2.tauri.app/start/prerequisites/
npm install
npm run tauri dev
Build:
npm run tauri build
🗺 Roadmap (short)
- Scaffold Tauri + i18n + dependency checks
bookmdcrate + tests- Text-PDF branch (OpenDataLoader → BookMD)
- Scan branch (preprocess + Unlimited-OCR → BookMD)
- Clef-Flash + human gates
- Typst PDF + Pandoc EPUB3
- Existing TOC / index / glossary extraction + metadata
- V2 — on-demand generation of missing TOC / index / glossary
🤝 Contributing
Issues and PRs welcome. Prefer small, reviewable changes. Keep fidelity of source text as a non-negotiable rule.
🙏 Acknowledgements
- Baidu Unlimited-OCR and the Ollama GGUF build
- Clef-Flash (Cloudflare / Ollama decision models)
- OpenDataLoader PDF
- Typst, Pandoc, Tauri, Ollama
📄 License
MIT — BookOCR by l’Atelier.
🌐 Links
📸 Vista previa
| Pipeline | Exportación |
|---|---|
![]() |
![]() |
📖 Acerca de
Aplicación de escritorio que transforma un PDF de libro (escaneado o de texto) en una edición digital fiel y reestructurada: Markdown extendido (fuente de verdad), PDF Typst y EPUB3 — 100 % local por defecto (Ollama), APIs cloud opcionales más adelante.
Estado: desarrollo inicial. El pipeline y la UI descritos abajo son el objetivo de producto; la implementación avanza por etapas.
🎯 Objetivos
- OCR / extracción fiel — conservar el texto original, incluidas faltas y particularidades. Ninguna «corrección» ortográfica.
- Estructura sensible a la maquetación — títulos, notas a pie, notas finales, encabezados/pies, figuras + leyendas, tablas, citas, números de página de origen.
- Recomposición tipográfica — disposición lógica (no un clon píxel del escaneo); estilos de exportación: academic / essay / novel.
- Preservar el front matter existente — reutilizar TOC, índice y glosario impresos cuando existan. La generación bajo demanda está prevista solo en V2.
- Automático o semiautomático — revisión humana cuando el pipeline duda (tipo de página, estructura, emparejamiento).
- Un libro a la vez, prioridad a la calidad de salida.
- Idiomas (libros + interfaz): francés, inglés, alemán, italiano, español.
- Objetivos: ciencias sociales universitarias, ensayos, novelas. Sin matemáticas/fórmulas por ahora; nunca cómics/manga.
🔄 Pipeline (visión general)
PDF de entrada
├─ tipo texto → OpenDataLoader PDF → normalización → BookMD
└─ escaneo / aplanado → pretratamiento → rasterización → Unlimited-OCR (Ollama)
→ parseo de regiones (tipo + bbox)
→ validación Clef-Flash (duda → gate humano)
→ normalización → BookMD
BookMD
→ extracción TOC / índice / glosario existentes
→ confirmación de metadatos
→ exportación Markdown + PDF Typst + EPUB3
- Clasificar — texto extraíble vs escaneo (o aplanar un PDF texto malo hacia la ruta de escaneo).
- PDF texto — OpenDataLoader PDF (más ligero que el OCR cuando basta).
- Escaneos — enderezado / contraste / recorte (solo legibilidad), luego richardyoung/unlimited-ocr vía Ollama (OCR de layout con cajas; compatible GPU AMD vía Ollama).
- Decisiones — clef-flash para el tipo de página (
body,toc,index,glossary, …), heurísticas de notas, gates si la confianza es baja. - BookMD — Markdown extendido canónico (ver más abajo).
- Exportaciones — Markdown + assets; PDF vía Typst; EPUB3 vía Pandoc (notas clicables, pagebreaks, navegación).
Los stacks CUDA oficiales Unlimited-OCR (Transformers / vLLM / SGLang) no son la ruta por defecto (GGUF Ollama, adecuado para AMD).
📝 BookMD (formato canónico)
El Markdown extendido es la fuente de verdad interna.
| Necesidad | Convención |
|---|---|
| Página de origen | <!-- page: N --> (también mapeado a labels Typst y pagebreaks EPUB3) |
| Notas | Inline Pandoc: ^[texto de la nota] |
| Notas finales / fin de capítulo | ^[<!-- note:end -->…] · ^[<!-- note:chapter-end -->…] (siempre inline en el MD; los exportadores reagrupan) |
| Figuras |  + carpeta assets |
| Tablas | Markdown (HTML si hace falta) |
| Citas | > … |
| Encabezados / pies | Marcados / metadatos — no mezclados silenciosamente al cuerpo |
Los números de página figuran en el Markdown, en el PDF Typst cuando corresponde, y como marcadores de pagebreak EPUB3 (no necesariamente visibles en el lector, pero presentes en el paquete).
📚 Política de enriquecimiento
| Elemento | V1 | V2 |
|---|---|---|
| TOC | Detectar y preservar el sumario impreso; enlazar a capítulos si es fiable | Generar desde los títulos bajo demanda |
| Índice | Detectar y preservar el índice existente | Generar bajo demanda |
| Glosario | Detectar y preservar el glosario existente | Generación asistida bajo demanda |
| Metadatos | Rellenar (página de título / copyright) + confirmación | — |
Ninguna generación silenciosa de TOC / índice / glosario en V1.
🧩 Stack
| Capa | Elección |
|---|---|
| Cáscara de aplicación | Tauri 2 + React / TypeScript |
| Pipeline | Rust (src-tauri, crates/bookmd) |
| Modelos locales | Ollama — Unlimited-OCR + Clef-Flash |
| PDF texto | OpenDataLoader PDF (Java 11+) |
| Exportación PDF | Plantillas Typst (academic, essay, novel) |
| Exportación EPUB | Pandoc → EPUB3 |
| Licencia | MIT |
Los proveedores cloud opcionales pasarán por un trait Provider común (desactivado por defecto).
📁 Organización del repositorio
ATBookOCR/
README.md / README.en.md / README.de.md / README.es.md
LICENSE
src/ # UI React
src-tauri/ # Tauri + orquestación del pipeline Rust
crates/bookmd/ # Parse / serialización BookMD
templates/typst/ # Estilos de exportación
📦 Dependencias externas
Instalarlas y dejarlas disponibles en el PATH (la app las detecta al arrancar):
- Ollama (versión requerida por Clef-Flash; actualmente ≥ 0.35.1)
- Modelos (a descargar cuando esté listo):
ollama pull richardyoung/unlimited-ocrollama pull clef-flash
- Java 11+ y CLI OpenDataLoader PDF
- Typst
- Pandoc
GPU: NVIDIA o AMD vía los backends soportados por Ollama; CPU posible pero más lento.
🖥 Interfaz (V1)
Flujo guiado mínimo — sin editor Markdown integrado:
- Elegir el PDF + carpeta de salida
- Ajustes (modelos Ollama, rutas de herramientas)
- Progreso del pipeline
- Gates de revisión en caso de duda (estructura de página, etc.)
- Confirmar metadatos + vista previa del TOC / índice / glosario detectados + estilo de exportación
- Exportar Markdown / PDF / EPUB
Idiomas UI: FR, EN, DE, IT, ES.
💻 Desarrollo
# Requisitos previos: Node.js, Rust, prerrequisitos Tauri para su SO
# https://v2.tauri.app/start/prerequisites/
npm install
npm run tauri dev
Build:
npm run tauri build
🗺 Hoja de ruta (breve)
- Scaffold Tauri + i18n + detección de dependencias
- Crate
bookmd+ tests - Rama PDF texto (OpenDataLoader → BookMD)
- Rama escaneo (pretratamiento + Unlimited-OCR → BookMD)
- Clef-Flash + gates humanos
- PDF Typst + EPUB3 Pandoc
- Extracción TOC / índice / glosario existentes + metadatos
- V2 — generación bajo demanda si faltan
🤝 Contribución
Issues y PR bienvenidas. Preferir cambios pequeños y revisables. La fidelidad del texto fuente es una regla no negociable.
🙏 Agradecimientos
- Baidu Unlimited-OCR y el build GGUF Ollama
- Clef-Flash (modelos de decisión Cloudflare / Ollama)
- OpenDataLoader PDF
- Typst, Pandoc, Tauri, Ollama
📄 Licencia
MIT — BookOCR by l’Atelier.


