diff --git a/src/cli.rs b/src/cli.rs index eb6c610..22cc156 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -155,7 +155,13 @@ impl<'a> TryFrom> for AppConfig { arg_matches.is_present("verbosity") && !arg_matches.is_present("log-to-file"), ) .log_level(match arg_matches.occurrences_of("verbosity") { - 0 => LogLevel::Off, + 0 => { + if !arg_matches.is_present("log-to-file") { + LogLevel::Off + } else { + LogLevel::Debug + } + } 1 => LogLevel::Error, 2 => LogLevel::Warn, 3 => LogLevel::Info, diff --git a/src/epub.rs b/src/epub.rs index 667e2f7..e573260 100644 --- a/src/epub.rs +++ b/src/epub.rs @@ -18,6 +18,10 @@ pub fn generate_epubs( app_config: &AppConfig, successful_articles_table: &mut Table, ) -> Result<(), Vec> { + if articles.is_empty() { + return Ok(()); + } + let bar = if app_config.can_disable_progress_bar { ProgressBar::hidden() } else { diff --git a/src/extractor.rs b/src/extractor.rs index 2cf3f25..110357b 100644 --- a/src/extractor.rs +++ b/src/extractor.rs @@ -103,7 +103,7 @@ pub fn serialize_to_xhtml( let attrs_str = attrs .map .iter() - .filter(|(k, _)| &k.local != "\"") + .filter(|(k, _)| !k.local.contains("\"")) .map(|(k, v)| { format!( "{}=\"{}\"",