Generate printable speaker cards from PowerPoint presentation notes
Project description
pptx-speaker-cards
Generate printable speaker cards from PowerPoint presentation notes. Creates A4 landscape PDF with 4 cards per page in a 2x2 grid, perfect for printing and using during presentations.
Features
- Rich Text Formatting: Preserves bold, italic, and bullet formatting from PowerPoint notes
- Smart Title Extraction: Uses first line of notes as card title
- Auto Font Sizing: Automatically reduces font size to fit content on cards
- Continuation Cards: Automatically splits long content across multiple cards
- OneDrive/SharePoint Support: Download and process presentations directly from sharing links
- Customizable Layout: Adjust margins, font sizes, and other formatting options
- Hidden Slides: Optionally include or exclude hidden slides
- Progress Feedback: Shows processing progress in console
Installation
Using pip
pip install pptx-speaker-cards
Using pipx (recommended for CLI tools)
pipx install pptx-speaker-cards
Using uv
uv tool install pptx-speaker-cards
Quick Start
# Process a local PowerPoint file
pptx-speaker-cards presentation.pptx
# Process from OneDrive/SharePoint public link
pptx-speaker-cards "https://your-sharepoint.com/.../file.pptx?e=..."
# Custom output filename
pptx-speaker-cards slides.pptx --output my-cards.pdf
# Adjust margins
pptx-speaker-cards slides.pptx --margin-top 10 --margin-left 8
Usage
pptx-speaker-cards [-h] [--version] [--slide-number {yes,no}]
[--title-font-size SIZE] [--body-font-size SIZE]
[--include-hidden] [--output PATH]
[--margin-top MM] [--margin-bottom MM]
[--margin-left MM] [--margin-right MM]
input
Positional Arguments
input- PowerPoint file path or OneDrive/SharePoint URL
Optional Arguments
-h, --help- Show help message and exit--version- Show program version number and exit--slide-number {yes,no}- Show slide numbers on cards (default: yes)--title-font-size SIZE- Title font size in points (default: 12.0)--body-font-size SIZE- Override body font size (default: auto-fit from 10pt down to 6pt)--include-hidden- Include hidden slides in output--output PATH- Output PDF path (default: [input]_speaker_notes.pdf)--margin-top MM- Top margin in millimeters (default: 5)--margin-bottom MM- Bottom margin in millimeters (default: 5)--margin-left MM- Left margin in millimeters (default: 5)--margin-right MM- Right margin in millimeters (default: 5)
Examples
Basic Usage
# Process local file with default settings
pptx-speaker-cards my-presentation.pptx
OneDrive/SharePoint Links
# Process presentation from OneDrive sharing link
pptx-speaker-cards "https://onedrive.live.com/...?e=xyz123"
# Process from SharePoint
pptx-speaker-cards "https://company.sharepoint.com/:p:/g/...?e=abc456"
Customization
# Custom output filename
pptx-speaker-cards slides.pptx --output speaker-cards-2026.pdf
# Larger title font
pptx-speaker-cards slides.pptx --title-font-size 14
# Fixed body font size (disable auto-sizing)
pptx-speaker-cards slides.pptx --body-font-size 9
# Wider margins for easier cutting
pptx-speaker-cards slides.pptx --margin-top 10 --margin-bottom 10
# Include hidden slides
pptx-speaker-cards slides.pptx --include-hidden
# No slide numbers
pptx-speaker-cards slides.pptx --slide-number no
Module Execution
# Can also be run as a module
python -m pptx_speaker_cards presentation.pptx
How It Works
Card Layout
Each card includes:
- Title (top-left): First line from speaker notes
- Slide Number (top-right): Original slide number (e.g., "5")
- Content (body): Remaining speaker notes with formatting preserved
Continuation Cards
When notes are too long to fit on a single card, the tool automatically:
- Reduces font size from 10pt down to 6pt minimum
- If still too long, splits content across multiple cards
- Labels continuation cards (e.g., "5+1", "5+2")
- Marks continuation titles with "..continued[Original Title]"
Text Formatting
Preserves from PowerPoint:
- Bold text
- Italic text
- Bullet points (•)
- Indentation levels
- Tab characters (converted to 4 spaces)
- Line breaks and paragraph spacing
Page Layout
- Page Size: A4 landscape (297mm × 210mm)
- Cards per Page: 4 (2×2 grid)
- Cut Lines: Dotted lines between cards for easy cutting
- Default Margins: 5mm on all sides of each card
PowerPoint Notes Format
For best results, format your PowerPoint notes as:
Title of the Slide
Main talking point here.
• First bullet point
• Second bullet point
Additional paragraphs...
The first line becomes the card title, and everything else becomes the card content.
Development
Setting Up Development Environment
# Clone the repository
git clone https://github.com/kageback/pptx-speaker-cards.git
cd pptx-speaker-cards
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run directly
python -m pptx_speaker_cards your-file.pptx
Building the Package
# Install build tools
pip install build twine
# Build distribution files
python -m build
# Check the built package
twine check dist/*
Running Tests
# Install test dependencies
pip install pytest
# Run tests
pytest tests/
Requirements
- Python 3.8 or higher
- python-pptx >= 0.6.23
- reportlab >= 4.1.0
- requests >= 2.31.0
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- Issues: Report bugs or request features on GitHub Issues
- Documentation: See this README and
pptx-speaker-cards --help
Changelog
See CHANGELOG.md for version history and changes.
Author
Magnus Kågebäck
Acknowledgments
- Built with python-pptx for PowerPoint processing
- Built with ReportLab for PDF generation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pptx_speaker_cards-1.0.0.tar.gz.
File metadata
- Download URL: pptx_speaker_cards-1.0.0.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
889a7ed88c85bb529caa56516ae1c64aed08007ee6191b2f8af11437eece5167
|
|
| MD5 |
9eef1ad286454c0531af568134e2a06d
|
|
| BLAKE2b-256 |
1bd01ccbf68f18aa5f3cc701d7998573b47503d24a0222ae6060b453151cc252
|
File details
Details for the file pptx_speaker_cards-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pptx_speaker_cards-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d66c340f5e54a799cdacaf60dcfe9a76b7712b7af98ccbad36cca695b363227
|
|
| MD5 |
59c7c39204d7075763fb44ef7eb97c41
|
|
| BLAKE2b-256 |
2e35626727bf0e4768a76ac920649d3dbaf092d3d1a1e86b6dab12d79392ae0b
|