Skip to main content

nexcore_publishing/
lib.rs

1//! # nexcore-publishing
2//!
3//! Book publishing pipeline for NexVigilant. Converts `.docx` manuscripts
4//! to publication-ready EPUB 3.0 and Kindle-compliant ebooks.
5//!
6//! ## Pipeline
7//!
8//! Seven stages: **INGEST → METADATA → STRUCTURE → STYLE → COVER → GENERATE → VALIDATE**
9//!
10//! ```text
11//! .docx → DocxDocument → BookMetadata + Chapters → EPUB 3.0 → Validated .epub
12//!                                                      ↓
13//!                                               KDP Compliance Report
14//! ```
15//!
16//! ## Quick Start
17//!
18//! ```no_run
19//! use nexcore_publishing::pipeline::{PipelineConfig, PublishingTarget};
20//!
21//! let config = PipelineConfig::new("manuscript.docx", "./output")
22//!     .with_target(PublishingTarget::Kindle);
23//!
24//! let result = nexcore_publishing::pipeline::run(&config)?;
25//! println!("{}", result.to_report());
26//! # Ok::<(), nexcore_publishing::error::PublishingError>(())
27//! ```
28//!
29//! ## Modules
30//!
31//! - [`docx`] — DOCX reader (ZIP + XML, no external deps)
32//! - [`epub`] — EPUB 3.0 writer with NCX backward compatibility
33//! - [`metadata`] — Dublin Core metadata with ISBN validation
34//! - [`chapter`] — Chapter extraction and heading detection
35//! - [`cover`] — Cover image validation (EPUB + KDP requirements)
36//! - [`kindle`] — KDP compliance checking
37//! - [`validate`] — EPUB structural validation
38//! - [`pipeline`] — Orchestrates all stages end-to-end
39
40#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
41#![forbid(unsafe_code)]
42
43pub mod chapter;
44pub mod cover;
45pub mod docx;
46pub mod epub;
47pub mod error;
48pub mod kindle;
49pub mod metadata;
50pub mod pipeline;
51pub mod read;
52pub mod validate;