diff options
| author | tjpcc <tjp@ctrl-c.club> | 2023-01-15 19:59:58 -0700 | 
|---|---|---|
| committer | tjpcc <tjp@ctrl-c.club> | 2023-01-15 19:59:58 -0700 | 
| commit | 4c2630752f7367fff491a6ba53303e9102da7da0 (patch) | |
| tree | 7819a03ddd08e9ee017e7245dfd58cde9f51857d /examples/gmi2html | |
| parent | cec3718bdd089bcf58575740c5ae4f86b27226d1 (diff) | |
Completed markdown and HTML conversion.
Diffstat (limited to 'examples/gmi2html')
| -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) +	} +} | 
