Giter VIP home page Giter VIP logo

pptx-py's Introduction

pptx-py

A Python library with various tools for enhancing python-pptx.

Usage

import pptxpy

This import attaches several methods to certain classes from python-pptx, implementing additional functionality (like cloning).

Documentation

Slides.duplicate(self, [slide_index: int], [slide_id: str])

Creates an identical copy of the Slide instance (given by either slide_index or slide_id) by cloning its corresponding SlidePart instance, then appends it to self. Return value: The newly created Slide instance.

Part.clone(self, [uri: PackURI], [cloner: Cloner])

Creates an exact copy of this Part instance. The new instance’s partname becomes uri if non-null, otherwise self.partname. The cloning process is performed recursively on all related parts, with the exception of the already cloned parts (stored in cloner._cache); however, if cloner is None then self is copied alone, without recursion. Return value: The newly created Part instance.

Part.is_similar(self, other)

Essentially performs shallow structural equality testing between self and other - with the exception of partname which is tested for similarity rather then equality. Return value: The Boolean result of the tests.

Part._clone(self, [uri: PackURI])

Creates a shallow duplicate of self, optionally having partname assigned the value of uri (if non-null), otherwise self.partname. Return value: The newly created Part instance.

RelationshipCollection.append(self, rel: _Relationship)

Creates a new _Relationship instance based on rel and inserts it into self. Return value: A Boolean value indicating whether rel is None.

RelationshipCollection.attach(self, rel: _Relationship)

Inserts rel into self, performing additional necessary bindings. Return value: rel.target_part.

RelationshipCollection.eq(self, other)

Performs structural equality testing between self and other. Return value: The Boolean result of the tests.

class Cloner

Utility class for handling the cloning process for a given _Relationship instance; uses a _cache to store all cloned Part instances - thus avoiding infinite recursion.

Dependencies

pptx-py does not currenly depend (explicitly) on any external packages; however, one has to ensure the presence of python-pptx in order to work with this library.

License

pptx-py's People

Contributors

denim2x avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.