Add command to list games with irregular paths

This commit is contained in:
mtkennerly 2023-11-29 17:32:34 +08:00
parent 23e5f483d4
commit e5a2b9dce9
No known key found for this signature in database
GPG key ID: E764BE00BE6E6408
2 changed files with 27 additions and 4 deletions

View file

@ -46,6 +46,8 @@ pub enum Subcommand {
Stats,
/// Find duplicate manifest entries.
Duplicates,
/// List games with irregular paths.
Irregular,
}
pub fn parse() -> Cli {
@ -158,6 +160,13 @@ pub async fn run(
}
}
}
Subcommand::Irregular => {
for (game, info) in &wiki_cache.0 {
if info.any_irregular_paths(game.to_string()) {
println!("{}", game);
}
}
}
}
Ok(())