summaryrefslogtreecommitdiffstats
path: root/fatcat-cli/src/main.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-11-19 17:56:39 -0800
committerBryan Newbold <bnewbold@archive.org>2021-11-19 17:57:25 -0800
commite338bd5fff15b6c57c14ba4d54321d35605157b3 (patch)
tree9edb95bdd148cee4a652e95f8aafcb3b05a1f65e /fatcat-cli/src/main.rs
parent1cca4833557aa8cbc8d6219dd98ec86cef04ef5d (diff)
downloadfatcat-cli-e338bd5fff15b6c57c14ba4d54321d35605157b3.tar.gz
fatcat-cli-e338bd5fff15b6c57c14ba4d54321d35605157b3.zip
editgroup description option for batch editing
Diffstat (limited to 'fatcat-cli/src/main.rs')
-rw-r--r--fatcat-cli/src/main.rs24
1 files changed, 21 insertions, 3 deletions
diff --git a/fatcat-cli/src/main.rs b/fatcat-cli/src/main.rs
index 091d073..f4a8d57 100644
--- a/fatcat-cli/src/main.rs
+++ b/fatcat-cli/src/main.rs
@@ -108,6 +108,10 @@ enum BatchCommand {
#[structopt(long, global = true)]
auto_accept: bool,
+
+ /// Editgroup description
+ #[structopt(long, short)]
+ description: Option<String>,
},
/// Update existing entities in batches
@@ -120,6 +124,10 @@ enum BatchCommand {
#[structopt(long)]
auto_accept: bool,
+
+ /// Editgroup description
+ #[structopt(long, short)]
+ description: Option<String>,
},
/// Delete entities in batches
@@ -131,6 +139,10 @@ enum BatchCommand {
#[structopt(long)]
auto_accept: bool,
+
+ /// Editgroup description
+ #[structopt(long, short)]
+ description: Option<String>,
},
/// Download multiple files
@@ -484,12 +496,14 @@ fn run(opt: Opt) -> Result<()> {
entity_type,
batch_size,
auto_accept,
+ description,
},
input_path,
limit,
} => {
let input_path = path_or_stdin(input_path);
- let mut batch = BatchGrouper::new(entity_type, batch_size, limit, auto_accept);
+ let mut batch =
+ BatchGrouper::new(entity_type, batch_size, limit, auto_accept, description);
batch.run(&mut api_client, input_path, BatchOp::Create, None)?;
}
Command::Batch {
@@ -499,12 +513,14 @@ fn run(opt: Opt) -> Result<()> {
mutations,
batch_size,
auto_accept,
+ description,
},
input_path,
limit,
} => {
let input_path = path_or_stdin(input_path);
- let mut batch = BatchGrouper::new(entity_type, batch_size, limit, auto_accept);
+ let mut batch =
+ BatchGrouper::new(entity_type, batch_size, limit, auto_accept, description);
batch.run(
&mut api_client,
input_path,
@@ -518,12 +534,14 @@ fn run(opt: Opt) -> Result<()> {
entity_type,
batch_size,
auto_accept,
+ description,
},
input_path,
limit,
} => {
let input_path = path_or_stdin(input_path);
- let mut batch = BatchGrouper::new(entity_type, batch_size, limit, auto_accept);
+ let mut batch =
+ BatchGrouper::new(entity_type, batch_size, limit, auto_accept, description);
batch.run(&mut api_client, input_path, BatchOp::Delete, None)?;
}
Command::Batch {