Skip to main content

Convert PPTX to text using python-pptx

Project description

pyconverters_pypowerpoint

license tests codecov docs version PyPI - Python Version

Convert PPTX presentations to Markdown using python-pptx.

Features

  • Converts PowerPoint slides to Markdown text (headings, lists, paragraphs, tables)
  • Optionally segments the output by slide (one Sentence span per page)
  • Optionally extracts embedded images as base64 data URIs, either as Markdown links or as AltText objects attached to the document
  • Registers as a pyconverters plugin under the entry point pypowerpoint

Requirements

  • Python ≥ 3.12

Installation

pip install pyconverters_pypowerpoint

Parameters

Parameter Type Default Description
one_segment_per_powerpoint_page bool False Add one Sentence span per slide in the output document
include_image_base64_as_links bool False Embed images as ![name](data:image/...;base64,...) links in the Markdown text
include_image_base64_as_altTexts bool False Attach images as AltText objects on the document (with mime-type property)

Developing

Pre-requisites

Install uv:

pip install uv

Clone the repository:

git clone https://github.com/oterrier/pyconverters_pypowerpoint
cd pyconverters_pypowerpoint

Install the package with test dependencies:

uv sync --extra test

Running the test suite

uv run pytest

Linting

uv run ruff check .
uv run ruff format --check .

Building the documentation

uv run --extra docs sphinx-build docs docs/_build

The built documentation is available at docs/_build/index.html.

SBOM & vulnerability check

Install the SBOM dependencies:

uv sync --extra sbom

Generate a CycloneDX SBOM from the current environment:

uv run cyclonedx-py environment -o sbom.cdx.json --output-format json

Audit dependencies for known vulnerabilities:

uv run pip-audit --format json --output audit-report.json

To fail on any known vulnerability (useful in CI):

uv run pip-audit --strict

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

pyconverters_pypowerpoint-1.6.61.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

pyconverters_pypowerpoint-1.6.61-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file pyconverters_pypowerpoint-1.6.61.tar.gz.

File metadata

  • Download URL: pyconverters_pypowerpoint-1.6.61.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyconverters_pypowerpoint-1.6.61.tar.gz
Algorithm Hash digest
SHA256 c8cbfed4c86489984fcf9eb4100d03692f9ebf973007d5a7311eb2db5e591b05
MD5 8e70d14ffddff6f6bcb432209ec2ac16
BLAKE2b-256 b484f1b249732487ce8c945b413abfdc58a7c1f046589ad46f6666de5b34868c

See more details on using hashes here.

File details

Details for the file pyconverters_pypowerpoint-1.6.61-py3-none-any.whl.

File metadata

  • Download URL: pyconverters_pypowerpoint-1.6.61-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.9 {"installer":{"name":"uv","version":"0.11.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyconverters_pypowerpoint-1.6.61-py3-none-any.whl
Algorithm Hash digest
SHA256 8a26c79bccdc033e29d2524ffff49e5cd44f8c8e4fba857d486a128c4fad0ae7
MD5 44ad69d2768f9b02249287587115ccac
BLAKE2b-256 d24011eb537633d232077e9d80cf8a6f97b39a2d00d6b89ca5375335e0bb6c10

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