Skip to content
/ htmgrrrl Public

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

Notifications You must be signed in to change notification settings

lpil/htmgrrrl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

htmgrrrl

Package Version Hex Docs

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

import htmgrrrl.{Characters}

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

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

Installation

This package can be added to your Gleam project:

gleam add htmgrrrl

and its documentation can be found at https://hexdocs.pm/htmgrrrl.

What's with the name?

It's a Gleam-y play on "htmerl" that makes a nod to Riot Grrrl.

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published