-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a way to generate a man file, and also added support for -h/--help
- Loading branch information
1 parent
390afc2
commit 5b9b278
Showing
5 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,5 +23,5 @@ tempfile = "3.1.0" | |
[workspace] | ||
|
||
members = [ | ||
"gtk","qml", "cursive" | ||
"gtk", "qml", "cursive", "man" | ||
] |
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,7 @@ | ||
[package] | ||
name = "ripasso-man" | ||
version = "0.1.0" | ||
authors = ["Alexander Kjäll <alexander.kjall@gmail.com>"] | ||
|
||
[dependencies] | ||
man = "0.3.0" |
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,20 @@ | ||
extern crate man; | ||
|
||
fn main() { | ||
let page = man::prelude::Manual::new("ripasso") | ||
.about("A password manager that uses the file format of the standard unix password manager 'pass', implemented in rust.") | ||
.author(man::prelude::Author::new("Joakim Lundborg").email("joakim.lundborg@gmail.com")) | ||
.author(man::prelude::Author::new("Alexander Kjäll").email("alexander.kjall@gmail.com")) | ||
.flag(man::prelude::Flag::new() | ||
.short("-h") | ||
.long("--help") | ||
.help("Print a help text"), | ||
) | ||
.custom(man::prelude::Section::new("usage note") | ||
.paragraph("Ripasso reads $HOME/.password-store/ by default, override this by setting | ||
the PASSWORD_STORE_DIR environmental variable.") | ||
) | ||
.render(); | ||
|
||
println!("{}", page); | ||
} |