summaryrefslogtreecommitdiff
path: root/examples/gmi2md
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gmi2md')
-rw-r--r--examples/gmi2md/main.go20
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)
+ }
+}