add documentation, update dependencies #6

Merged
Quaternions merged 4 commits from staging into master 2024-09-17 04:44:30 +00:00
Showing only changes of commit 00f8cddde0 - Show all commits

View File

@ -38,6 +38,7 @@ enum Commands{
DownloadAndDecompileHistoryIntoGit(DownloadAndDecompileHistoryIntoGitSubcommand), DownloadAndDecompileHistoryIntoGit(DownloadAndDecompileHistoryIntoGitSubcommand),
} }
/// Download a range of assets from the asset version history. Download summary is saved to `output_folder/versions.json`, and can be optionally used to download only new versions the next time.
#[derive(Args)] #[derive(Args)]
struct DownloadHistorySubcommand{ struct DownloadHistorySubcommand{
#[arg(long)] #[arg(long)]
@ -57,6 +58,7 @@ struct DownloadHistorySubcommand{
#[arg(long)] #[arg(long)]
end_version:Option<u64>, end_version:Option<u64>,
} }
/// Download a single asset by id.
#[derive(Args)] #[derive(Args)]
struct DownloadSubcommand{ struct DownloadSubcommand{
#[arg(long,group="cookie",required=true)] #[arg(long,group="cookie",required=true)]
@ -70,6 +72,7 @@ struct DownloadSubcommand{
#[arg(required=true)] #[arg(required=true)]
asset_ids:Vec<AssetID>, asset_ids:Vec<AssetID>,
} }
/// Download the list of asset ids (not the assets themselves) in a group inventory. The output is written to `output_folder/versions.json`
#[derive(Args)] #[derive(Args)]
struct DownloadGroupInventoryJsonSubcommand{ struct DownloadGroupInventoryJsonSubcommand{
#[arg(long,group="cookie",required=true)] #[arg(long,group="cookie",required=true)]
@ -83,6 +86,7 @@ struct DownloadGroupInventoryJsonSubcommand{
#[arg(long)] #[arg(long)]
group:u64, group:u64,
} }
/// Upload a (.rbxm, .rbxmx) model file, creating a new asset. Can be any type of model, including modulescripts.
#[derive(Args)] #[derive(Args)]
struct CreateAssetSubcommand{ struct CreateAssetSubcommand{
#[arg(long,group="cookie",required=true)] #[arg(long,group="cookie",required=true)]
@ -104,6 +108,7 @@ struct CreateAssetSubcommand{
#[arg(long)] #[arg(long)]
allow_comments:Option<bool>, allow_comments:Option<bool>,
} }
/// Upload a media file (.jpg, .png) to a new asset and print the asset id
#[derive(Args)] #[derive(Args)]
struct CreateAssetMediaSubcommand{ struct CreateAssetMediaSubcommand{
#[arg(long,group="api_key",required=true)] #[arg(long,group="api_key",required=true)]
@ -128,8 +133,8 @@ struct CreateAssetMediaSubcommand{
#[arg(long)] #[arg(long)]
expected_price:Option<u64>, expected_price:Option<u64>,
} }
/// Upload multiple media files (.jpg, .png) Automatically detect the media type from file extension and generate asset name and description. If you want support for more file types (.fbx, .mp3, .ogg) it should be fairly straightforward, just ask.
#[derive(Args)] #[derive(Args)]
/// Automatically detect the media type from file extension and generate asset name and description
struct CreateAssetMediasSubcommand{ struct CreateAssetMediasSubcommand{
#[arg(long,group="api_key",required=true)] #[arg(long,group="api_key",required=true)]
api_key_literal:Option<String>, api_key_literal:Option<String>,
@ -154,6 +159,7 @@ struct CreateAssetMediasSubcommand{
expected_price:Option<u64>, expected_price:Option<u64>,
input_files:Vec<PathBuf>, input_files:Vec<PathBuf>,
} }
/// Upload a (.rbxm, .rbxmx) model file to an existing asset. Can be any type of model, including modulescripts.
#[derive(Args)] #[derive(Args)]
struct UpdateAssetSubcommand{ struct UpdateAssetSubcommand{
#[arg(long)] #[arg(long)]
@ -177,6 +183,7 @@ struct UpdateAssetSubcommand{
#[arg(long)] #[arg(long)]
change_allow_comments:Option<bool>, change_allow_comments:Option<bool>,
} }
/// Upload a media file (.jpg, .png) to an existing asset.
#[derive(Args)] #[derive(Args)]
struct UpdateAssetMediaSubcommand{ struct UpdateAssetMediaSubcommand{
#[arg(long)] #[arg(long)]
@ -190,6 +197,7 @@ struct UpdateAssetMediaSubcommand{
#[arg(long)] #[arg(long)]
input_file:PathBuf, input_file:PathBuf,
} }
/// Upload a place file (.rbxl, .rbxlx) to an existing place.
#[derive(Args)] #[derive(Args)]
struct UpdatePlaceSubcommand{ struct UpdatePlaceSubcommand{
#[arg(long)] #[arg(long)]
@ -205,6 +213,7 @@ struct UpdatePlaceSubcommand{
#[arg(long)] #[arg(long)]
input_file:PathBuf, input_file:PathBuf,
} }
/// Take an input folder containing scripts and models and turn it into a roblox file. The two types of files (.rbxl: place, .rbxm: model) are actually the same file format, only the contents differ.
#[derive(Args)] #[derive(Args)]
struct CompileSubcommand{ struct CompileSubcommand{
#[arg(long)] #[arg(long)]
@ -216,6 +225,7 @@ struct CompileSubcommand{
#[arg(long)] #[arg(long)]
template:Option<PathBuf>, template:Option<PathBuf>,
} }
/// Take an input folder containing scripts and models and turn it into a roblox file, then upload it to the specified asset id. Does not work for places.
#[derive(Args)] #[derive(Args)]
struct CompileUploadAssetSubcommand{ struct CompileUploadAssetSubcommand{
#[arg(long)] #[arg(long)]
@ -235,6 +245,7 @@ struct CompileUploadAssetSubcommand{
#[arg(long)] #[arg(long)]
template:Option<PathBuf>, template:Option<PathBuf>,
} }
/// Take an input folder containing scripts and models and turn it into a roblox file, then upload it to the specified place id. Does not work for model asset ids.
#[derive(Args)] #[derive(Args)]
struct CompileUploadPlaceSubcommand{ struct CompileUploadPlaceSubcommand{
#[arg(long)] #[arg(long)]
@ -254,6 +265,7 @@ struct CompileUploadPlaceSubcommand{
#[arg(long)] #[arg(long)]
template:Option<PathBuf>, template:Option<PathBuf>,
} }
/// Take a roblox file (.rbxm, .rbxl) and turn it into a folder containing scripts and models. Rox style means property overrides are written to the top of scripts, Rojo style means property overrides are written to the script file extension (Script.server.lua).
#[derive(Args)] #[derive(Args)]
struct DecompileSubcommand{ struct DecompileSubcommand{
#[arg(long)] #[arg(long)]
@ -269,6 +281,7 @@ struct DecompileSubcommand{
#[arg(long)] #[arg(long)]
write_scripts:Option<bool>, write_scripts:Option<bool>,
} }
/// Download a model from the specified asset id, and decompile it into a folder in one swift motion. The model file is not saved to disk. This also works for places.
#[derive(Args)] #[derive(Args)]
struct DownloadDecompileSubcommand{ struct DownloadDecompileSubcommand{
#[arg(long,group="cookie",required=true)] #[arg(long,group="cookie",required=true)]
@ -290,6 +303,7 @@ struct DownloadDecompileSubcommand{
#[arg(long)] #[arg(long)]
write_scripts:Option<bool>, write_scripts:Option<bool>,
} }
/// Take a folder of asset history (containing `versions.json`) and decompile each version into its own git commit. This must be run with the desired output folder as the current directory due to git2 limitations.
#[derive(Args)] #[derive(Args)]
struct DecompileHistoryIntoGitSubcommand{ struct DecompileHistoryIntoGitSubcommand{
#[arg(long)] #[arg(long)]
@ -309,6 +323,7 @@ struct DecompileHistoryIntoGitSubcommand{
#[arg(long)] #[arg(long)]
write_scripts:Option<bool>, write_scripts:Option<bool>,
} }
/// Download asset history, download asset versions, decompile into folder, create a git commit for each version. This is a combination of two commands (download-history, decompile-history-into-git) except without intermediate files.
#[derive(Args)] #[derive(Args)]
struct DownloadAndDecompileHistoryIntoGitSubcommand{ struct DownloadAndDecompileHistoryIntoGitSubcommand{
#[arg(long)] #[arg(long)]