From 949c6459aa7683453a7160423b689ceadb08954b Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 4 Sep 2024 08:04:48 +0100 Subject: refactor: organise into lib and bin structure the make the code more readable this commit just moves the files, the next commit should fix the imports --- src/cli.rs | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 src/cli.rs (limited to 'src/cli.rs') diff --git a/src/cli.rs b/src/cli.rs deleted file mode 100644 index d0f934e..0000000 --- a/src/cli.rs +++ /dev/null @@ -1,44 +0,0 @@ -use clap::{Parser, Subcommand}; - -use crate::sub_commands; - -#[derive(Parser)] -#[command(author, version, about, long_about = None)] -#[command(propagate_version = true)] -pub struct Cli { - #[command(subcommand)] - pub command: Commands, - /// remote signer address - #[arg(long, global = true)] - pub bunker_uri: Option, - /// remote signer app secret key - #[arg(long, global = true)] - pub bunker_app_key: Option, - /// nsec or hex private key - #[arg(short, long, global = true)] - pub nsec: Option, - /// password to decrypt nsec - #[arg(short, long, global = true)] - pub password: Option, - /// disable spinner animations - #[arg(long, action)] - pub disable_cli_spinners: bool, -} - -#[derive(Subcommand)] -pub enum Commands { - /// update cache with latest updates from nostr - Fetch(sub_commands::fetch::SubCommandArgs), - /// signal you are this repo's maintainer accepting proposals via nostr - Init(sub_commands::init::SubCommandArgs), - /// issue commits as a proposal - Send(sub_commands::send::SubCommandArgs), - /// list proposals; checkout, apply or download selected - List, - /// send proposal revision - Push(sub_commands::push::SubCommandArgs), - /// fetch and apply new proposal commits / revisions linked to branch - Pull, - /// run with --nsec flag to change npub - Login(sub_commands::login::SubCommandArgs), -} -- cgit v1.2.3