How hxa7241/tadist-next works
Main Components
a) Core Components:
• Command Line Interface (Entry Point)
• File Handlers (PDF and EPUB processors)
• Metadata Extractor
• File Operations Manager
• Internet Query Service
• Name Generator
b) External Dependencies:
• OpenLibrary.org API
• Xpdf Tools (pdfinfo, pdftotext)
• CamlZip Library
┌─ User Interface Layer ─────────────────────┐
• Command Line Interface (tadistTool.ml) │
• ┬─────────────────────────┘
• ↓
┌─ Core Processing Layer ───────────────────┐
• ┌─────────────┐ ┌──────────────┐ │
• File Handlers│←→│Metadata Engine│ │
• ┘ └──────────────┘ │
• ↑ ↑ │
• ┌─────────────┐ ┌──────────────┐ │
• Name Generator│←→│Query Manager │ │
• ┘ └──────────────┘ │
• ┘
• ↑ ↑
┌─ External Services Layer ──────────────────┐
• ┌─────────────┐ ┌──────────────┐ │
• Xpdf Tools │ │ OpenLibrary │ │
• (PDF Support)│ │ API │ │
• ┘ └──────────────┘ │
• ┘
Component Mapping to Files
• tadistTool.ml/mli: Main entry point and CLI handling
• tadistEpub.ml/mli: EPUB file processing
• tadistPdf.ml/mli: PDF file processing
• tadistQuerier.ml/mli: OpenLibrary API integration
• tadistMelder.ml/mli: Metadata combination logic
• utf8.ml/mli: Text encoding support
• hxaGeneral.ml/mli: Utility functions
Important Details
a) File Format Support:
• Separate paths for EPUB and PDF processing
• Where format-specific metadata extraction occurs
b) External Dependencies:
• Integration points with OpenLibrary.org
• Where Xpdf tools are utilized
• CamlZip library usage for EPUB handling
c) Operations:
• Metadata extraction flow
• File name suggestion process
• Rename operation path
File renaming
Each function should have a clear flow path from input to output, showing how the different components interact to achieve the desired result.