Skip to main content

Module html

Module html 

Source
Expand description

HTML to PowerPoint conversion

Parses HTML content and converts it into PowerPoint slide structures. No external dependencies required - uses a lightweight state-machine parser.

§This is the Basic HTML Parser

This parser is designed for simple, fast HTML-to-PowerPoint conversion with minimal dependencies. For advanced web scraping and content extraction, see the web2ppt::parser module (requires scraper crate).

§When to use this parser:

  • Converting simple HTML strings
  • Processing well-structured HTML files
  • When you want zero external dependencies
  • For embedded applications

§When to use web2ppt::parser instead:

  • Processing live web pages with navigation/ads
  • When you need intelligent content extraction
  • For automatic content cleaning and detection
  • When you need to handle complex web page structures

§Supported HTML elements

  • <h1> → New slide title
  • <h2> through <h6> → Bold section headers on current slide
  • <p> → Bullet points / paragraphs
  • <ul>/<ol> with <li> → List items
  • <table> with <tr>/<th>/<td> → Table objects (styled header row)
  • <pre>/<code> → Code blocks
  • <img> → Image placeholders (with alt text)
  • <blockquote> → Speaker notes
  • <strong>/<b> → Bold text (via markdown-style **)
  • <em>/<i> → Italic text (via markdown-style *)
  • <a href="..."> → Hyperlink text
  • <hr> → Slide break
  • <br> → Line break within text
  • <title> → Presentation title (falls back to first <h1>)

Structs§

Html2Ppt
HTML to PowerPoint converter
HtmlParseOptions
Options for HTML parsing

Functions§

parse_html
Parse HTML content into slides with default options
parse_html_with_options
Parse HTML content into slides with custom options