timhoffm / pptx-blueprint Goto Github PK
View Code? Open in Web Editor NEWPowerPoint templating engine
License: MIT License
PowerPoint templating engine
License: MIT License
Apart from replacing a placeholder with a table, a valid use case is layouting a table in the template and only populating the fields with values.
This needs a bit of design consideration. Typical usecases:
a) replace all fields, including row/column headers
b) keep row/column headers and replace only the other fields.
Can this be handled sufficiently good in ´python-pptx? If so, should we just expose the underlying
Presentation` object?
There is os.PathLike
(https://docs.python.org/3/library/os.html#os.PathLike). Can we use this for type information instead of defining our own _Pathlike = Union[str, pathlib.Path]
?
This is a desired feature.
To be checked: Is this already covered by handling all shapes in all slides, or do we need to handle shapes on the slide master separately?
Add a method to Template
:
def save_pdf(self, filename):
~~
Since `python-pptx` does not provide this capability. We need to rely on external programs (LibreOffice and/or PowerPoint).
LibreOffice can be used on the command line with
libreoffice --headless --convert-to pdf --outdir . filename.pptx
Tasks:
1. Check if LibreOffice is available on the system, if not fail
2. Create a temporary directory and save the tempate there as ´pptx`.
3. Run the above command in the temporary directory and target the output dir the user wants.
4. Cleanup
Optional:
Extend this to work with PowerPoint as well. Way of interaction with PowerPoint to be defined. I don't know if it can be controlled via command line.
Using text labels as placeholder is convenient for creation by the user. However, on the downside, the placeholder information vanishes once it is replaced.
Template
, parse all shapes for placeholders.A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.