found out why clap seemed insane
This commit is contained in:
parent
561a94c4d3
commit
53755caad5
42
src/main.rs
42
src/main.rs
@ -31,69 +31,111 @@ enum Commands{
|
||||
|
||||
#[derive(Args)]
|
||||
struct DownloadHistorySubcommand{
|
||||
#[arg(long)]
|
||||
asset_id:AssetID,
|
||||
#[arg(long)]
|
||||
cookie_type:CookieType,
|
||||
#[arg(long)]
|
||||
cookie:String,
|
||||
#[arg(long)]
|
||||
output_folder:Option<PathBuf>,
|
||||
#[arg(long)]
|
||||
continue_from_versions:Option<bool>,
|
||||
#[arg(long)]
|
||||
start_version:Option<u64>,
|
||||
#[arg(long)]
|
||||
end_version:Option<u64>,
|
||||
}
|
||||
#[derive(Args)]
|
||||
struct DownloadSubcommand{
|
||||
#[arg(long)]
|
||||
cookie_type:CookieType,
|
||||
#[arg(long)]
|
||||
cookie:String,
|
||||
#[arg(long)]
|
||||
output_folder:Option<PathBuf>,
|
||||
#[arg(long,required=true)]
|
||||
asset_id_list:Vec<AssetID>,
|
||||
}
|
||||
#[derive(Args)]
|
||||
struct UploadSubcommand{
|
||||
#[arg(long)]
|
||||
asset_id:AssetID,
|
||||
#[arg(long)]
|
||||
cookie_type:CookieType,
|
||||
#[arg(long)]
|
||||
cookie:String,
|
||||
#[arg(long)]
|
||||
input_file:PathBuf,
|
||||
#[arg(long)]
|
||||
group:Option<u64>,
|
||||
}
|
||||
#[derive(Args)]
|
||||
struct CompileSubcommand{
|
||||
#[arg(long)]
|
||||
input_folder:PathBuf,
|
||||
#[arg(long)]
|
||||
output_file:PathBuf,
|
||||
#[arg(long)]
|
||||
style:Option<DecompileStyle>,
|
||||
#[arg(long)]
|
||||
template:Option<PathBuf>,
|
||||
}
|
||||
#[derive(Args)]
|
||||
struct DecompileSubcommand{
|
||||
#[arg(long)]
|
||||
input_file:PathBuf,
|
||||
#[arg(long)]
|
||||
output_folder:PathBuf,
|
||||
#[arg(long)]
|
||||
style:DecompileStyle,
|
||||
#[arg(long)]
|
||||
write_template:Option<bool>,
|
||||
#[arg(long)]
|
||||
write_models:Option<bool>,
|
||||
#[arg(long)]
|
||||
write_scripts:Option<bool>,
|
||||
}
|
||||
#[derive(Args)]
|
||||
struct DecompileHistoryIntoGitSubcommand{
|
||||
#[arg(long)]
|
||||
input_folder:PathBuf,
|
||||
//currently output folder must be the current folder due to git2 limitations
|
||||
//output_folder:cli.output.unwrap(),
|
||||
#[arg(long)]
|
||||
style:DecompileStyle,
|
||||
#[arg(long)]
|
||||
git_committer_name:String,
|
||||
#[arg(long)]
|
||||
git_committer_email:String,
|
||||
#[arg(long)]
|
||||
write_template:Option<bool>,
|
||||
#[arg(long)]
|
||||
write_models:Option<bool>,
|
||||
#[arg(long)]
|
||||
write_scripts:Option<bool>,
|
||||
}
|
||||
#[derive(Args)]
|
||||
struct DownloadAndDecompileHistoryIntoGitSubcommand{
|
||||
#[arg(long)]
|
||||
asset_id:AssetID,
|
||||
#[arg(long)]
|
||||
cookie_type:CookieType,
|
||||
#[arg(long)]
|
||||
cookie:String,
|
||||
//currently output folder must be the current folder due to git2 limitations
|
||||
//output_folder:cli.output.unwrap(),
|
||||
#[arg(long)]
|
||||
style:DecompileStyle,
|
||||
#[arg(long)]
|
||||
git_committer_name:String,
|
||||
#[arg(long)]
|
||||
git_committer_email:String,
|
||||
#[arg(long)]
|
||||
write_template:Option<bool>,
|
||||
#[arg(long)]
|
||||
write_models:Option<bool>,
|
||||
#[arg(long)]
|
||||
write_scripts:Option<bool>,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user