zotron 0.2.4

Typed CLI for Zotero — search, manage, export, OCR, and RAG over your academic library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fn main() {
    // Reset SIGPIPE to default behavior (terminate silently) so piping
    // to head/tail/jq doesn't cause a panic.
    #[cfg(unix)]
    {
        unsafe {
            libc::signal(libc::SIGPIPE, libc::SIG_DFL);
        }
    }

    match zotron_cli::run(std::env::args_os()) {
        Ok(output) => print!("{output}"),
        Err(message) => {
            eprintln!("{}", zotron_cli::format_error_json(&message));
            std::process::exit(1);
        }
    }
}