From 4c2630752f7367fff491a6ba53303e9102da7da0 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Sun, 15 Jan 2023 19:59:58 -0700 Subject: Completed markdown and HTML conversion. --- examples/gmi2html/main.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 examples/gmi2html/main.go (limited to 'examples/gmi2html/main.go') diff --git a/examples/gmi2html/main.go b/examples/gmi2html/main.go new file mode 100644 index 0000000..f6131f3 --- /dev/null +++ b/examples/gmi2html/main.go @@ -0,0 +1,20 @@ +package main + +import ( + "log" + "os" + + "tildegit.org/tjp/gus/gemtext" + "tildegit.org/tjp/gus/gemtext/htmlconv" +) + +func main() { + gmiDoc, err := gemtext.Parse(os.Stdin) + if err != nil { + log.Fatal(err) + } + + if err := htmlconv.Convert(os.Stdout, gmiDoc, nil); err != nil { + log.Fatal(err) + } +} -- cgit v1.2.3