aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2026-02-14 16:30:56 +0300
committerA Farzat <a@farzat.xyz>2026-02-14 16:30:56 +0300
commitca356049faf28ab48b73d04d80d4d11236d3abc6 (patch)
tree53651b39470ab50ec48b9a996947f30432b7cedb /src/main.rs
parent3b8e89a25ad712e14771dcbd35ec021d1da99ad9 (diff)
downloadsafaribooks-rs-ca356049faf28ab48b73d04d80d4d11236d3abc6.tar.gz
safaribooks-rs-ca356049faf28ab48b73d04d80d4d11236d3abc6.zip
Group skeleton initialization into one function
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs
index 83743a7..1fbcfc6 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -73,16 +73,8 @@ async fn main() {
ui.set_output_dir(skeleton.root.clone());
// Create directories and required files
- if let Err(e) = (|| -> anyhow::Result<()> {
- skeleton.create_dirs()?;
- skeleton.write_mimetype()?;
- skeleton.write_container_xml()?;
- Ok(())
- })() {
+ if let Err(e) = skeleton.initialize() {
ui.error_and_exit(&format!("EPUB skeleton creation failed: {e}"));
}
ui.info("EPUB skeleton ready (mimetype + META-INF/container.xml + OEBPS/).");
-
- ui.info("Initialization complete.");
- ui.info("No network operations performed in this version.");
}