readabilityrs 0.1.3

A Rust port of Mozilla's Readability library for extracting article content from web pages
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub mod converter;
pub mod options;
pub mod rules;
pub mod state;

pub use options::MarkdownOptions;

/// Convert cleaned HTML to markdown.
///
/// This is the main entry point for the markdown conversion module.
/// The HTML should already be standardized via `elements::standardize_all()`.
pub fn html_to_markdown(html: &str, options: &MarkdownOptions) -> String {
    let doc = scraper::Html::parse_fragment(html);
    converter::convert(&doc, options)
}