bookyard 0.1.0

Build and locally edit a bookshelf for multiple mdBook projects.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use bookyard_core::{BuildOptions, build_shelf};

pub fn run(no_mdbook: bool) -> anyhow::Result<()> {
    let root = crate::commands::root_dir()?;
    let config = crate::commands::load_config()?;
    let plan = build_shelf(
        &root,
        &config,
        &BuildOptions {
            run_mdbook: !no_mdbook,
        },
    )?;
    crate::render::shelf::write_shelf(&plan.output_dir, &config)?;
    println!("built {}", plan.output_dir.display());
    Ok(())
}