PHPackages                             ancarda/gemtext-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. ancarda/gemtext-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

ancarda/gemtext-parser
======================

Gemtext (text/gemini) parser with conversion to HTML

1.0(4y ago)015MITPHPPHP ^8.0

Since Apr 16Pushed 4y agoCompare

[ Source](https://github.com/ancarda/gemtext-parser)[ Packagist](https://packagist.org/packages/ancarda/gemtext-parser)[ RSS](/packages/ancarda-gemtext-parser/feed)WikiDiscussions trunk Synced 1w ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

ancarda/gemtext-parser
======================

[](#ancardagemtext-parser)

*Gemtext (text/gemini) parser and HTML encoder*

[![License](https://camo.githubusercontent.com/3e916af0ce7e4796e96d3f10b7a843e30eb6a6f095a6601a578ac16377093c39/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d7465616c)](https://choosealicense.com/licenses/mit/)[![Latest Stable Version](https://camo.githubusercontent.com/9dc8b8535703976d2dff9c889a793d7eaab2d07f9b3da76fa90dd2fe595b9008/68747470733a2f2f706f7365722e707567782e6f72672f616e63617264612f67656d746578742d7061727365722f762f737461626c65)](https://packagist.org/packages/ancarda/gemtext-parser)[![Total Downloads](https://camo.githubusercontent.com/11faa619bb1d1351ce3752c3986f1452af6cbc3693c83508163d2054f099a16b/68747470733a2f2f706f7365722e707567782e6f72672f616e63617264612f67656d746578742d7061727365722f646f776e6c6f616473)](https://packagist.org/packages/ancarda/gemtext-parser)[![builds.sr.ht status](https://camo.githubusercontent.com/8e7e8e8bf814924505957ce9c6e46980bda7e82f0b0f02695e838d20d78207b7/68747470733a2f2f6275696c64732e73722e68742f7e616e63617264612f67656d746578742d7061727365722e737667)](https://builds.sr.ht/~ancarda/gemtext-parser?)

This package implements a PHP parser for Gemtext (`text/gemini`) as specified here:

Useful Links
------------

[](#useful-links)

- Source Code:
- Issue Tracker:
- Mailing List:

Usage
-----

[](#usage)

All the low level classes are built around `Generator`, which makes plugging in middleware easy while keeping memory usage low.

Unfortunately, Generators can be a bit of work to actually use. As such, a utility class, `SimpleTransformer` is available which abstracts this away if you just want a Gemtext to HTML conversion quickly and easily.

Here's how to convert Gemtext to HTML with the low level (`Generator`) API:

```
