This Python script automates the creation of personalized PowerPoint presentations and their conversion into PDF format. It dynamically reads names from a selected CSV file, applies these names to placeholders in PowerPoint templates, and generates a PDF for each customized presentation.
- Automated Personalization: Uses names from a CSV file to personalize PowerPoint templates.
- PDF Conversion: Converts each customized PowerPoint presentation into a PDF file.
- Template Selection: Chooses between short and long name templates based on name length.
- Dynamic CSV File Selection: Lists all CSV files in the current directory for user selection.
- Interactive Directory Confirmation: Allows users to confirm or change the working directory.
- Python with the following packages:
os
(standard library)comtypes
colorama
python-pptx
pandas
To install the necessary Python packages, use pip:
pip install python-pptx pandas colorama
Note: The comtypes
package may require installation with administrative privileges. To install comtypes
, run:
pip install comtypes
If you encounter permission issues, try running the command in an administrative command prompt or add the --user
flag to install it in the user directory:
pip install comtypes --user
- Ensure Required Files: Place the
required.pptx
template andrequired.csv
are in the same directory as the script. - Setup Environment: Ensure you are running this script on a windows machine with PowerPoint installed. Install all other dependancies.
- Run the Script: Execute
python converter.py
in your command line. - Select a CSV File: Choose a CSV file from the listed options in the current directory.
- Select a PPTX File: Choose a PPTX file from the listed options in the current directory.
- Check Output: The script generates PDFs in an
output_pdfs
folder within the same directory.
- CSV File Selection: Lists all CSV files in the current directory for the user to select.
- PPTX File Selection: Lists all PPTX files in the current directory for the user to select.
- Name Processing: Reads names and converts to PDF