Landslide is a command-line based presentation generator relying on Web standards (html, javascript, css) and some Python libraries such as Jinja2, Pygments, docutils and Markdown.
Landslide requires Python v2.5 minimum and these dependencies installed:
One of the syntax handlers above:
The easiest way to install Landslide is using Pip:
$ pip install landslide
Alternatively, you can use easy_install:
$ easy_install landslide
If you rather want to stay on the edge:
$ git clone https://github.com/n1k0/landslide.git
$ cd landslide
$ python setup.py build
$ sudo python setup.py install
Here’s a sample presentation based on Markdown:
# My Presentation Heading
---
## My First Slide Title
With some contents
---
## My Second Slide Title
With some contents
Bar
The Generator class takes and processes presentation source as a file, a folder or a configuration file and provides methods to render them as a presentation.
Adds a new entry to current presentation Table of Contents.
Adds supplementary user css files to the presentation. The css_list arg can be either a list or a basestring instance.
Adds supplementary user javascript files to the presentation. The js_list arg can be either a list or a basestring instance.
Execute this generator regarding its current configuration.
Recursively fetches Markdown contents from a single file or directory containing itself Markdown files.
Finds them dir path from its name.
Fetches and returns stylesheet file path or contents, for both print and screen contexts, depending if we want a standalone presentation or not.
Fetches and returns javascript file path or contents, depending if we want a standalone presentation or not.
Computes a single slide template vars from its html source code. Also extracts slide informations for the table of contents.
Retrieves Jinja2 template file path.
Computes template vars from slides html source code.
Checks and returns a valid value for the linenos option.
Logs a message (eventually, override to do something more clever).
Parses a landslide configuration file and returns a normalized python dict.
Processed all macros.
Registers macro classes passed a method arguments.
Returns generated html code.
Smart getter for Table of Content list.
Writes generated presentation code into the destination file.
Tries to write a PDF export from the command line using PrinceXML if available.
This Macro performs syntax coloration in slide code blocks using Pygments.
Decodes html entities from a given string
This Macro extracts images url and embed them using the base64 algorithm.
This Macro replaces html image paths with fully qualified absolute urls.
This Macro processes fx directives, ie adds specific css classes named after what the parser found in them.
Base class for Macros. A Macro aims to analyse, process and eventually alter some provided HTML contents and to provide supplementary informations to the slide context.
Generic processor (does actually nothing)
This Macro processes Notes.
This Macro generates a QR Code with Google Chart API.
This class generates the HTML code depending on which syntax is used in the souce document.
The Parser currently supports both Markdown and restructuredText syntaxes.
Parses and renders a text as HTML regarding current format.
Returns the absolute url for a given local path.
Returns an absolute or relative path url from an absolute path.
Returns a relative path from the absolute one passed as argument. Silently returns originally provided path on failure.