Browse Source

Command line args

taddr
adityapk00 5 years ago
parent
commit
98e67ea19a
  1. 2
      cli/.gitignore
  2. 8
      cli/Cargo.toml
  3. 26
      cli/src/main.rs

2
cli/.gitignore

@ -0,0 +1,2 @@
.vscode
target/

8
cli/Cargo.toml

@ -0,0 +1,8 @@
[package]
name = "zecpaperwallet"
version = "0.1.0"
authors = ["ZecWallet"]
edition = "2018"
[dependencies]
clap = "~2.33"

26
cli/src/main.rs

@ -0,0 +1,26 @@
extern crate clap;
use clap::{Arg, App, SubCommand};
fn main() {
App::new("zecpaperwaller")
.version("1.0")
.about("A command line Zcash Sapling paper wallet generator")
.arg(Arg::with_name("testnet")
.short("t")
.long("testnet")
.help("Generate Testnet addresses."))
.arg(Arg::with_name("format")
.short("f")
.long("format")
.help("What format to generate the output in.")
.takes_value(true)
.value_name("FORMAT")
.possible_values(&["png", "pdf", "txt"]))
.arg(Arg::with_name("output")
.short("o")
.long("output")
.index(1)
.required(true)
.help("Name of output file."))
.get_matches();
}
Loading…
Cancel
Save