forked from StrafesNET/asset-tool
try this
This commit is contained in:
parent
91aa21a993
commit
c43ed400c9
40
src/main.rs
40
src/main.rs
@ -35,7 +35,7 @@ struct DownloadHistorySubcommand{
|
||||
cookie_type:CookieType,
|
||||
cookie:String,
|
||||
output_folder:Option<PathBuf>,
|
||||
continue_from_versions:bool,
|
||||
continue_from_versions:Option<bool>,
|
||||
start_version:Option<u64>,
|
||||
end_version:Option<u64>,
|
||||
}
|
||||
@ -66,9 +66,9 @@ struct DecompileSubcommand{
|
||||
input_file:PathBuf,
|
||||
output_folder:PathBuf,
|
||||
style:DecompileStyle,
|
||||
write_template:bool,
|
||||
write_models:bool,
|
||||
write_scripts:bool,
|
||||
write_template:Option<bool>,
|
||||
write_models:Option<bool>,
|
||||
write_scripts:Option<bool>,
|
||||
}
|
||||
#[derive(Args)]
|
||||
struct DecompileHistoryIntoGitSubcommand{
|
||||
@ -78,9 +78,9 @@ struct DecompileHistoryIntoGitSubcommand{
|
||||
style:DecompileStyle,
|
||||
git_committer_name:String,
|
||||
git_committer_email:String,
|
||||
write_template:bool,
|
||||
write_models:bool,
|
||||
write_scripts:bool,
|
||||
write_template:Option<bool>,
|
||||
write_models:Option<bool>,
|
||||
write_scripts:Option<bool>,
|
||||
}
|
||||
#[derive(Args)]
|
||||
struct DownloadAndDecompileHistoryIntoGitSubcommand{
|
||||
@ -92,9 +92,9 @@ struct DownloadAndDecompileHistoryIntoGitSubcommand{
|
||||
style:DecompileStyle,
|
||||
git_committer_name:String,
|
||||
git_committer_email:String,
|
||||
write_template:bool,
|
||||
write_models:bool,
|
||||
write_scripts:bool,
|
||||
write_template:Option<bool>,
|
||||
write_models:Option<bool>,
|
||||
write_scripts:Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Clone,clap::ValueEnum)]
|
||||
@ -136,7 +136,7 @@ async fn main()->AResult<()>{
|
||||
let cli=Cli::parse();
|
||||
match cli.command{
|
||||
Commands::DownloadHistory(subcommand)=>download_history(DownloadHistoryConfig{
|
||||
continue_from_versions:subcommand.continue_from_versions,
|
||||
continue_from_versions:subcommand.continue_from_versions.unwrap_or(false),
|
||||
end_version:subcommand.end_version,
|
||||
start_version:subcommand.start_version.unwrap_or(0),
|
||||
output_folder:subcommand.output_folder.unwrap_or_else(||std::env::current_dir().unwrap()),
|
||||
@ -169,9 +169,9 @@ async fn main()->AResult<()>{
|
||||
style:subcommand.style,
|
||||
input_file:subcommand.input_file,
|
||||
output_folder:subcommand.output_folder,
|
||||
write_template:subcommand.write_template,
|
||||
write_models:subcommand.write_models,
|
||||
write_scripts:subcommand.write_scripts,
|
||||
write_template:subcommand.write_template.unwrap_or(false),
|
||||
write_models:subcommand.write_models.unwrap_or(false),
|
||||
write_scripts:subcommand.write_scripts.unwrap_or(true),
|
||||
}).await,
|
||||
Commands::DecompileHistoryIntoGit(subcommand)=>decompile_history_into_git(DecompileHistoryConfig{
|
||||
git_committer_name:subcommand.git_committer_name,
|
||||
@ -179,9 +179,9 @@ async fn main()->AResult<()>{
|
||||
input_folder:subcommand.input_folder,
|
||||
output_folder:std::env::current_dir()?,
|
||||
style:subcommand.style,
|
||||
write_template:subcommand.write_template,
|
||||
write_models:subcommand.write_models,
|
||||
write_scripts:subcommand.write_scripts,
|
||||
write_template:subcommand.write_template.unwrap_or(false),
|
||||
write_models:subcommand.write_models.unwrap_or(false),
|
||||
write_scripts:subcommand.write_scripts.unwrap_or(true),
|
||||
}).await,
|
||||
Commands::DownloadAndDecompileHistoryIntoGit(subcommand)=>download_and_decompile_history_into_git(DownloadAndDecompileHistoryConfig{
|
||||
git_committer_name:subcommand.git_committer_name,
|
||||
@ -190,9 +190,9 @@ async fn main()->AResult<()>{
|
||||
asset_id:subcommand.asset_id,
|
||||
output_folder:std::env::current_dir()?,
|
||||
style:subcommand.style,
|
||||
write_template:subcommand.write_template,
|
||||
write_models:subcommand.write_models,
|
||||
write_scripts:subcommand.write_scripts,
|
||||
write_template:subcommand.write_template.unwrap_or(false),
|
||||
write_models:subcommand.write_models.unwrap_or(false),
|
||||
write_scripts:subcommand.write_scripts.unwrap_or(true),
|
||||
}).await,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user