diff --git a/.gitignore b/.gitignore index 7f085ef..bb6faca 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /players*.json* /b50*.json* +/region*.json* /.python-version /uv.lock diff --git a/sdgb-cli/src/commands.rs b/sdgb-cli/src/commands.rs index 1a2f832..0b532b5 100644 --- a/sdgb-cli/src/commands.rs +++ b/sdgb-cli/src/commands.rs @@ -119,6 +119,8 @@ pub enum Commands { ListAllUserDump {}, #[cfg(feature = "fetchall")] ScrapeAllB50Dump {}, + #[cfg(feature = "fetchall")] + ScrapeAllRegionDump {}, Logout { #[arg(short, long)] diff --git a/sdgb-cli/src/main.rs b/sdgb-cli/src/main.rs index 9eda92c..5bf3ffd 100644 --- a/sdgb-cli/src/main.rs +++ b/sdgb-cli/src/main.rs @@ -321,6 +321,12 @@ async fn main() -> Result<(), Box> { dump_cache::("b50.json", B50)?; } + #[cfg(feature = "fetchall")] + Commands::ScrapeAllRegionDump {} => { + use crate::{cache::REGIONS, utils::helpers::dump_cache}; + + dump_cache::("region.json", REGIONS)?; + } Commands::Userdata { user_id } => { let action = async |_| match Sdgb1_50::request::<_, GetUserDataApiResp>(