Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lpil/htmgrrrl
Gleam bindings to htmerl, the fast and memory efficient HTML SAX parser.
https://github.com/lpil/htmgrrrl
Last synced: about 1 month ago
JSON representation
Gleam bindings to htmerl, the fast and memory efficient HTML SAX parser.
- Host: GitHub
- URL: https://github.com/lpil/htmgrrrl
- Owner: lpil
- Created: 2023-05-01T17:37:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-08T15:51:54.000Z (11 months ago)
- Last Synced: 2024-05-01T23:05:04.367Z (6 months ago)
- Language: Gleam
- Size: 8.79 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-gleam - htmgrrrl - [📚](https://hexdocs.pm/htmgrrrl/) - Gleam bindings to htmerl, the fast and memory efficient Erlang HTML SAX parser. (Packages / HTML)
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).