readability v0.3.1 Readability

Readability library for extracting & curating articles.

Example

@type html :: binary

# extract title
Readability.title(html)

# extract only text from article
article = html
          |> Readability.article
          |> Readability.readable_text

# extract article with transformed html
article = html
          |> Readability.article
          |> Readability.raw_html

Summary

Functions

Using a variety of metrics (content score, classname, element types), find the content that is most likely to be the stuff a user wants to read

Normalize and Parse to html tree(tuple or list)) from binary html

return raw html binary from html tree tuple

return only text binary from html tree tuple

Types

html_tree :: tuple | list
options :: list

Functions

article(raw_html, opts \\ [])

Specs

article(binary, options) :: binary

Using a variety of metrics (content score, classname, element types), find the content that is most likely to be the stuff a user wants to read

default_options()
parse(raw_html)

Specs

parse(binary) :: html_tree

Normalize and Parse to html tree(tuple or list)) from binary html

raw_html(html_tree)

Specs

raw_html(html_tree) :: binary
raw_html(html_tree) :: binary

return raw html binary from html tree tuple

readable_text(html_tree)

return only text binary from html tree tuple

regexes()
title(html)