diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index e582af9..6981b8e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,15 +2,16 @@ mod cli; mod config; mod cookies; mod display; +mod http_client; use clap::Parser; use cli::Args; use cookies::CookieStore; use display::Display; +use http_client::HttpClient; fn main() { let args = Args::parse(); - let mut ui = Display::new(&args.bookid); let cookies_path = config::cookies_file(); @@ -38,6 +39,13 @@ fn main() { names.join(", ") )); + // Build the HTTP client with our cookies (no network calls yet). + let _client = match HttpClient::from_store(&store) { + Ok(c) => c, + Err(e) => ui.error_and_exit(&format!("Failed to build HTTP client: {e}")), + }; + ui.info("HTTP client initialized with cookies (no requests performed)."); + let output_dir = config::books_root().join(format!("(pending) ({})", args.bookid)); ui.set_output_dir(output_dir); |
