diff options
-rw-r--r-- | fatcat-cli/src/main.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/fatcat-cli/src/main.rs b/fatcat-cli/src/main.rs index 3b96cce..fd04044 100644 --- a/fatcat-cli/src/main.rs +++ b/fatcat-cli/src/main.rs @@ -99,6 +99,7 @@ enum EditgroupsCommand { #[derive(StructOpt)] enum BatchCommand { + /// Create new entities in batches Create { entity_type: EntityType, @@ -108,6 +109,8 @@ enum BatchCommand { #[structopt(long, global = true)] auto_accept: bool, }, + + /// Update existing entities in batches Update { entity_type: EntityType, mutations: Vec<Mutation>, @@ -118,6 +121,8 @@ enum BatchCommand { #[structopt(long)] auto_accept: bool, }, + + /// Delete entities in batches Delete { entity_type: EntityType, @@ -127,6 +132,8 @@ enum BatchCommand { #[structopt(long)] auto_accept: bool, }, + + /// Download multiple files Download { #[structopt(long, short = "-o", parse(from_os_str))] output_dir: Option<PathBuf>, @@ -138,6 +145,8 @@ enum BatchCommand { #[derive(StructOpt)] enum Command { + + /// Fetch a single entity, by "ident" or external identifier Get { specifier: Specifier, @@ -153,6 +162,8 @@ enum Command { #[structopt(long)] toml: bool, }, + + /// Create a single new entity, from a file, in an existing editgroup Create { entity_type: EntityType, @@ -168,6 +179,8 @@ enum Command { )] editgroup_id: String, }, + + /// Update an existing editgroup, either from file or updating specified fields Update { specifier: Specifier, @@ -185,6 +198,8 @@ enum Command { mutations: Vec<Mutation>, }, + + /// Delete a single entity Delete { specifier: Specifier, @@ -196,6 +211,8 @@ enum Command { )] editgroup_id: String, }, + + /// Use a text editor to update entity; fetches and uploads automatically Edit { specifier: Specifier, @@ -217,12 +234,16 @@ enum Command { #[structopt(long = "--editing-command", env = "EDITOR")] editing_command: String, }, + + /// Fetch full-text file corresponding to an entity Download { specifier: Specifier, #[structopt(long = "--output-dir", short = "-o", parse(from_os_str))] output_path: Option<PathBuf>, }, + + /// List edit history for a single entity History { specifier: Specifier, @@ -232,6 +253,8 @@ enum Command { #[structopt(long)] json: bool, }, + + /// Query catalog index Search { entity_type: SearchEntityType, @@ -255,10 +278,14 @@ enum Command { #[structopt(long = "--index-json")] index_json: bool, }, + + /// Sub-commands for managing editgroups Editgroups { #[structopt(subcommand)] cmd: EditgroupsCommand, }, + + /// List recent accepted edits to the catalog Changelog { #[structopt(long, short = "-n", default_value = "20")] limit: i64, @@ -270,6 +297,8 @@ enum Command { #[structopt(long)] json: bool, }, + + /// Operations on multiple entities Batch { #[structopt(subcommand)] cmd: BatchCommand, @@ -281,6 +310,8 @@ enum Command { #[structopt(long)] limit: Option<u64>, }, + + /// Summarize connection and authentication with API Status { #[structopt(long)] json: bool, |