Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lpil/htmgrrrl

Gleam bindings to htmerl, the fast and memory efficient HTML SAX parser.
https://github.com/lpil/htmgrrrl

Last synced: 21 days ago
JSON representation

Gleam bindings to htmerl, the fast and memory efficient HTML SAX parser.

Awesome Lists containing this project

README

        

# htmgrrrl

[![Package Version](https://img.shields.io/hexpm/v/htmgrrrl)](https://hex.pm/packages/htmgrrrl)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/htmgrrrl/)

Gleam bindings to [htmerl](https://github.com/zadean/htmerl), the fast and
memory efficient Erlang HTML SAX parser.

```gleam
import htmgrrrl.{Characters}

pub fn main() {
let take_text = fn(state, _line, event) {
case event {
Characters(text) -> [text, ..state]
_ -> state
}
}

"

Hello, Joe!

Hello, Mike!

"
|> htmgrrrl.sax([], take_text)
// => Ok(["Hello, Mike!", "Hello, Joe!"])
}
```

## Installation

This package can be added to your Gleam project:

```sh
gleam add htmgrrrl
```

and its documentation can be found at .

## What's with the name?

It's a Gleam-y play on "htmerl" that makes a nod to [Riot Grrrl](https://en.wikipedia.org/wiki/Riot_grrrl).