Skip to main content

Generate Powerpoint presentations from a Jupyter Notebook

Project description

Powerbook

Generate Powerpoint presentations from a Jupyter Notebook.


Background

The built-in Jupyter Notebook Reveal.js slideshow system is nice! I do use it a lot. But it doesn't jive well with collaboration (editors all need to be familiar with the system, and they also need to be able to edit your notebook), and honestly, the industry standard is Powerpoint and that's not going away any time soon. (Beamer sorta exists, but I declare that if you're writing your slideshows in LaTeX you're on your own to get figures into it from Python.)

And hey another thing! My notebook doesn't always match up with the presentation I want to write: coding and storytelling don't always happen in the same order.

Solution(?)

This (admittedly janky) solution lets you generate a Powerpoint presentation directly from your Jupyter notebooks (or, for that matter, directly from a Python script). When you have a product that you like, such as a figure or an output, add it to your slideshow with Powerbook#add_image_slide, for example. Powerbook will automatically figure out how to add matplotlib figures and images from your hard drive.

When you rerun your analysis, your powerpoint file is automatically regenerated with the fresh results.

Example

from powerbook import Powerbook

P = Powerbook("MySlideshow.pptx")
P.add_title_side("Hello world!", "This is PowerPoint!")

For a more in-depth introduction to powerbook from a Jupyter Notebook, see the examples/ directory of this repository.

Roadmap

Slots!

I am dying to figure out an easy way to notate "placeholder" slots in a presentation so that you can send the pptx to your friends to edit and then — rather than overwriting the whole presentation — you can just save changes to specific figures.

Due to the XML schema of pptx, this is super challenging. I wish it weren't so, but this is proving to be much more difficult than I thought.

More slide templates!

Theoretically you can go off-script and add items to slides anywhere, but it would be nice to have a rich set of slide templates.

Markdown support!

This is going to be a bear, because markdown will need to be parsed into a set of nested Python objects. Trying to investigate the easiest path forward here, thoughts welcome.

LaTeX support!

Powerpoint doesn't support this by default even though formulas exist in the app. A temporary shim fix might be to call out to a LaTeX formula image-generator service and inline the image back into the text. But I hate that.

Syntax-highlighting...

I don't love the idea of lots of code in powerpoint presentations, but if you've gotta add code, it sure better be highlighted.

Your idea here?

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

Powerbook-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file Powerbook-0.1.0.tar.gz.

File metadata

  • Download URL: Powerbook-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.7

File hashes

Hashes for Powerbook-0.1.0.tar.gz
Algorithm Hash digest
SHA256 aaa58c73eefc3206e87d635746c599ba7bc41b02dcc5ac616e3bdf2c3aa14c10
MD5 75b8e982fabdabaaf6b5bded19404155
BLAKE2b-256 229c23e1e33432512efef965aee12df5abb07aab48d2d6a4e7d4187db8b8e542

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page