Skip to main content

A Python package for adding comments to PowerPoint presentations using OpenXML SDK

Project description

PowerPoint Comment Adder

A Python package for adding comments to PowerPoint presentations using Microsoft's OpenXML SDK.

Features

  • Add comments to specific slides in PowerPoint presentations
  • Cross-platform support (Windows, Linux, macOS)
  • Modern Office 2021 comment system support
  • Simple Python API
  • Command-line interface

Requirements

  • .NET 9.0 Runtime (for the underlying comment engine)
  • Python 3.7+

Installation

From Source

  1. Clone or download this repository
  2. Install the package in development mode:
pip install -e .

From PyPI (when published)

pip install powerpoint-commenter

Usage

Python API

from powerpoint_commenter import PowerPointCommenter

# Initialize the commenter
commenter = PowerPointCommenter()

# Add a comment to slide 1
success = commenter.add_comment(
    file_path="presentation.pptx",
    slide_number=1,
    author_name="John Doe",
    author_initials="JD",
    comment_text="This slide needs revision"
)

if success:
    print("Comment added successfully!")
else:
    print("Failed to add comment")

Command Line

# Add a comment via command line
python -m powerpoint_commenter.cli "presentation.pptx" 1 "John Doe" "JD" "This slide needs revision"

Platform Support

Windows

  • Requires .NET 9.0 Runtime
  • Fully supported

Linux

  • Requires .NET 9.0 Runtime (sudo apt install dotnet-runtime-9.0 on Ubuntu)
  • Fully supported

macOS

  • Requires .NET 9.0 Runtime (brew install dotnet)
  • Fully supported

Development

  1. Build the .NET component:
dotnet build -c Release
  1. Install in development mode:
pip install -e .
  1. Run tests:
pytest

License

MIT License - see LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Troubleshooting

.NET Runtime Not Found

If you get errors about .NET runtime not being found, install .NET 9.0:

  • Windows: Download from Microsoft .NET
  • Linux: sudo apt install dotnet-runtime-9.0 (Ubuntu/Debian)
  • macOS: brew install dotnet

Permission Errors

If you get permission errors on Linux/macOS, make sure the .NET application has execute permissions:

chmod +x powerpoint_commenter/bin/PowerPointCommentAdder

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powerpoint_commenter-1.0.1.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

powerpoint_commenter-1.0.1-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

Details for the file powerpoint_commenter-1.0.1.tar.gz.

File metadata

  • Download URL: powerpoint_commenter-1.0.1.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.4

File hashes

Hashes for powerpoint_commenter-1.0.1.tar.gz
Algorithm Hash digest
SHA256 19a8e781ce8ef7714aa29d3dc7601593952965796f7affe0623ae50bd6d68a79
MD5 78370648cdba818cdadae1f40e643946
BLAKE2b-256 2b7a1b2877cb6ecc788f6fcc6ba058857f7edde96826e5f9982cf69f6308caaf

See more details on using hashes here.

File details

Details for the file powerpoint_commenter-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for powerpoint_commenter-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1cebe4b496d832f8e3a20218981e8de3d6cc74b1640f0139d2dda8121cd0e567
MD5 ab39aea5fc6061fe62e8684a334c397d
BLAKE2b-256 ae24e054b61d2549048cdbc408b59b48c86184381c118e3d6c19d76952648a8e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page