diff options
Diffstat (limited to 'isabelle2unicode')
-rw-r--r-- | isabelle2unicode/Cargo.toml | 10 | ||||
-rw-r--r-- | isabelle2unicode/src/main.rs | 23 |
2 files changed, 33 insertions, 0 deletions
diff --git a/isabelle2unicode/Cargo.toml b/isabelle2unicode/Cargo.toml new file mode 100644 index 0000000..53a5aa4 --- /dev/null +++ b/isabelle2unicode/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "isabelle2unicode" +version = "0.1.0" +authors = ["stuebinm <stuebinm@disroot.org>"] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +isabelle-unicode = { path = "../isabelle-unicode" } diff --git a/isabelle2unicode/src/main.rs b/isabelle2unicode/src/main.rs new file mode 100644 index 0000000..4670b38 --- /dev/null +++ b/isabelle2unicode/src/main.rs @@ -0,0 +1,23 @@ +use std::io; +use std::io::BufRead; + +use isabelle_unicode::PrettyUnicode; + + +fn main() { + + let stdin = io::stdin(); + + stdin.lock() + .lines() + .filter_map(|line| match line { + Ok(line) if line.trim().is_empty() + => Some("\n".to_string()), + Ok(line) + => line.to_pretty_unicode(), + Err(_) + => None + }) + .for_each(|line| print!("{}", line)); + +} |