based on map-tool
This commit is contained in:
parent
6d303334c9
commit
0a41d25270
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/target
|
1547
Cargo.lock
generated
Normal file
1547
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
16
Cargo.toml
Normal file
16
Cargo.toml
Normal file
@ -0,0 +1,16 @@
|
||||
[package]
|
||||
name = "asset-tool"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.75"
|
||||
clap = { version = "4.4.2", features = ["derive"] }
|
||||
lazy-regex = "3.1.0"
|
||||
rbx_binary = "0.7.1"
|
||||
rbx_dom_weak = "2.5.0"
|
||||
rbx_reflection_database = "0.2.7"
|
||||
rbx_xml = "0.13.1"
|
||||
reqwest = "0.11.23"
|
45
src/main.rs
Normal file
45
src/main.rs
Normal file
@ -0,0 +1,45 @@
|
||||
use std::io::{Read, Seek};
|
||||
use clap::{Args, Parser, Subcommand};
|
||||
use anyhow::Result as AResult;
|
||||
|
||||
type AssetID=u64;
|
||||
|
||||
#[derive(Parser)]
|
||||
#[command(author, version, about, long_about = None)]
|
||||
#[command(propagate_version = true)]
|
||||
struct Cli {
|
||||
#[command(subcommand)]
|
||||
command: Commands,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
enum Commands {
|
||||
Download(AssetIDList),
|
||||
Upload{path:std::path::PathBuf,assetid:u64},
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
struct PathBufList {
|
||||
paths:Vec<std::path::PathBuf>
|
||||
}
|
||||
|
||||
#[derive(Args)]
|
||||
struct AssetIDList {
|
||||
assetids: Vec<AssetID>,
|
||||
}
|
||||
|
||||
fn main() -> AResult<()> {
|
||||
let cli = Cli::parse();
|
||||
match cli.command {
|
||||
Commands::Download(assetid_list)=>download_list(assetid_list.assetids),
|
||||
Commands::Upload{path,assetid}=>upload_file(path,assetid),
|
||||
}
|
||||
}
|
||||
|
||||
fn upload_file(path:std::path::PathBuf,assetid:u64)->AResult<()>{
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn download_list(assetids:Vec<AssetID>)->AResult<()>{
|
||||
Ok(())
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user