blackbox_generator/
opt.rs1use anyhow::Result;
2use std::{env, path::PathBuf};
3use structopt::StructOpt;
4
5pub fn get_input() -> Result<(Opt, PathBuf)>{
6 let option = Opt::from_args();
7 let path = env::current_dir()?;
8
9 Ok((option, path))
10}
11
12#[derive(Debug, StructOpt)]
13#[structopt(name = "BlackBox-Generator", about = "The fastest and simplest NFT Generator for Solana/Ethereum")]
14pub struct Opt {
15 #[structopt(subcommand)]
16 pub command: Command,
17}
18
19#[derive(Debug, StructOpt)]
20pub enum Command {
21 #[structopt(name = "init")]
23 Init {
24 #[structopt(subcommand)]
25 init_subcommands: InitSubcommands,
26 },
27
28 #[structopt(name = "verify")]
30 Verify {},
31
32 #[structopt(name = "config")]
34 Config {},
35
36 #[structopt(name = "edit")]
38 Edit {},
39
40 #[structopt(name = "generate")]
42 Generate {},
43
44 #[structopt(name = "rarity")]
46 Rarity {},
47}
48
49#[derive(Debug, StructOpt)]
50pub enum InitSubcommands {
51 #[structopt(name = "solana")]
53 Solana {
54 #[structopt(short, long)]
56 name: String,
57 },
58 #[structopt(name = "ethereum")]
60 Ethereum {
61 #[structopt(short, long)]
63 name: String,
64 },
65}
66