aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2026-03-07 09:04:00 +0300
committerA Farzat <a@farzat.xyz>2026-03-07 09:07:38 +0300
commitc98b360d611c37315c9c5330089a1d91dbb2021c (patch)
treed190740bb24df7aaafe09e914aa2f1314dd70988 /src/main.rs
parent7e24d0cd5b671d06383466baf89c340023421d86 (diff)
downloadoreilly-epub-c98b360d611c37315c9c5330089a1d91dbb2021c.tar.gz
oreilly-epub-c98b360d611c37315c9c5330089a1d91dbb2021c.zip
Fix chapter contents to proper xml
Change resource URLs using attribute matching (only img src for now, should add more later). Add respective stylesheets to chapters.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 80f81e4..00e38a5 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,6 +1,7 @@
mod epub;
mod http_client;
mod models;
+mod xml;
use std::collections::HashMap;
use std::path::Path;
@@ -119,7 +120,7 @@ async fn main() -> Result<()> {
download_all_files(&client, &file_entries, dest_root).await?;
let epub_path = format!("Books/{0}/{0}.epub", args.bookid);
let epub_path = Path::new(&epub_path);
- create_epub_archive(dest_root, epub_path, &file_entries, &chapters)?;
+ create_epub_archive(&epub_data, dest_root, epub_path, &file_entries, &chapters)?;
Ok(())
}