This branch predates CI on `main`. `cargo fmt --all` only; no behaviour. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
25 lines
866 B
Rust
25 lines
866 B
Rust
use std::path::PathBuf;
|
|
use sylpheed_formats::{pak::PakArchive, ui_layout};
|
|
fn main() {
|
|
let root = PathBuf::from(std::env::var("SYLPHEED_DISC").unwrap());
|
|
let ar = PakArchive::open(root.join("dat/GP_TITLE.pak")).unwrap();
|
|
for (i, e) in ar.entries().iter().enumerate() {
|
|
let Ok(by) = ar.read(e) else {
|
|
println!("{i:2} <unreadable>");
|
|
continue;
|
|
};
|
|
let names: Vec<String> = ui_layout::parse_build(&by)
|
|
.map(|b| b.sprites.keys().take(2).cloned().collect())
|
|
.unwrap_or_default();
|
|
let rec: Vec<String> = ui_layout::parse_build(&by)
|
|
.map(|b| b.records.keys().take(2).cloned().collect())
|
|
.unwrap_or_default();
|
|
println!(
|
|
"{i:2} {} B sprites {:?} records {:?}",
|
|
by.len(),
|
|
names,
|
|
rec
|
|
);
|
|
}
|
|
}
|