Skip to main content

A tool to programmatically build slides using Reveal.js

Project description

Presento

A tool to programmatically build slides.

Using the excellent reveal.js library, this script helps you generate slides from Python.

You can easily create markdown slides or insert charts as HTML with Plotly.

Install

pip install presento

or use PDM, Poetry, etc...

Example

import presento
import plotly.express as px

p = presento.Presentation()
p.add_md_slide("""
# title of the slide

This is a slide added directly to the presentation.

It uses markdown so it can have:
1. __formatting__
2. [links](https://en.wikipedia.org/wiki/Markdown)
3.

""")
# for the next slide we use plotly, but we need a CDN first
p.add_cdn_js("https://cdn.plot.ly/plotly-latest.min.js")
fig = px.scatter(x=range(10), y=range(10))
p.add_html_slide(fig.to_html(include_plotlyjs=False))
# p.save_folder('my_slides')
p.show()

In this example you can see that in addition to markdown slides you can add verbatim HTML, useful for example to add Plotly charts.

For Plotly (and pretty much every other library) you will want to use a CDN. This can be done with add_cdn_js.

The show() method will start a server and open the browser for you.

The save_folder(path) method writes the slides to a folder, that can be statically served.

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

presento-0.1.1.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

presento-0.1.1-py3-none-any.whl (2.7 MB view details)

Uploaded Python 3

File details

Details for the file presento-0.1.1.tar.gz.

File metadata

  • Download URL: presento-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.4.8 CPython/3.11.2

File hashes

Hashes for presento-0.1.1.tar.gz
Algorithm Hash digest
SHA256 43104ad5b5b68d986f8a3efba0eacdb1c6cf177c5b6df45de770709764a4de75
MD5 46f8ab3611f7ed2384b8ffeeff1135cb
BLAKE2b-256 fb4ca6b4d2f8e61464664b300e8cba4382c1a6d7de2fbbe00528d512a3142adc

See more details on using hashes here.

File details

Details for the file presento-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: presento-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.4.8 CPython/3.11.2

File hashes

Hashes for presento-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 72f8a036c698e0ee0e797946c6410cbd1fe8bc8f4cfcc1ec1491ddcf4805d623
MD5 0147418f47a33623bd7d6e991417934f
BLAKE2b-256 861c48c2d06fdf40fdd2d70b8e54ab0f234d0cc63a7a5188719e9003cd922a68

See more details on using hashes here.

Supported by

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