Create slides from Jupyter Notebooks
Project description
PresentPy
PresentPy
Create slides from Jupyter Notebooks
PresentPy allows you to take your Jupyter Notebooks and turn them into slides (compatible with PowerPoint, Keynote, LibreOffice...) that then can be integrated into your presentation decks.
Installation
I strongly recommend using pipx
to install PresentPy:
pipx install presentpy
Otherwise, you can install it using pip
or your favorite package manager – the package is called presentpy
.
Usage
To turn a notebook into slides, simply run:
presentpy [OPTIONS] nb NOTEBOOK_PATH
Code configuration
You can configure the code cells to be displayed in the slides by adding a comment on the last line of the cell. The comment should start with #%
and then you can add the following options:
title
: The title of the slidehighlights
: A comma separated list of lines to highlight, each highlight could be a number or a range of lines separated by a dash, e.g.1,3-6,6-7
For example, take the following code:
def compute_hcf(x, y):
if x > y:
smaller = y
else:
smaller = x
for i in range(1, smaller+1):
if((x % i == 0) and (y % i == 0)):
hcf = i
return hcf
#% title="Find the H.C.F of two numbers" highlights=1,2-3,4-5,9
The code above will generate 5 slides showing the same code but highlighting different lines in each slide – see how it looks below:
<iframe src="https://www.slideshare.net/slideshow/embed_code/key/LmOcrrRuEaitnJ?hostedIn=slideshare&page=upload" width="476" height="400" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>You can then use these slides in your presentation deck.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for presentpy-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a1c847379d35d0c0b1b9981b81d6cac6bd43c801d5e37f228244d193e954aee |
|
MD5 | 0fc60e963f55889e65113ef3906f2c7b |
|
BLAKE2b-256 | a578559c8b13153dc11a0f35b29cb29604b9333224faf232cd3ca9afd10edb68 |