This is a command-line tool to convert structured HTML slides into a PowerPoint (.pptx) presentation.
It is recommended to use uv to install the dependencies.
uv pip install -r requirements.txtpython html2ppt.py -i <input.html> -o <output.pptx>python html2ppt.py -i example.html -o presentation.pptxThis will convert the example.html file into a presentation.pptx file.
The tool expects a specific HTML structure to correctly identify slides and content. Each slide should be a <section> tag within a div with the class slides.
The following HTML tags are supported:
<h1>,<h2>,<h3>,<h4>: Slide titles<p>: Paragraphs<ul>,<ol>,<li>: Lists<img>: Images (both local and remote)data-background-color: Slide background color
For more details, please refer to the example.html file.