diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 8dd0b59..f6f4399 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,14 +3,19 @@ mod config; mod stackexchange; use config::Config; -use stackexchange::StackExchange; +use stackexchange::{LocalStorage, StackExchange}; fn main() { - let matches = cli::mk_app().get_matches(); + let config = config::user_config(); + let matches = cli::mk_app(&config).get_matches(); + + if matches.is_present("update-sites") { + LocalStorage::new().update_sites(); + } // TODO merge config from ArgMatch let se = StackExchange::new(Config { - api_key: String::from("8o9g7WcfwnwbB*Qp4VsGsw(("), + api_key: Some(String::from("8o9g7WcfwnwbB*Qp4VsGsw((")), limit: 1, site: String::from("stackoverflow"), }); |