Skip to main content

Live rich content slides in jupyter notebook

Project description

ipyslides

Create Interactive Slides in Jupyter/Voila with all kind of rich content.

Launch example slides at Binder

Launch in notebook mode Binder

Overview

New in Version >= 0.7

  • LiveSlides now collect slides internally, so removing a lot of code user had to put.
  • You can elevate simple cell output to fullscreen in Jupyterlab >= 3.
  • You can use with slide(<N>) context manager to build multiple slides in for loop from a single cell. This context manager is equivalent to %%slide so make sure none of them overwrite each other.
  • Widgets display is persistent in %%slide,with slide and insert_after, however multicols display ipywidgets once and then they disappear (No idea yet why it happens), so avoid displaying widgets in mutlicols mode.

Install

> pip install ipyslides

For development install, clone this repository and then

> cd ipyslides
> pip install -e .

Demo

See a Demo Notebook at Kaggle, [Version>0.2.0]https://www.kaggle.com/massgh/ipyslides-0-2-0) Slides2Video

Usage

import ipyslides as isd 

isd.initilize() #This will create a title page and parameters in same cell

isd.write_title() #create a rich content multicols title page.

isd.insert(1) #This will create a slide in same cell where you run it 

isd.insert_after(1,*objs,func) #This will create as many slides after the slide number 1 as length(objs)

isd.build() #This will build the presentation cell. After this go top and set `convert2slides(True)` and run all below.

Each command is replaced by its output, so that when you run next time, you don't get duplicate slides.

For jupyterlab >= 3, do pip install sidecar for better presenting mode.

Content Types to Embed

You can embed anything that you can include in Jupyter notebook like ipywidgets,HTML,PDF,Videos etc.,including jupyter notebook itself! JupyterLab inside ipyslides

Note: Websites may refuse to load in iframe. Note: You can embed slides inside other slides using ipyslides.insert_after(<N>,other_slides.box). This is very cool.

Full Screen Presentation

  • Use Voila for full screen prsentations. Your notebook remains same, it is just get run by Voila.
  • Install Jupyterlab-Sidecar for version < 4. Fullscreen support is added natively in version > 0.4!
  • Version >= 0.5.1 is Jupyter Notebook theme aware in Inherit theme, so theme of slides changes based on editor theme.
  • Version >= 0.6.3 enables full size output in Jupyterlab's Create New Output View command. Then in Setting panel, you can toggle fullscreen.
  • Version >= 0.7.0 do not require to install sidecar or New Output view. You can make slides fullscreen just from cell output! Note that all this is currently supported only in Jupyterlab, other editors or classic notebook are not supported.

Multi Column Support

Starting version 0.2.0, you can use MultiCols class to display connected content like ipwidgets in columns.

Very thankful to Python-Markdown which enabled to create write command as well as syntax highliting.

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

ipyslides-0.7.1.tar.gz (16.4 kB view hashes)

Uploaded Source

Built Distribution

ipyslides-0.7.1-py3-none-any.whl (17.2 kB view hashes)

Uploaded Python 3

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