A tool to programmatically build slides
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.
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
Built Distribution
File details
Details for the file presento-0.1.0.tar.gz
.
File metadata
- Download URL: presento-0.1.0.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 810bc13bb39acae97ebf1b3fc995bf571688245be5d4125c3bbf891fe587b0a1 |
|
MD5 | e993077c38239009a003816d9891be30 |
|
BLAKE2b-256 | c567c5197f6683ef801d97b2d6952a3523022106386c7c783466be67f2cbafae |
File details
Details for the file presento-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: presento-0.1.0-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbe088060b69312601db3d8257ec9e4034a505d7bff24a50c787becf723d261a |
|
MD5 | 36dee8c928774a97b0febe9f90edb1cc |
|
BLAKE2b-256 | 543c0f79ad8e29e0956fa7817f9d1e37e2698f44a9a865a49b17e120e9027c0e |