GitHub - BaseMax/python-office-generator: Automatically generate PowerPoint, Word, and PDF presentations from structured data and research content.
Automatically generate PowerPoint, Word, and PDF presentations from structured data and research content.
๐ Overview
Python Office Generator is a script that automates the creation of academic and research presentations in multiple formats PPTX, DOCX, and PDF. This tool demonstrates how Python can integrate document-generation libraries to produce consistent, professional-quality materials for reports, lectures, and conferences.
The example included focuses on:
Machine Learning Applications in Environmental Sustainability ๐ฑ
It extracts figures from a PDF (using PyMuPDF), creates presentation slides, generates summary PDFs, and writes accompanying lecture notes in Word.
๐ Features
โ Extracts images directly from a PDF file โ Automatically builds PowerPoint slides from structured content โ Generates corresponding DOCX and PDF summary documents โ Adds visual figures into presentation slides โ Uses clean and readable formatting (fonts, colors, spacing) โ Ideal for academic and research-oriented automation
๐งฉ Technologies Used
| Library | Purpose |
|---|---|
python-pptx |
Generate PowerPoint slides |
python-docx |
Create Word documents |
reportlab |
Build formatted PDF summaries |
PyMuPDF (fitz) |
Extract images from PDFs |
os |
File system management |
๐ Output Files
When executed, the script produces the following files automatically:
| File | Description |
|---|---|
Presentation_ML_Sustainability.pptx |
Generated PowerPoint presentation |
Presentation_ML_Sustainability.pdf |
Summary document in PDF format |
Presentation_ML_Sustainability.docx |
Presentation notes in Word format |
figure_*.png |
Extracted images from source PDF |
โ๏ธ Installation
-
Clone the repository:
git clone https://github.com/BaseMax/python-office-generator cd python-office-generator -
Install the dependencies:
pip install -r requirements.txt
-
Add your source PDF file (e.g.
pdf.pdf) to the project root. -
Run the generator:
๐ง Example Topic
Machine Learning Applications in Environmental Sustainability
This example presentation includes sections like:
- Introduction to ML and sustainability
- Supervised & Unsupervised learning approaches
- Deep Learning in climate science
- Renewable energy forecasting case study
- Future research directions
๐งฉ Future Improvements
- Add CLI interface for dynamic content generation
- Support for LaTeX โ PPTX and Markdown โ DOCX conversion
- Automatic design themes and layouts
- Integration with AI summarization tools
๐ License
This project is licensed under the MIT License.
See the LICENSE file for details.
Copyright (c) 2025 Seyyed Ali Mohammadiyeh (Max Base)