diff --git a/sdgb-cli/src/commands.rs b/sdgb-cli/src/commands.rs index 85f8440..71580bd 100644 --- a/sdgb-cli/src/commands.rs +++ b/sdgb-cli/src/commands.rs @@ -96,6 +96,8 @@ pub enum Commands { }, #[cfg(feature = "fetchall")] ListAllUserDump {}, + #[cfg(feature = "fetchall")] + ScrapeAllB50Dump {}, Logout { #[arg(short, long)] diff --git a/sdgb-cli/src/main.rs b/sdgb-cli/src/main.rs index 71d5bee..ca5bdd8 100644 --- a/sdgb-cli/src/main.rs +++ b/sdgb-cli/src/main.rs @@ -255,12 +255,6 @@ async fn main() -> Result<(), Box> { cached_concurrent_fetch::(user_ids, &client, concurrency, PLAYERS) .await?; } - #[cfg(feature = "fetchall")] - Commands::ListAllUserDump {} => { - use crate::{cache::PLAYERS, utils::helpers::dump_cache}; - - dump_cache::("players.json", PLAYERS)?; - } #[cfg(feature = "fetchall")] Commands::ScrapeAllB50 { @@ -287,6 +281,19 @@ async fn main() -> Result<(), Box> { .await?; } + #[cfg(feature = "fetchall")] + Commands::ListAllUserDump {} => { + use crate::{cache::PLAYERS, utils::helpers::dump_cache}; + + dump_cache::("players.json", PLAYERS)?; + } + #[cfg(feature = "fetchall")] + Commands::ScrapeAllB50Dump {} => { + use crate::{cache::PLAYER_B50, utils::helpers::dump_cache}; + + dump_cache::("b50.json", PLAYER_B50)?; + } + Commands::Userdata { user_id } => { let action = async |_| match Sdgb1_50::request::<_, GetUserDataApiResp>( &client, diff --git a/sdgb-cli/src/utils/helpers/mod.rs b/sdgb-cli/src/utils/helpers/mod.rs index 9c92158..d2aea5c 100644 --- a/sdgb-cli/src/utils/helpers/mod.rs +++ b/sdgb-cli/src/utils/helpers/mod.rs @@ -20,6 +20,7 @@ use bincode::{BorrowDecode, Encode, borrow_decode_from_slice}; use crate::{EARLY_QUIT, cache}; +#[allow(unused)] pub fn read_cache_keys( definition: TableDefinition<'_, u32, Vec>, ) -> Result, Box> {