Skip to main content

blackline_docx/
lib.rs

1//! # blackline-docx
2//!
3//! Read, search, edit, redline, track, create, and validate DOCX documents.
4//! The XML in the package is the document — nothing is converted to HTML.
5//!
6//! ```no_run
7//! use blackline_docx::{Docx, SearchQuery};
8//!
9//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
10//! let doc = Docx::from_paragraphs(&["Hello", "World"])?;
11//! let hits = doc.search(&SearchQuery::new("Hello"))?;
12//! assert_eq!(hits.total, 1);
13//! # Ok(())
14//! # }
15//! ```
16
17mod body;
18mod check;
19mod comment;
20mod create;
21mod document;
22mod edit;
23mod error;
24mod hyperlink;
25mod info;
26mod ops;
27mod redline;
28mod revision;
29mod search;
30mod splice;
31mod style;
32mod text;
33mod track;
34
35pub use blackline_core::diff::Granularity;
36pub use check::DocxHealth;
37pub use comment::CommentThread;
38pub use create::{CreateSpec, ParaSpec, RunSpec, SectionSpec, TableSpec};
39pub use document::{
40    redline, track_redline, Docx, EditBuilder, EditOutcome, TrackBuilder, TrackOutcome,
41};
42pub use edit::{EditOptions, EditReport, OpReport};
43pub use error::DocxError;
44pub use hyperlink::Hyperlink;
45pub use info::DocxInfo;
46pub use ops::EditOp;
47pub use revision::TrackedChange;
48pub use search::{SearchHit, SearchQuery, SearchResults, DEFAULT_LIMIT};
49pub use style::{ParaProps, RunProps};
50pub use text::{OutlineEntry, ViewLine};
51pub use track::{TrackOp, TrackOpReport, TrackOptions, TrackReport};