Skip to main content

ebook_rs/
lib.rs

1#![allow(clippy::collapsible_if, clippy::collapsible_match)]
2
3pub mod analytics;
4pub mod annotations;
5pub mod archive;
6pub mod book;
7pub mod cbz;
8pub mod cfi;
9pub mod citation;
10pub mod deobfuscate;
11pub mod docx;
12pub mod dom;
13pub mod error;
14pub mod fb2;
15pub mod ffi;
16pub mod fingerprint;
17pub mod footnote;
18pub mod kfx;
19pub mod layout;
20pub mod lcp;
21pub mod lit;
22pub mod locations;
23pub mod mcp;
24pub mod media_overlay;
25pub mod metadata;
26pub mod mobi;
27pub mod nav;
28pub mod odt;
29#[cfg(feature = "opds")]
30pub mod opds;
31pub mod opf;
32pub mod optimizer;
33pub mod paginator;
34pub mod pdf;
35#[cfg(feature = "python")]
36pub mod python;
37pub mod rag;
38pub mod rtf;
39pub mod sample_builder;
40pub mod search;
41pub mod section;
42pub mod stream_zip;
43pub mod treesitter;
44pub mod txt;
45pub mod uniffi_api;
46pub mod validator;
47pub mod wasm;
48pub mod webpub;
49
50#[cfg(feature = "server")]
51pub mod server;
52#[cfg(feature = "server")]
53pub mod web_ui;
54
55pub use mcp::run_mcp_server;
56
57pub use analytics::ReadingAnalytics;
58pub use annotations::{Annotation, AnnotationManager, AnnotationType};
59pub use archive::{EpubArchive, HttpRangeRequest};
60pub use book::Book;
61pub use cbz::CbzBook;
62pub use cfi::{Cfi, CfiDomTarget, CfiOffset, CfiPath, CfiStep};
63pub use citation::{CitationExporter, CitationStyle};
64pub use deobfuscate::FontDeobfuscator;
65pub use docx::DocxBook;
66pub use dom::{DomNode, EbookDomTree, decode_bytes_with_encoding, sanitize_and_repair_xml};
67pub use error::EbookError;
68pub use fb2::Fb2Book;
69pub use fingerprint::{BookFingerprint, FingerprintGenerator};
70pub use footnote::Footnote;
71pub use kfx::{KFX_MAGIC_CONT, KfxBook, UniversalKfxExporter};
72pub use layout::{
73    AssetDeliveryStrategy, FlowMode, LayoutMode, RenditionLayout, SpreadMode, SyntheticSpread,
74    Theme, ViewportManagerConfig, WritingMode,
75};
76pub use lcp::{LcpDecryptor, LcpLicense, LcpRights, LcpUser};
77pub use lit::LitBook;
78pub use locations::{LocationEntry, Locations, LocatorLocations, ReadiumLocator};
79pub use media_overlay::{
80    MediaOverlayPackage, MediaOverlayParallel, MediaOverlaySequence, SmilAudioClip, SmilClock,
81    SmilTextRef,
82};
83pub use metadata::{
84    AccessibilityMetadata, GuideItem, ManifestItem, Metadata, PageProgressionDirection, SpineItem,
85};
86pub use mobi::{MobiBook, decompress_palmdoc};
87pub use nav::{Landmark, NavPoint, NavPointFlat, PageListItem, TocSearchResult};
88pub use odt::OdtBook;
89#[cfg(feature = "opds")]
90pub use opds::{OpdsEntry, OpdsFeed, OpdsLink};
91pub use optimizer::{EpubOptimizer, EpubOptimizerOptions, OptimizationReport};
92pub use paginator::{PageRange, ReflowPaginator, SectionPageMap};
93pub use pdf::PdfBook;
94pub use rag::{RagChunk, RagChunkConfig, RagChunker};
95pub use rtf::RtfBook;
96pub use sample_builder::generate_sample_epub;
97pub use search::{SearchEngine, SearchResult};
98pub use section::{Section, TtsWordToken};
99pub use stream_zip::{ZipEntryLocation, ZipHeaderReader};
100pub use treesitter::{ExtractedCodeBlock, SyntaxHighlightEngine, SyntaxNodeInfo, TreeSitterEngine};
101pub use txt::TxtBook;
102pub use uniffi_api::{UniBook, UniSearchResult, UniSectionSummary};
103pub use validator::{
104    EpubValidator, UniversalEpub3Exporter, ValidationError, ValidationReport, ValidationSeverity,
105};
106pub use webpub::{WebpubLink, WebpubManifest, WebpubMetadata};
107
108#[cfg(feature = "server")]
109pub use server::ReaderServer;
110
111#[cfg(feature = "wasm")]
112pub use wasm::WasmBook;
113
114#[cfg(feature = "uniffi")]
115uniffi::setup_scaffolding!();