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)]
|
#[derive(Args)]
|
||||||
struct DownloadHistorySubcommand{
|
struct DownloadHistorySubcommand{
|
||||||
|
#[arg(long)]
|
||||||
asset_id:AssetID,
|
asset_id:AssetID,
|
||||||
|
#[arg(long)]
|
||||||
cookie_type:CookieType,
|
cookie_type:CookieType,
|
||||||
|
#[arg(long)]
|
||||||
cookie:String,
|
cookie:String,
|
||||||
|
#[arg(long)]
|
||||||
output_folder:Option<PathBuf>,
|
output_folder:Option<PathBuf>,
|
||||||
|
#[arg(long)]
|
||||||
continue_from_versions:Option<bool>,
|
continue_from_versions:Option<bool>,
|
||||||
|
#[arg(long)]
|
||||||
start_version:Option<u64>,
|
start_version:Option<u64>,
|
||||||
|
#[arg(long)]
|
||||||
end_version:Option<u64>,
|
end_version:Option<u64>,
|
||||||
}
|
}
|
||||||
#[derive(Args)]
|
#[derive(Args)]
|
||||||
struct DownloadSubcommand{
|
struct DownloadSubcommand{
|
||||||
|
#[arg(long)]
|
||||||
cookie_type:CookieType,
|
cookie_type:CookieType,
|
||||||
|
#[arg(long)]
|
||||||
cookie:String,
|
cookie:String,
|
||||||
|
#[arg(long)]
|
||||||
output_folder:Option<PathBuf>,
|
output_folder:Option<PathBuf>,
|
||||||
|
#[arg(long,required=true)]
|
||||||
asset_id_list:Vec<AssetID>,
|
asset_id_list:Vec<AssetID>,
|
||||||
}
|
}
|
||||||
#[derive(Args)]
|
#[derive(Args)]
|
||||||
struct UploadSubcommand{
|
struct UploadSubcommand{
|
||||||
|
#[arg(long)]
|
||||||
asset_id:AssetID,
|
asset_id:AssetID,
|
||||||
|
#[arg(long)]
|
||||||
cookie_type:CookieType,
|
cookie_type:CookieType,
|
||||||
|
#[arg(long)]
|
||||||
cookie:String,
|
cookie:String,
|
||||||
|
#[arg(long)]
|
||||||
input_file:PathBuf,
|
input_file:PathBuf,
|
||||||
|
#[arg(long)]
|
||||||
group:Option<u64>,
|
group:Option<u64>,
|
||||||
}
|
}
|
||||||
#[derive(Args)]
|
#[derive(Args)]
|
||||||
struct CompileSubcommand{
|
struct CompileSubcommand{
|
||||||
|
#[arg(long)]
|
||||||
input_folder:PathBuf,
|
input_folder:PathBuf,
|
||||||
|
#[arg(long)]
|
||||||
output_file:PathBuf,
|
output_file:PathBuf,
|
||||||
|
#[arg(long)]
|
||||||
style:Option<DecompileStyle>,
|
style:Option<DecompileStyle>,
|
||||||
|
#[arg(long)]
|
||||||
template:Option<PathBuf>,
|
template:Option<PathBuf>,
|
||||||
}
|
}
|
||||||
#[derive(Args)]
|
#[derive(Args)]
|
||||||
struct DecompileSubcommand{
|
struct DecompileSubcommand{
|
||||||
|
#[arg(long)]
|
||||||
input_file:PathBuf,
|
input_file:PathBuf,
|
||||||
|
#[arg(long)]
|
||||||
output_folder:PathBuf,
|
output_folder:PathBuf,
|
||||||
|
#[arg(long)]
|
||||||
style:DecompileStyle,
|
style:DecompileStyle,
|
||||||
|
#[arg(long)]
|
||||||
write_template:Option<bool>,
|
write_template:Option<bool>,
|
||||||
|
#[arg(long)]
|
||||||
write_models:Option<bool>,
|
write_models:Option<bool>,
|
||||||
|
#[arg(long)]
|
||||||
write_scripts:Option<bool>,
|
write_scripts:Option<bool>,
|
||||||
}
|
}
|
||||||
#[derive(Args)]
|
#[derive(Args)]
|
||||||
struct DecompileHistoryIntoGitSubcommand{
|
struct DecompileHistoryIntoGitSubcommand{
|
||||||
|
#[arg(long)]
|
||||||
input_folder:PathBuf,
|
input_folder:PathBuf,
|
||||||
//currently output folder must be the current folder due to git2 limitations
|
//currently output folder must be the current folder due to git2 limitations
|
||||||
//output_folder:cli.output.unwrap(),
|
//output_folder:cli.output.unwrap(),
|
||||||
|
#[arg(long)]
|
||||||
style:DecompileStyle,
|
style:DecompileStyle,
|
||||||
|
#[arg(long)]
|
||||||
git_committer_name:String,
|
git_committer_name:String,
|
||||||
|
#[arg(long)]
|
||||||
git_committer_email:String,
|
git_committer_email:String,
|
||||||
|
#[arg(long)]
|
||||||
write_template:Option<bool>,
|
write_template:Option<bool>,
|
||||||
|
#[arg(long)]
|
||||||
write_models:Option<bool>,
|
write_models:Option<bool>,
|
||||||
|
#[arg(long)]
|
||||||
write_scripts:Option<bool>,
|
write_scripts:Option<bool>,
|
||||||
}
|
}
|
||||||
#[derive(Args)]
|
#[derive(Args)]
|
||||||
struct DownloadAndDecompileHistoryIntoGitSubcommand{
|
struct DownloadAndDecompileHistoryIntoGitSubcommand{
|
||||||
|
#[arg(long)]
|
||||||
asset_id:AssetID,
|
asset_id:AssetID,
|
||||||
|
#[arg(long)]
|
||||||
cookie_type:CookieType,
|
cookie_type:CookieType,
|
||||||
|
#[arg(long)]
|
||||||
cookie:String,
|
cookie:String,
|
||||||
//currently output folder must be the current folder due to git2 limitations
|
//currently output folder must be the current folder due to git2 limitations
|
||||||
//output_folder:cli.output.unwrap(),
|
//output_folder:cli.output.unwrap(),
|
||||||
|
#[arg(long)]
|
||||||
style:DecompileStyle,
|
style:DecompileStyle,
|
||||||
|
#[arg(long)]
|
||||||
git_committer_name:String,
|
git_committer_name:String,
|
||||||
|
#[arg(long)]
|
||||||
git_committer_email:String,
|
git_committer_email:String,
|
||||||
|
#[arg(long)]
|
||||||
write_template:Option<bool>,
|
write_template:Option<bool>,
|
||||||
|
#[arg(long)]
|
||||||
write_models:Option<bool>,
|
write_models:Option<bool>,
|
||||||
|
#[arg(long)]
|
||||||
write_scripts:Option<bool>,
|
write_scripts:Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user