Generates a slideshow using the slides that power the html5-slides presentation.
A sample slideshow is here.
Version 0.6.0 is tagged and pushed to pypi. New features:
t
to toggle a table of contents for your presentationn
to toggle slide number visibilityeasy_install
or pip
.python
and the following modules:
jinja2
pygments
for code blocks syntax colorationEventually:
markdown
if you use Markdown syntax for your slide contentsdocutils
if you use ReStructuredText syntax for your slide contentsh1
element (eg. # My Title
)---
in markdown)h1
element{lang}
where {lang}
is the pygment supported language identifier as the first indented line----
in RST)slides.md
or slides.rst
landslide slides.md
or landslide slides.rst
presentation.html
As a proof of concept, you can even transform this annoying README
into a fancy presentation:
$ landslide README.md && open presentation.html
Or get it as a PDF document, at least if PrinceXML is installed and available on your system:
$ landslide README.md -d readme.pdf
$ open readme.pdf
left arrow
and right arrow
to navigatet
to toggle a table of contents for your presentation. Slide titles are linksn
to toggle slide number visibilityYou can use macros to enhance your presentation:
Add notes to your slides using the .notes:
keyword, eg.:
# My Slide Title
.notes: These are my notes, hidden by default
My visible content goes here
You can toggle display of notes by pressing the 2
key.
Several options are available using the command line:
$ landslide/landslide
Usage: landslide [options] input.md ...
Generates fancy HTML5 or PDF slideshows from Markdown sources
Options:
-h, --help show this help message and exit
-b, --debug Will display any exception trace to stdin
-d FILE, --destination=FILE
The path to the to the destination file: .html or .pdf
extensions allowed (default: presentation.html)
-e ENCODING, --encoding=ENCODING
The encoding of your files (defaults to utf8)
-i, --embed Embed base64-encoded images in presentation
-t THEME, --theme=THEME
A theme name, or path to a landlside theme directory
-o, --direct-ouput Prints the generated HTML code to stdin; won't work
with PDF export
-q, --quiet Won't write anything to stdin (silent mode)
-v, --verbose Write informational messages to stdin (enabled by
default)
Note: PDF export requires the `prince` program: http://princexml.com/
$ landslide slides.md -d ~/MyPresentations/KeynoteKiller.html
$ landslide slides/
$ landslide slides.md -o | tidy
$ landslide slides.md -t mytheme
$ landslide slides.md -t /path/to/theme/dir
$ landslide slides.md -i
$ landslide slides.md -d PowerpointIsDead.pdf
A Landlside theme is a directory following this simple structure:
mytheme/
|-- base.html
|-- css
| |-- print.css
| `-- screen.css
`-- js
`-- slides.js
The base.html
must be a Jinja2 template file where you can harness the following template variables:
css
: the stylesheet contents, available via two keys, print
and screen
, both having:path_url
key storing the url to the asset file path contents
key storing the asset contentsjs
: the javascript contents, having:path_url
key storing the url to the asset file path contents
key storing the asset contentsslides
: the slides list, each one having these properties:header
: the slide titlecontent
: the slide contentsnumber
: the slide numberembed
: is the current document a standalone one?num_slides
: the number of slides in current presentationtoc
: the Table of Contents, listing sections of the document. Each section has these properties available:title
: the section titlenumber
: the slide number of the sectionsub
: subsections, if anycss/screen.css
stylesheet bundled with the theme you are usingcss/print.css