diff options
| author | Xe Iaso <me@christine.website> | 2022-11-27 22:02:57 -0500 |
|---|---|---|
| committer | Xe Iaso <me@christine.website> | 2022-11-27 22:02:57 -0500 |
| commit | 1f17bef1102f4fec92f1ced4890d5e77300a8f28 (patch) | |
| tree | 33d1c43107f02c0335ec28791bc1aca186a4e8dc | |
| parent | cc933b31fd23bb06e95bf41f848a1c99353d44ae (diff) | |
| download | xesite-1f17bef1102f4fec92f1ced4890d5e77300a8f28.tar.xz xesite-1f17bef1102f4fec92f1ced4890d5e77300a8f28.zip | |
lib/xesite_markdown: add xesite markdown to HTML tool
Signed-off-by: Xe Iaso <me@christine.website>
| -rw-r--r-- | lib/xesite_markdown/src/bin/xemd2html.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/xesite_markdown/src/bin/xemd2html.rs b/lib/xesite_markdown/src/bin/xemd2html.rs new file mode 100644 index 0000000..6e54ab2 --- /dev/null +++ b/lib/xesite_markdown/src/bin/xemd2html.rs @@ -0,0 +1,15 @@ +use color_eyre::eyre::Result; +use std::io::{prelude::*, stdin, stdout}; + +fn main() -> Result<()> { + let mut input = String::new(); + let mut fin = stdin().lock(); + fin.read_to_string(&mut input)?; + + let result = xesite_markdown::render(&input)?; + + let mut fout = stdout().lock(); + fout.write(result.as_bytes())?; + + Ok(()) +} |
