diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gmi2html/main.go | 20 |
1 files changed, 20 insertions, 0 deletions
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) + } +} |