Skip to main content

Make awesome reveal.js presentations with revelation

Project description

PyPI PyPI - License PyPI - Python Version Build Status Coverage Status

revelation makes your reveal.js presentations without the need to edit a monolithic html file using markdown and serving it localy.

Installation

You can install it from the PyPI:

$ pip install revelation

Usage

Install/Update reveal.js files

The first thing that you will do after installing revelation is to download and install reveal.js to render the presentations.

To do that just run the installreveal command:

$ revelation installreveal

Running the Presentation

To start your presentation run:

$ revelation start PRESENTATION

The PRESENTATION is the path to the markdown presentation file.

Creating a new Presentation

To create a new presentation run:

$ revelation mkpresentation NAME

That will create a new presentation folder with the NAME passed.

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.

  1. Run the presentation with revelation.

  2. Open your brownser with the print-pdf as query string like : localhost:5000/?print-pdf.

  3. Open the in-browser print dialog (CTRL+P or CMD+P).

  4. Change the Destination setting to Save as PDF.

  5. Change the Layout to Landscape.

  6. Change the Margins to None.

  7. Enable the Background graphics option.

  8. Click Save.

Alternatively you can use the decktape project.

Share your presentation using Ngrok

You can easily share your presentation using Ngrok. Download it, and put the binary file at root. Then you can do :

$ ngrok http 5000

This assume 5000 is your localhost. ngrok will create a secure tunnel to your localhost :

ngrok by @inconshreveable                                              (Ctrl+C to quit)

Tunnel Status                 online
Version                       2.0.19/2.1.1
Web Interface                 http://127.0.0.1:4040
Forwarding                    http://323744c6.ngrok.io -> localhost:5000
Forwarding                    https://323744c6.ngrok.io -> localhost:5000

Connections                   ttl     opn     rt1     rt5     p50     p90
                              0       0       0.00    0.00    0.00    0.00

Presentation Setup

The revelation checks for three things on your presentation folder.

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 into REVEAL_CONFIG. Default separator is ---.

The ‘img’ folder

All images used on your presentation are placed inside the ‘img’ folder and referenced on your slides starting from your presentation root.

![Python Logo](img/python.png)

The ‘config.py’ File

The configuration file are placed on the presentation root folder and is responsible to customize your presentation.

This file is optional and can the values above can be changed:

REVEAL_META: python dictionary with metadata from the presentation

REVEAL_META = {
    # Title of the slide
    'title': 'The title',

    # Author in the metadata of the slide
    'author': 'Some Author',

    # Description in the metadata of the slide
    'description': 'Some description'
}

REVEAL_THEME: string with reveal theme of choice

# Themes
# beige, black, blood, league, moon, night, serif, simple, sky,
# solarized, white
REVEAL_THEME = 'black'

REVEAL_CONFIG: python dictionary with the reveal.js configuration attributes but using python types (e.g.: true is python boolean True)

REVEAL_CONFIG = {
    # Slide separator
    'slideSep': '---',

    # Display controls in the bottom right corner
    'controls': True,

    # Display a presentation progress bar
    'progress': True,

    # Display the page number of the current slide
    'slideNumber': False,

    # Push each slide change to the browser history
    'history': True,

    # Enable keyboard shortcuts for navigation
    'keyboard': True,

    # Enable the slide overview mode
    'overview': True,

    # Vertical centering of slides
    'center': True,

    # Enables touch navigation on devices with touch input
    'touch': True,

    # Loop the presentation
    'loop': False,

    # Change the presentation direction to be RTL
    'rtl': False,

    # Turns fragments on and off globally
    'fragments': True,

    # Flags if the presentation is running in an embedded mode,
    # i.e. contained within a limited portion of the screen
    'embedded': False,

    # Flags if we should show a help overlay when the questionmark
    # key is pressed
    'help': True,

    # Flags if speaker notes should be visible to all viewers
    'showNotes': False,

    # Number of milliseconds between automatically proceeding to the
    # next slide, disabled when set to 0, this value can be overwritten
    # by using a data-autoslide attribute on your slides
    'autoSlide': 0,

    # Stop auto-sliding after user input
    'autoSlideStoppable': True,

    # Enable slide navigation via mouse wheel
    'mouseWheel': False,

    # Hides the address bar on mobile devices
    'hideAddressBar': True,

    # Opens links in an iframe preview overlay
    'previewLinks': False,

    # Transition style
    # default/cube/page/concave/zoom/linear/fade/none
    'transition': 'default',

    # Transition speed
    'transitionSpeed': 'default',  # default/fast/slow

    # Transition style for full page slide backgrounds
    # default/none/slide/concave/convex/zoom
    'backgroundTransition': 'default',

    # Number of slides away from the current that are visible
    'viewDistance': 3,

    # Parallax background image
    # e.g.:
    # "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'"
    'parallaxBackgroundImage': '',

    # Parallax background size
    'parallaxBackgroundSize': '',  # CSS syntax, e.g. "2100px 900px"

    # Amount to move parallax background (horizontal and vertical)
    # on slide change
    # Number, e.g. 100
    'parallaxBackgroundHorizontal': '',
    'parallaxBackgroundVertical': '',
}

Markdown

The markdown used on the presentation files support most of the GitHub Markdown and adds some especial html comment tags to edit styles and control effects that are explained on the reveal.js markdown docs.

Important: You can use all html tags on the presentation files, but some block tags can present unexpected behavior.

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

revelation-0.1.3.tar.gz (12.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

revelation-0.1.3-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

revelation-0.1.3-py2-none-any.whl (18.7 kB view details)

Uploaded Python 2

File details

Details for the file revelation-0.1.3.tar.gz.

File metadata

  • Download URL: revelation-0.1.3.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for revelation-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f79175db5d1185d687d0c439bce41c1e721d8234693e4b36ed5edf00ac1dffc1
MD5 19622fff9499042b60ebbc98fec8a543
BLAKE2b-256 42071fe9781f43b2c5a2676c383bed0332f39de732351a2aa6c68a39ea62e122

See more details on using hashes here.

File details

Details for the file revelation-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for revelation-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 02c14d0b28f1aa5c91f9162779bdc672c6fb58a51609e63e82ce7e4f98f846ab
MD5 d756c36c7d30ea27a655828184f28a7f
BLAKE2b-256 653bd321289ce45d643eb7bb489b42870f41436b339aa9bf6194e0a437460aef

See more details on using hashes here.

File details

Details for the file revelation-0.1.3-py2-none-any.whl.

File metadata

File hashes

Hashes for revelation-0.1.3-py2-none-any.whl
Algorithm Hash digest
SHA256 47019c9f6bbd9d26d43c23f6f8c959eb6e48f18aa9c62fcaa6d5a9eb3db7c783
MD5 575cbd51b0c3ae1df01f7b3c264d0636
BLAKE2b-256 62957063e70be90b915489588844347e5597a9cf253b08e6ba172a722b609c9c

See more details on using hashes here.

Supported by

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