From ee723e567db8a969f7778676158fc63d945e3013 Mon Sep 17 00:00:00 2001 From: Elisabeth Henry Date: Fri, 16 Dec 2016 02:00:10 +0100 Subject: [PATCH] Update library documentation --- src/lib/lib.rs | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/lib/lib.rs b/src/lib/lib.rs index c665012..7cb9489 100644 --- a/src/lib/lib.rs +++ b/src/lib/lib.rs @@ -19,17 +19,27 @@ //! For documentation regarding the *program* `crowbook`, see //! [the Github page](https://github.com/lise-henry/crowbook). //! +//! # Usage +//! +//! Just like any other library, just add a dependency on `crowbook` +//! in your `Cargo.toml` file. You will probably want to deactivate +//! default features that are mostly useful for the binary: +//! +//! ```ignore +//! crowbook = {version = "0.10", default-features = false} +//! ``` +//! //! # Book //! -//! The central structure of Crowbook is `Book`, who coordinates everything. +//! The central structure of Crowbook is `Book`, which coordinates everything. //! //! Its roles are: //! -//! * reading a book configuration file and setting the book options accordingly -//! * reading the chapters (written in Markdown) listed in this configuration file -//! to `Parser`, get back an AST and store it in memory -//! * call `HtmlRenderer`, `EpubRenderer`, `LatexRenderer` and/or `OdtRenderer` -//! according to the book's parameters and generate the appopriate files. +//! * read a book configuration file and setting the book options accordingly; +//! * read the chapters (written in Markdown) listed in this +//! configuration file and pass them to to `Parser`, get back an AST and store it in memory +//! * call the various renderers according to the book's parameters +//! and generate the appopriate files. //! //! ## Example //! @@ -137,6 +147,7 @@ pub use crowbook_intl_runtime::set_lang; pub use crowbook_intl_runtime::__get_lang; #[macro_use] +#[doc(hidden)] pub mod localize_macros; #[macro_use] mod html;