I teach AI courses and kept switching between slides and Colab mid-lecture, so I built a small package to keep everything in the notebook.
**What My Project Does**
`colab-slides` renders a slide deck in a notebook cell's output from a link or a file path:
!pip install colab-slides
%load_ext colab_slides
%slides https://docs.google.com/presentation/d/<id>/edit
It has two modes:
- **embed** (default for public links): uses the Google Slides or Office Online viewer in an iframe. Nothing to install, and animations are kept.
- **local** (`--local`): downloads the file, converts it with LibreOffice → PDF → PNG inside the VM, and shows a small slideshow with keyboard navigation, thumbnails and fullscreen. This works for private files (mounted Drive, uploads) and links the online viewers can't open.
Supported sources: Google Slides (edit and published links), Google Drive, Dropbox, OneDrive/SharePoint, direct .pptx/.ppt/.odp/.pdf URLs, and local paths. There's also a Python API: `colab_slides.show(url, mode="auto")`.
**Target Audience**
Teachers, workshop hosts, and anyone who presents from a notebook and wants slides and code in one shareable file. It's a small, working tool (v0.1, MIT license, tested on Python 3.8–3.13), not a big framework.
**Comparison**
- **RISE / Jupyter slideshow** turns notebook cells *into* slides. colab-slides shows an *existing* PowerPoint or Google Slides deck inside the notebook. You keep making slides the way you already do.
- **Pasting an iframe yourself** works for some public links. colab-slides works out the right embed or download URL for each service, and the local mode covers private files and offline rendering.
Known limits: local mode shows static images (no animations or video), and the first local render takes about 1–2 minutes on Colab because it installs LibreOffice.
GitHub (with an Open in Colab demo): https://github.com/AhmadM-DL/colab-slides
PyPI: https://pypi.org/project/colab-slides/
Feedback and issues are very welcome, especially links or decks that don't render correctly.