Make awesome reveal.js presentations with revelation
Project description
Revelation
revelation is a cli tool that makes your revealjs presentations nice and easy using markdown and serving it locally.
Features
- Presentation server to run it locally when you are offline.
- Presentation creation from template with a single command.
- Custom theming support with css.
- Export to static html tool.
- Debug mode with server auto refresh.
Installation
You can install it with:
pip install revelation
Or with pipx:
pipx install revelation
Usage
Install/Update revealjs files
Revelation depends on revealjs to run its presentation and every command bellow will check and install it if revealjs isn't installed yet.
But, you can also manually install or even update it to a different version with the installreveal
command:
revelation installreveal
Creating a new Presentation
To create a new presentation you can use mkpresentation
command that will setup a new presentation using the base layout for you:
revelation mkpresentation mypresentation
Running the Presentation
You can start presenting with the start
command on your presentation markdown file:
cd mypresentation
revelation start slides.md
Static Export
To export the presentation as static HTML content use the command:
revelation mkstatic slides.md
PDF Export
Presentations can be exported to PDF via a special print stylesheet. This feature will be described using Google Chrome or Chromium, but I got the same results using Firefox.
- Run the presentation with revelation.
- Open your browser with the
print-pdf
as query string like :localhost:5000/?print-pdf
. - Open the in-browser print dialog (CTRL+P or CMD+P).
- Change the Destination setting to Save as PDF.
- Change the Layout to Landscape.
- Change the Margins to None.
- Enable the Background graphics option.
- Click Save.
Alternatively you can use the decktape project.
Presentation Setup
The base presentation file structure looks like this:
presentation/
|- media/
|- theme/
|- config.py
|- slides.md
The slides.md File
This is your presentation file written using markdown with some especial tags described on markdown section and is placed on your presentation root folder.
Split your slides by setting up a slide separator and vertical slide separator into REVEAL_CONFIG. Default separator are ---
and ---~
.
The media folder
By default, revelation looks for a folder called media inside your presentation root folder. All media placed inside it can be referenced on your presentation by the path /media
:
![Python Logo](media/python.png)
You can define a custom media path using the --media
option on revelation start
command.
The theme folder
You can create your custom theme file and place it inside a theme folder and reference it at the configuration file by the option --theme
.
The config.py File
The configuration file located in the root folder of your presentation, allows you to customize your presentation. This file is optional and have the following configuration options:
- REVEAL_META: Metadata of your presentation, mostly to identify the author and title.
- REVEAL_THEME: A string where you can select the theme you would like to use. All revealjs base themes are available.
- REVEAL_CONFIG: A python dictionary with the revealjs configuration attributes but using python types (e.g.: true is python boolean True)
Once you create a new presentation, all configuration values will be there for you to customize.
Markdown
The markdown used on the presentation files support everything that revealjs docs allows to place inside the data-template
section.
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
File details
Details for the file revelation-2.1.0.tar.gz
.
File metadata
- Download URL: revelation-2.1.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.4 Linux/6.0.12-76060006-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bac2e9b7f084ad3b8cd89102f0b8798f347f17d71d890f9f76d294c19f38ef4e |
|
MD5 | 98606ebbcda4ce9b92e6ff76e41e959d |
|
BLAKE2b-256 | 798ffac4f4b2f8a84e4a203274d0dad68cd28baedf9de9ef092ceac7afdd7326 |
File details
Details for the file revelation-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: revelation-2.1.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.4 Linux/6.0.12-76060006-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22959ec0e85cbe48f9d155a6a82af3d123e2ceb0d53e3b2d2180c124f6dcf6d0 |
|
MD5 | cba980137fb8e37880b95092bae8b364 |
|
BLAKE2b-256 | cb9f71d1ce48aaddea72ae83722a4bede05e18976ec30dff0b10599abe3572a5 |