plannotator-tui 0.11.7

Annotate Markdown in the terminal - standalone, and as a Herdr plugin.
//! plannotator-tui: annotate Markdown in the terminal.

mod app;
mod archive;
mod base64;
mod cjk_emphasis;
mod cli;
mod config;
mod decorate;
mod delivery;
mod doc;
mod doc_search;
mod editor;
mod export;
mod file_search;
mod gate;
#[cfg(unix)]
mod hangup;
mod hc;
mod herdr;
mod highlight;
mod keys;
mod last;
mod layout;
mod notes_rail;
mod pi;
#[cfg(unix)]
mod review;
mod rex;
mod srcmap;
mod store;
mod terminal;
#[cfg(all(test, unix))]
mod test_support;
mod theme;
mod tree;
mod ui;
mod workspace_paths;
mod wrap;

fn main() -> std::process::ExitCode {
    let args: Vec<String> = std::env::args().skip(1).collect();
    match cli::run(&args) {
        Ok(code) => code,
        Err(err) => {
            #[allow(clippy::print_stderr, reason = "the one place errors reach the user")]
            {
                eprintln!("plannotator_tui: {err:#}");
            }
            // A strict gate's own failure must not read as the reviewer's rejection.
            if err.is::<gate::GateError>() {
                std::process::ExitCode::from(gate::GATE_ERROR_EXIT)
            } else if err.is::<pi::cli::NoPi>() {
                std::process::ExitCode::from(u8::try_from(delivery::command::EXIT_UNAVAILABLE).unwrap_or(1))
            } else {
                std::process::ExitCode::FAILURE
            }
        }
    }
}