2023-01-03 10:33:42 +00:00
|
|
|
fn main() -> Result<(), un_pak::Error> {
|
2023-01-06 19:54:48 +00:00
|
|
|
let path = std::env::args().nth(1).unwrap_or_default();
|
|
|
|
for version in un_pak::Version::iter() {
|
|
|
|
print!("{version} - ");
|
2023-01-06 12:40:37 +00:00
|
|
|
match un_pak::Pak::new(
|
|
|
|
version,
|
2023-01-06 19:54:48 +00:00
|
|
|
std::io::BufReader::new(std::fs::OpenOptions::new().read(true).open(&path)?),
|
2023-01-06 12:40:37 +00:00
|
|
|
) {
|
2023-01-06 19:54:48 +00:00
|
|
|
Ok(pak) => {
|
|
|
|
print!("{:#?}", pak);
|
2023-01-03 10:33:42 +00:00
|
|
|
println!("parsed successfully!");
|
|
|
|
}
|
|
|
|
Err(e) => println!("{e}"),
|
|
|
|
}
|
|
|
|
}
|
2023-01-06 19:54:48 +00:00
|
|
|
std::thread::sleep_ms(10000);
|
|
|
|
Ok(())
|
2023-01-03 10:33:42 +00:00
|
|
|
}
|