oximedia-cli 0.1.8

Command-line interface for OxiMedia
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Unix man page generator for the OxiMedia CLI.

use anyhow::Result;
use clap::CommandFactory;
use std::io::Write;

use crate::Cli;

/// Render a Unix man page to stdout.
pub(crate) fn run() -> Result<()> {
    let cmd = Cli::command();
    let man = clap_mangen::Man::new(cmd);
    let mut buf = Vec::new();
    man.render(&mut buf)?;
    std::io::stdout().write_all(&buf)?;
    Ok(())
}