adbook 0.1.0

Creates a book from AsciiDoc files
Documentation
//! Configuration types deserialized from `.ron` files

use {
    serde::{Deserialize, Serialize},
    std::path::PathBuf,
};

/// Arguments to a command
///
/// `[("--one-option", ["a", "b"]), ("--another", []), ..]`.
pub type CmdOptions = Vec<(String, Vec<String>)>;

/// Deserialized from `book.ron` in the root of an `adbook` project
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct BookRon {
    /// Use it to supply absolute paths (use `/{base_url/path` instead of `/path`)
    pub base_url: String,
    /// Authors of the book
    pub authors: Vec<String>,
    /// Title of the book
    pub title: String,
    /// The source directory
    pub src_dir: PathBuf,
    /// The destination directory where source files are converted
    pub site_dir: PathBuf,
    /// Files or directories copied to `site` directory
    pub includes: Vec<PathBuf>,
    /// Additional options for `asciidoctor` command
    pub adoc_opts: CmdOptions,
}

/// Deserialized from `toc.ron` in directories in source directory of an `adbook` project
#[derive(Deserialize, Serialize, Debug)]
pub struct TocRon {
    pub items: Vec<(String, String)>,
}