-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
159 additions
and
109 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
simp.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "manpage" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
clap_mangen = "0.2.21" | ||
simp = { version = "*", path = ".."} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.ie \n(.g .ds Aq \(aq | ||
.el .ds Aq ' | ||
.TH simp 1 "simp 3.5.3" | ||
.SH NAME | ||
simp \- The simple image manipulation program | ||
.SH SYNOPSIS | ||
\fBsimp\fR [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fIFILE\fR] | ||
.SH DESCRIPTION | ||
The simple image manipulation program | ||
.SH OPTIONS | ||
.TP | ||
\fB\-h\fR, \fB\-\-help\fR | ||
Print help | ||
.TP | ||
\fB\-V\fR, \fB\-\-version\fR | ||
Print version | ||
.TP | ||
[\fIFILE\fR] | ||
Load this file | ||
.SH VERSION | ||
v3.5.3 | ||
.SH AUTHORS | ||
Axel Kappel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fn main() { | ||
let cmd = simp::get_clap_command(); | ||
let man = clap_mangen::Man::new(cmd); | ||
let mut buffer: Vec<u8> = Default::default(); | ||
man.render(&mut buffer).unwrap(); | ||
std::fs::write("simp.1", buffer).unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pub fn get_clap_command() -> clap::Command { | ||
clap::Command::new(env!("CARGO_PKG_NAME")) | ||
.author(env!("CARGO_PKG_AUTHORS")) | ||
.about(env!("CARGO_PKG_DESCRIPTION")) | ||
.version(env!("CARGO_PKG_VERSION")) | ||
.arg(clap::Arg::new("FILE").help("Load this file").index(1)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mod cli; | ||
|
||
pub use cli::get_clap_command; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters