From cec3718bdd089bcf58575740c5ae4f86b27226d1 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Sat, 14 Jan 2023 19:59:12 -0700 Subject: markdown converter --- examples/gmi2md/main.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 examples/gmi2md/main.go (limited to 'examples/gmi2md') diff --git a/examples/gmi2md/main.go b/examples/gmi2md/main.go new file mode 100644 index 0000000..386983a --- /dev/null +++ b/examples/gmi2md/main.go @@ -0,0 +1,20 @@ +package main + +import ( + "log" + "os" + + "tildegit.org/tjp/gus/gemtext" + "tildegit.org/tjp/gus/gemtext/mdconv" +) + +func main() { + gmiDoc, err := gemtext.Parse(os.Stdin) + if err != nil { + log.Fatal(err) + } + + if err := mdconv.Convert(os.Stdout, gmiDoc, nil); err != nil { + log.Fatal(err) + } +} -- cgit v1.2.3