Module: parsers/pptxparser.py

Purpose:

This module serves as the public interface for interacting with PPTX files and parsing their contents.

Platform:

Linux/Windows | Python 3.10+

Developer:

J Berendt

Email:

development@s3dev.uk

Comments:

n/a

Example:

For example code usage, please refer to the PPTXParser class docstring.

class PPTXParser(path: str)[source]

Bases: _PPTXTextParser

PPTX document parser.

Parameters:

path (str) – Full path to the PPTX document to be parsed.

Example:

Extract text from a PPTX file:

>>> from docp import PPTXParser

>>> pptx = PPTXParser(path='/path/to/myfile.pptx')
>>> pptx.extract_text()

# Access the text on slide 1.
>>> pg1 = pptx.doc.slides[1].content