A CLI tool for managing Reveal.js presentation packages
Project description
RevealPack
A comprehensive CLI tool for managing and building multiple Reveal.js presentations with shared themes and resources.
RevealPack is designed for creating suites of presentations that share themes and resources, such as lecture series, multi-day seminars, or training programs. It abstracts the slide deck creation process while providing complete control over individual slides or groups of slides within each presentation.
๐ Key Features
- Multi-Presentation Management: Create and manage multiple presentations from a single project
- Shared Resources: Common libraries, themes, and assets across all presentations
- Flexible Content: Support for HTML, Markdown, and mixed content slides
- Live Development: Real-time preview with automatic rebuilds on file changes
- Theme Compilation: SCSS/SASS support with Dart Sass compilation
- Plugin Management: Built-in and external plugin support with automatic downloading
- Distribution Ready: Package presentations for standalone distribution
- Customizable: Extensive configuration options for themes, plugins, and presentation settings
- Print Control: Enhanced print functionality with
print-invisibleclass and+showparameter support
๐ Requirements
- Python >= 3.12 (3.9+ supported, 3.12+ recommended)
- Dart Sass CLI - Required for SCSS/SASS theme compilation
- Reveal.js >= 4.0.0 (tested with 5.2.1, backwards compatible with 4.x)
Install Dart Sass
RevealPack requires the Dart Sass CLI to compile SCSS/SASS theme files. The build process will fail without it.
Install Dart Sass from the official website:
- Visit https://sass-lang.com/install
- Follow the installation instructions for your operating system
- Ensure
sassis available in your system PATH
Alternative installation methods:
# macOS (using Homebrew)
brew install sass/sass/sass
# Windows (using Chocolatey)
choco install sass
# Linux (using npm)
npm install -g sass
Verify installation:
sass --version
๐ ๏ธ Installation
Install RevealPack from PyPI
pip install revealpack
Note: Use the appropriate method for your setup, e.g., pip3 or python -m pip...
๐๏ธ Project Structure
RevealPack creates a structured project with the following organization:
your-project/
โโโ config.json # Project configuration
โโโ assets/ # RevealPack assets and themes
โโโ source/ # Source files
โ โโโ lib/ # Shared libraries and assets
โ โโโ decks/ # Individual presentation decks
โ โ โโโ lecture-01/ # Each subdirectory = one presentation
โ โ โ โโโ slide1.html
โ โ โ โโโ slide2.html
โ โ โ โโโ presentation.json
โ โ โโโ lecture-02/
โ โโโ cached/ # Downloaded packages (Reveal.js, plugins)
โ โโโ reveal_template.html # Generated presentation template
โ โโโ toc_template.html # Generated table of contents template
โโโ build/ # Built presentations (output)
โโโ index.html # Table of contents
โโโ lecture-01/
โโโ lecture-02/
๐ Quick Start
1. Initialize a New Project
# Create a new directory and navigate to it
mkdir my-presentations
cd my-presentations
# Initialize RevealPack project
revealpack init
This creates:
config.jsonwith default settingsassets/directory with RevealPack resources
2. Configure Your Project
Edit config.json to customize:
- Project information (title, authors, version)
- Directory structure
- Reveal.js version and plugins
- Theme settings
- Presentation configurations
3. Set Up Development Environment
revealpack setup
This:
- Creates necessary directories
- Downloads Reveal.js and specified plugins
- Validates theme configuration
- Generates presentation templates
4. Create Your Presentations
Add content to source/decks/:
- Each subdirectory becomes a separate presentation
- Use HTML or Markdown for slides
- Optionally add
presentation.jsonfor metadata
5. Build Presentations
revealpack build
This compiles all presentations with:
- Theme compilation (SCSS โ CSS)
- Plugin integration
- Asset copying
- HTML generation
6. Serve for Development
revealpack serve
Starts a local server with live reloading for development.
๐ Commands Reference
revealpack init [--destination PATH]
Initialize a new RevealPack project by copying configuration and assets.
revealpack setup [--root PATH]
Set up the development environment:
- Creates project directories
- Downloads Reveal.js and plugins
- Validates theme configuration
- Generates templates
revealpack build [OPTIONS]
Build all presentations or specified decks.
Options:
--root PATH: Root directory (default: current directory)--clean: Perform clean build (removes existing build files)--decks LIST: Build specific decks (comma-separated or file path)--log-level LEVEL: Set logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
revealpack serve [OPTIONS]
Serve presentations with live reloading for development.
Options:
--root PATH: Root directory (default: current directory)--no-build: Skip initial build, serve existing files only--clean: Perform clean build before serving--decks LIST: Build and serve specific decks
revealpack package [OPTIONS]
Package presentations for distribution (creates Electron app).
Options:
--root PATH: Root directory (default: current directory)--target-dir PATH: Output directory for package--no-build: Skip build step--clean: Perform clean build before packaging--decks LIST: Package specific decks
revealpack docs
Open RevealPack documentation in your browser.
โ๏ธ Configuration
The config.json file controls all aspects of your project:
Project Information
{
"info": {
"authors": ["Your Name"],
"short_title": "Lectures",
"project_title": "Science Lectures",
"year": "2024",
"version": "1.0.0"
}
}
Directory Structure
{
"directories": {
"build": "build",
"package": "dist",
"source": {
"root": "source",
"presentation_root": "decks",
"libraries": "lib"
}
}
}
Reveal.js and Plugins
{
"packages": {
"reveal.js": "5.2.1",
"reveal_plugins": {
"built_in": ["notes", "highlight", "math"],
"external": {
"plugin-name": {
"version": "1.0.0",
"url": "https://example.com/plugin.zip",
"alias": "optional-alias",
"main": "main-file"
}
}
}
}
}
Note: RevealPack is tested with Reveal.js 5.2.1 and is backwards compatible with Reveal.js 4.x versions.
Theme Configuration
{
"theme": "path/to/theme.scss",
"highlight_theme": "monokai",
"custom_scripts": ["path/to/script.js"]
}
Reveal.js Settings
{
"reveal_configurations": {
"center": false,
"controls": true,
"transition": "fade",
"width": 1920,
"height": 1080
}
}
๐จ Theming
RevealPack supports both pre-compiled CSS and SCSS/SASS themes:
SCSS/SASS Themes
- Create
.scssor.sassfiles - Use variables, mixins, and nested rules
- Automatic compilation with Dart Sass
- Hot reloading during development
Theme Structure
// Example theme.scss
$primary-color: #007acc;
$background-color: #f8f9fa;
.reveal {
background-color: $background-color;
.slides section {
color: $primary-color;
}
}
๐ Content Creation
HTML Slides
Create individual HTML files for each slide:
<!-- slide1.html -->
<section>
<h1>Welcome to My Presentation</h1>
<p>This is the first slide</p>
</section>
Markdown Support
Use Markdown for simpler content:
# Welcome to My Presentation
This is the first slide
---
## Second Slide
- Point 1
- Point 2
- Point 3
Presentation Metadata
Add presentation.json to customize individual presentations:
{
"titlepage": {
"headline": [
"Lecture 01",
"Introduction"
],
"background": {
"image": "lib/img/cover.png",
"size": "cover"
},
"by": "Author Name",
"byinfo": [
"Date",
"Course Info"
],
"notes": []
},
"footer": {
"left": "Lecture 01",
"right": "<a href=\"https:\\\\github.com\\Khlick\\revealpack\" target=\"_blank\" rel=\"noopener noreferrer\">©2025</a>"
},
"slides": [
"intro.html",
"group1.html",
"group2.html",
"outro.html"
]
}
๐จ๏ธ Print Functionality
RevealPack includes enhanced print functionality that extends Reveal.js's built-in print capabilities:
Print Modes
- Normal Print:
?print-pdf- Standard Reveal.js print mode - Show Hidden Elements:
?print-pdf+show- Shows elements with theprint-invisibleclass
Print-Invisible Class
Use the print-invisible CSS class to hide elements during normal print mode:
<div class="print-invisible">
<p>This content is hidden in print mode by default</p>
</div>
When using ?print-pdf+show, these elements become visible in the printed output.
Use Cases
- Speaker Notes: Hide speaker notes in normal print but show them when needed
- Interactive Elements: Hide interactive elements that don't work in print
- Supplementary Content: Hide additional content that's only relevant during presentation
- Debug Information: Hide development/debug information in final prints
๐ง Troubleshooting
Dart Sass Issues
If you encounter errors related to SCSS compilation:
-
Check if Dart Sass is installed:
sass --version -
If not installed, install Dart Sass:
- Visit https://sass-lang.com/install
- Follow the installation instructions for your operating system
-
If installed but not found, check your PATH:
- Ensure the directory containing the
sassexecutable is in your system PATH - Restart your terminal/command prompt after installation
- Ensure the directory containing the
-
Environment variable override: You can specify a custom path to the Dart Sass executable using the
REVEALPACK_SASS_PATHenvironment variable:export REVEALPACK_SASS_PATH=/path/to/your/sass revealpack build
Common Error Messages
- "Dart Sass CLI not found": Install Dart Sass from the official website
- "SCSS compilation failed": Check your SCSS syntax and ensure Dart Sass is properly installed
- "Plugin download failed": Check your internet connection and plugin URLs
- "Theme not found": Verify the theme path in
config.json
๐ค Contributing
For more detailed information on development, see the Developer's Guide.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file revealpack-1.4.8.tar.gz.
File metadata
- Download URL: revealpack-1.4.8.tar.gz
- Upload date:
- Size: 40.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d2cee975b411d11a25090fee1775868ec50716abf20ef6e4660405efce87804
|
|
| MD5 |
38461d1d9b4bfb87027844117950aaf8
|
|
| BLAKE2b-256 |
a80779ac1ad6ecd5f9ccd87d91bb39818cc1fca293e8f8ed099845ac8a58064a
|
Provenance
The following attestation bundles were made for revealpack-1.4.8.tar.gz:
Publisher:
publish-pypi.yml on Khlick/RevealPack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
revealpack-1.4.8.tar.gz -
Subject digest:
7d2cee975b411d11a25090fee1775868ec50716abf20ef6e4660405efce87804 - Sigstore transparency entry: 986138960
- Sigstore integration time:
-
Permalink:
Khlick/RevealPack@57337be04423dd8d8538dc45df4540aa6cd3805e -
Branch / Tag:
refs/tags/v1.4.8 - Owner: https://github.com/Khlick
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@57337be04423dd8d8538dc45df4540aa6cd3805e -
Trigger Event:
push
-
Statement type:
File details
Details for the file revealpack-1.4.8-py3-none-any.whl.
File metadata
- Download URL: revealpack-1.4.8-py3-none-any.whl
- Upload date:
- Size: 42.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7739aecaf404101c8cbce12ede650ec8cf1d3bfecb8051f5c19c0e4fc91932f
|
|
| MD5 |
d12fe0d4f9d563f85a160ab3d9948fbf
|
|
| BLAKE2b-256 |
9b1fa45bfb629026b344d24c7a5328d66980f0a84412a83d557abe5d71333bad
|
Provenance
The following attestation bundles were made for revealpack-1.4.8-py3-none-any.whl:
Publisher:
publish-pypi.yml on Khlick/RevealPack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
revealpack-1.4.8-py3-none-any.whl -
Subject digest:
b7739aecaf404101c8cbce12ede650ec8cf1d3bfecb8051f5c19c0e4fc91932f - Sigstore transparency entry: 986138984
- Sigstore integration time:
-
Permalink:
Khlick/RevealPack@57337be04423dd8d8538dc45df4540aa6cd3805e -
Branch / Tag:
refs/tags/v1.4.8 - Owner: https://github.com/Khlick
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@57337be04423dd8d8538dc45df4540aa6cd3805e -
Trigger Event:
push
-
Statement type: