calib-targets 0.13.0

Main entry point crate for a collection of plain calibration target detectors built on top of ChESS corners
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! `generate --spec ... --out-stem ...` — render a validated spec into a bundle.

use calib_targets_print::{write_target_bundle, PrintableTargetDocument};
use std::path::PathBuf;

use super::error::CliError;

pub fn run(spec: PathBuf, out_stem: PathBuf) -> Result<(), CliError> {
    let doc = PrintableTargetDocument::load_json(&spec)?;
    let written = write_target_bundle(&doc, out_stem)?;
    println!("{}", written.json_path.display());
    println!("{}", written.svg_path.display());
    println!("{}", written.png_path.display());
    println!("{}", written.dxf_path.display());
    Ok(())
}