man
Generate structured man pages using roff-rs.
Usage
extern crate man;
use *;
Preview by running:
;
Installation
License
MIT OR Apache-2.0
Generate structured man pages using roff-rs.
extern crate man;
use man::prelude::*;
fn main() {
let page = Manual::new("basic")
.about("A basic example")
.author(Author::new("Alice Person").email("alice@person.com"))
.author(Author::new("Bob Human").email("bob@human.com"))
.flag(Flag::new().short("-d").long("--deubg").description("Enable debug mode"))
.flag(Flag::new().short("-v").long("--verbose").description("Enable verbose mode"))
.option(Opt::new("output").short("-o").long("--output").description("Output file"));
let _string = page.render();
}
Preview by running:
$ cargo run > /tmp/app.man; man /tmp/app.man
$ cargo add man
MIT OR Apache-2.0