From bc03b96e42096dde534546b60431bdbd781c47dc Mon Sep 17 00:00:00 2001 From: TomLebeda Date: Fri, 27 Sep 2024 08:51:30 +0200 Subject: [PATCH] added --dump --- .gitignore | 1 + src/main.rs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 9b9aeb8..065c3be 100755 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .vimproject sample_latex_project builder_script.sh +test.html diff --git a/src/main.rs b/src/main.rs index 08d5eea..e253076 100755 --- a/src/main.rs +++ b/src/main.rs @@ -63,6 +63,10 @@ pub struct CliArgs { #[arg(short, long)] pub verbose: bool, + /// Print the final text also into stdout + #[arg(short, long)] + pub dump: bool, + /// Escape double quotes `"` as `\dq{}` for users of babel with [ngerman] #[arg(short, long)] pub german: bool, @@ -183,6 +187,9 @@ fn main() { } let highlighted_text_pieces = extract_highlighted_pieces(out.stdout, &conf); let generated_latex = generate_latex_verbatim(highlighted_text_pieces, &conf); + if conf.dump { + println!("{}", generated_latex); + } if let Err(write_err) = std::fs::write(output_file, generated_latex) { println!( "Sorry, there was error while trying to write the output file: {}",