No description
Find a file
2021-03-25 17:20:43 +01:00
src Initial commit 2021-03-25 17:19:21 +01:00
LICENSE Initial commit 2021-03-25 17:19:21 +01:00
parsegemini.nimble Initial commit 2021-03-25 17:19:21 +01:00
README.md Update README.md 2021-03-25 17:20:43 +01:00

parsegemini

A simple parser for text/gemini content. Read the documentation at the Gemini Project Website for more information.

Usage

  import streams

  const gemtext = """
# Hello, Gemini!
=> gemini://example.com Look, a link!

```alt text
some
  verbatim
     text
```"""
var p: GeminiParser
open(p, newStringStream(gemtext))
while true:
  p.next()
  case p.kind
  of gmiEof: break
  of gmiLink: echo $p.kind & " " & p.uri & " " & p.text
  else: echo $p.kind & " " & p.text
close(p)