Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Shresthutk/python-pptx

Open more actions menu
 
 

Repository files navigation

Python-pptx-Enhanced

Basically, this is python-pptx, just with support for few new functions and few bugs fixes.

Function Added

Remove method to directly remove a table or groupshape or a picture
e.g prs = presentation(file_path)
prs.slides[slide_index].shapes[shape_index].remove() will remove the element

replace_with_picture method to replace a shape within a slide with a picture
e.g.
prs.replace_with_picture(slide_index,shape_name,img_path)

shape_index method simply returns the index of a shape from its name
e.g
prs.shape_index(slide_index,shape_name) returns the index of shape that you can use to target a particular shape in the slide

update_text method updated the text within a text frame while retaining the original formatting of the text
e.g
textFrame = prs.slides[6].shapes[8].text_frame
textFrame.update_text(new_text) will update the text in that text frame while retaining the format of old text.
This method returns the updated text

Issue Fixed

Fixed issue with Python 3.10+ - "AttributeError: module 'collections' has no attribute 'abc'"

A typical use would be generating a customized PowerPoint presentation from database content, downloadable by clicking a link in a web application. Several developers have used it to automate production of presentation-ready engineering status reports based on information held in their work management system. It could also be used for making bulk updates to a library of presentations or simply to automate the production of a slide or two that would be tedious to get right by hand.

More information is available in the python-pptx documentation_.

Browse examples with screenshots_ to get a quick idea what you can do with python-pptx.

.. _python-pptx documentation: https://python-pptx.readthedocs.org/en/latest/

.. _examples with screenshots: https://python-pptx.readthedocs.org/en/latest/user/quickstart.html

About

Create Open XML PowerPoint documents in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.3%
  • Gherkin 5.6%
  • Makefile 0.1%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.