fancy help
This commit is contained in:
parent
85180f22bd
commit
6acbf8de44
|
@ -8,7 +8,6 @@ description = "Various tools for use with math and cryptology, includes executab
|
|||
homepage = "https://git.cscherr.de/PlexSheep/plexcryptool/"
|
||||
repository = "https://git.cscherr.de/PlexSheep/plexcryptool/"
|
||||
license = "MIT"
|
||||
license-file = "LICENSE"
|
||||
keywords = ["cryptology", "pyo3", "library", "dhbw"]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
|
|
@ -11,7 +11,10 @@ use clap_num::maybe_hex;
|
|||
|
||||
/// This is just structures for parsing Cli args
|
||||
#[derive(Parser, Debug, Clone)]
|
||||
#[clap(name="plexcryptool", author="Christoph J. Scherr", version, about="Various tools for use with math and cryptology, includes executable and a library.")]
|
||||
#[command(author, version, about, long_about)] // Read from `Cargo.toml`
|
||||
#[command(
|
||||
help_template = "{about-section}\n\t{name} {version}\n\tAuthor: {author-with-newline}\n{usage-heading} {usage} \n {all-args} {tab}"
|
||||
)]
|
||||
pub struct Cli {
|
||||
/// Which submodule to use
|
||||
#[command(subcommand)]
|
||||
|
@ -27,6 +30,7 @@ pub struct Cli {
|
|||
}
|
||||
|
||||
#[derive(Subcommand, Debug, Clone)]
|
||||
#[command(author, version, about, long_about = None)] // Read from `Cargo.toml`
|
||||
pub enum Commands {
|
||||
/// Use math functions
|
||||
Math(MathCommand),
|
||||
|
|
|
@ -34,6 +34,9 @@ use num_bigint;
|
|||
/// This function is the entrypoint of the binary. It parses Commandline options and calls the
|
||||
/// internal functions with the corresponding values, then shows the results to the user.
|
||||
pub fn main() {
|
||||
//let b = <Box<Cli> as CommandFactory>::command();
|
||||
//dbg!(b.get_author());
|
||||
//return;
|
||||
let args = Cli::parse();
|
||||
if args.verbose {
|
||||
cplex::printing::seperator();
|
||||
|
|
Loading…
Reference in New Issue