Description
a tiny gemtext parser.
Description
gemmula is a tiny gemtext (unofficially text/gemini
) parser from and back into Text
, attempting to be mostly compliant with the Gemini hypertext format specification while being somewhat practical.
README.md
gemmula - a tiny gemtext parser for Haskell
The documentation is available at Hackage.
Example
>>> let document = Text.Gemini.decode <$> Data.Text.IO.readFile "examples/paradox.gmi"
>>> document
[ GemHeading 1 "gemmula"
, GemList [ "hello,"
, "world!"
]
, GemText ""
, GemQuote "made with"
, GemPre [ "<3"
]
(Just "ascii art of a heart")
, GemLink "https://www.haskell.org" (Just "and Haskell!")
]
>>> Text.Gemini.encode <$> document >>= Data.Text.IO.writeFile "examples/paradox.gmi"
See also
- Project Gemini for more about the Gemini protocol itself.
- Gemini hypertext format specification for the specification this package is trying to comply with.
- Awesome Gemini to discover more projects about Gemini.