diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-01-14 19:59:12 -0700 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-01-14 19:59:12 -0700 |
commit | cec3718bdd089bcf58575740c5ae4f86b27226d1 (patch) | |
tree | 497733255e0459d2a6bcbd059ea3e124d602d1b2 /examples/gmi2md/main.go | |
parent | 88b98dcf18f9bc9b098a574c96deabf9d323a997 (diff) |
markdown converter
Diffstat (limited to 'examples/gmi2md/main.go')
-rw-r--r-- | examples/gmi2md/main.go | 20 |
1 files changed, 20 insertions, 0 deletions
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) + } +} |