2022-08-12 00:00:13 +00:00
|
|
|
use argh_derive::FromArgs;
|
|
|
|
|
|
|
|
#[derive(FromArgs)]
|
|
|
|
/// Create Aviary galleries
|
|
|
|
pub struct Args {
|
|
|
|
|
|
|
|
/// the null pointer server to use
|
|
|
|
#[argh(option, short = 's', default = "\"envs.sh\".to_owned()")]
|
|
|
|
pub server: String,
|
|
|
|
|
2022-08-12 20:14:30 +00:00
|
|
|
#[argh(subcommand)]
|
|
|
|
pub command: Command,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(FromArgs)]
|
|
|
|
#[argh(subcommand)]
|
|
|
|
pub enum Command {
|
|
|
|
Create(CreateArgs),
|
|
|
|
Download(DownloadArgs),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(FromArgs)]
|
|
|
|
#[argh(subcommand, name = "create")]
|
|
|
|
/// upload a series of images to a new gallery
|
|
|
|
pub struct CreateArgs {
|
|
|
|
/// the title of the gallery
|
|
|
|
#[argh(option, short = 't')]
|
|
|
|
pub title: Option<String>,
|
|
|
|
|
2022-08-12 00:00:13 +00:00
|
|
|
/// A list of image files to post
|
|
|
|
#[argh(positional)]
|
|
|
|
pub images: Vec<String>,
|
|
|
|
}
|
2022-08-12 20:14:30 +00:00
|
|
|
|
|
|
|
#[derive(FromArgs)]
|
|
|
|
#[argh(subcommand, name = "download")]
|
|
|
|
/// download a gallery
|
|
|
|
pub struct DownloadArgs {
|
|
|
|
}
|