Git Product home page Git Product logo

landslide's Introduction

Landslide

Landslide generates a slideshow using from markdown, ReST, or textile. It builds off of Google's html5slides template.

The following markdown produces this slideshow.

# Landslide

---

# Overview

Generate HTML5 slideshows from markdown, ReST, or textile.

![python](http://i.imgur.com/bc2xk.png)

Landslide is primarily written in Python, but it's themes use:

- HTML5
- Javascript
- CSS

---

# Code Sample

Landslide supports code snippets

    !python
    def log(self, message, level='notice'):
        if self.logger and not callable(self.logger):
            raise ValueError(u"Invalid logger set, must be a callable")

        if self.verbose and self.logger:
            self.logger(message, level)

Requirements

python and the following modules:

  • jinja2
  • pygments for code blocks syntax coloration

Markup Conversion

Optional

  • watchdog for watching/auto-regeneration with the -w flag
  • Prince for PDF export

Installation

Install the latest stable version of Landslide with a python package manager like pip:

$ pip install landslide

If you want to stay on the edge:

$ git clone https://github.com/adamzap/landslide.git
$ cd landslide
$ python setup.py build
$ sudo python setup.py install

Formatting

Markdown

  • Your Markdown source files must be suffixed by .md, .markdn, .mdwn, .mdown or .markdown
  • To create a title slide, render a single h1 element (eg. # My Title)
  • Separate your slides with a horizontal rule (--- in markdown) except at the end of md files
  • Your other slides should have a heading that renders to an h1 element
  • To highlight blocks of code, put !lang where lang is the pygment supported language identifier as the first indented line

ReStructuredText

  • Your ReST source files must be suffixed by .rst or .rest (.txt is not supported)
  • Use headings for slide titles
  • Separate your slides using an horizontal rule (---- in RST) except at the end of RST files

Textile

  • Separate your slides using ---, just like in markdown

Rendering

  • Run landslide slides.md or landslide slides.rst
  • Enjoy your newly generated presentation.html

Or get it as a PDF document if Prince is installed and available on your system:

$ landslide README.md -d readme.pdf
$ open readme.pdf

Viewing

  • Press h to toggle display of help
  • Press left arrow and right arrow to navigate
  • Press t to toggle a table of contents for your presentation. Slide titles are links
  • Press ESC to display the presentation overview (Exposé)
  • Press n to toggle slide number visibility
  • Press b to toggle screen blanking
  • Press c to toggle current slide context (previous and next slides)
  • Press e to make slides filling the whole available space within the document body
  • Press S to toggle display of link to the source file for each slide
  • Press '2' to toggle notes in your slides (specify with the .notes macro)
  • Press '3' to toggle pseudo-3D display (experimental)
  • Browser zooming is supported

Commandline Options

Several options are available using the command line:

-h, --help            show this help message and exit
-c, --copy-theme      Copy theme directory into current presentation source
                      directory
-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 stylesheet and javascript contents,
                      base64-encoded images in presentation to make a
                      standalone document
-l LINENOS, --linenos=LINENOS
                      How to output linenos in source code. Three options
                      availables: no (no line numbers); inline (inside <pre>
                      tag); table (lines numbers in another cell, copy-paste
                      friendly)
-o, --direct-output    Prints the generated HTML code to stdout; won't work
                      with PDF export
-q, --quiet           Won't write anything to stdout (silent mode)
-r, --relative        Make your presentation asset links relative to current
                      pwd; This may be useful if you intend to publish your
                      html presentation online.
-t THEME, --theme=THEME
                      A theme name, or path to a landlside theme directory
-v, --verbose         Write informational messages to stdin (enabled by
                      default)
-w, --watch           Watch the source directory for changes and
                      auto-regenerate the presentation
-x EXTENSIONS, --extensions=EXTENSIONS
                      Comma-separated list of extensions for Markdown
-m, --math-output     Enable mathematical output using mathjax

Presentation Configuration

Landslide allows to configure your presentation using a cfg configuration file, therefore easing the aggregation of source directories and the reuse of them across presentations. Landslide configuration files use the cfg syntax. If you know ini files, you get the picture. Below is a sample configuration file:

[landslide]
theme  = /path/to/my/beautiful/theme
source = 0_my_first_slides.md
         a_directory
         another_directory
         now_a_slide.markdown
         another_one.rst
destination = myWonderfulPresentation.html
css =    my_first_stylesheet.css
         my_other_stylesheet.css
js =     jquery.js
         my_fancy_javascript.js
relative = True
linenos = inline

Don't forget to declare the [landslide] section. All configuration files must end in the .cfg extension.

To generate the presentation as configured, just run:

$ cd /path/to/my/presentation/sources
$ landslide config.cfg

Macros

You can use macros to enhance your presentation:

Notes

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.

Some other macros are also available by default: .fx: foo bar will add the foo and bar classes to the corresponding slide <div> element, easing styling of your presentation using CSS.

QR Codes

Add a QR Code to your presentation by using the .qr keyword:

.qr: 450|http://github.com/adamzap/landslide

Presenter Notes

You can also add presenter notes to each slide by following the slide content with a heading entitled "Presenter Notes". Press the 'p' key to open the presenter view.

Registering Macros

Macros are used to transform the HTML contents of your slide.

You can register your own macros by creating landslide.macro.Macro derived classes, implementing a process(content, source=None) method and returning a tuple containing the modified contents and some css classes you may be wanting to add to your slide <div> element. For example:

!python
import landslide

class MyMacro(landslide.Macro):
  def process(self, content, source=None):
    return content + '<p>plop</p>', ['plopped_slide']

g = landslide.generator.Generator(source='toto.md')
g.register_macro(MyMacro)
print g.render()

This will render any slide as below:

!html
<div class="slide plopped_slide">
  <header><h2>foo</h2></header>
  <section>
    <p>my slide contents</p>
    <p>plop</p>
  </section>
</div>

Advanced Usage

Setting Custom Destination File

$ landslide slides.md -d ~/MyPresentations/presentation.html

Working with Directories

$ landslide slides/

Working with Direct Output

$ landslide slides.md -o | tidy

Using an Alternate Landslide Theme

$ landslide slides.md -t mytheme
$ landslide slides.md -t /path/to/theme/dir

Embedding Base-64-Encoded Images

$ landslide slides.md -i

Exporting to PDF

$ landslide slides.md -d presentation.pdf

Enabling mathematical notation

Note that this require writing the slides in ReST format as well as
using Docutils 0.8 or newer.

$ landslide slides.rst -m

Enabling Markdown Extensions

See documentation on available Markdown extensions here:

$ landslide slides.md -x abbr

Theming

A Landslide theme is a directory following this simple structure:

mytheme/
|-- base.html
|-- css
|   |-- print.css
|   `-- screen.css
`-- js
    `-- slides.js

If a theme does not provide HTML and JS files, those from the default theme will be used. CSS is not optional.

Last, you can also copy the whole theme directory to your presentation one by passing the --copy-theme option to the landslide command:

$ landslide slides.md -t /path/to/some/theme --copy-theme

User stylesheets and Javascripts

If you don't want to bother making your own theme, you can include your own user css and js files to the generated presentation.

This feature is only available if you use a landslide configuration file, by setting the css and/or js flags:

[landslide]
theme  = /path/to/my/beautiful/theme
source = slides.mdown
css =    custom.css
js =     jquery.js
         powerpoint.js

These will link the custom.css stylesheet and both the jquery.js and powerpoint.js files within the <head> section of the presentation html file.

NOTE: Paths to the css and js files must be relative to the directory you're running the landslide command from.

Publishing your Presentation Online

If you intend to publish your HTML presentation online, you'll have to use the --relative option, as well as the --copy-theme one to have all asset links relative to the root of your presentation;

$ landslide slides.md --relative --copy-theme

That way, you'll just have to host the whole presentation directory to a webserver. Of course, no Python nor PHP nor anything else than a HTTP webserver (like Nginx) is required to host a landslide presentation.

Theme Variables

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:
    • a path_url key storing the url to the asset file path
    • a contents key storing the asset contents
  • js: the javascript contents, having:
    • a path_url key storing the url to the asset file path
    • a contents key storing the asset contents
  • slides: the slides list, each one having these properties:
    • header: the slide title
    • content: the slide contents
    • number: the slide number
  • embed: is the current document a standalone one?
  • num_slides: the number of slides in current presentation
  • toc: the Table of Contents, listing sections of the document. Each section has these properties available:
    • title: the section title
    • number: the slide number of the section
    • sub: subsections, if any

Styles Scope

  • To change HTML5 presentation styles, tweak the css/screen.css stylesheet bundled with the theme you are using
  • For PDF, modify the css/print.css

Authors

Original Author and Development Lead

Co-Author

Contributors

See https://github.com/adamzap/landslide/contributors

Base Template Authors and Contributors (html5-slides)

landslide's People

Contributors

aaugustin avatar adamzap avatar akrabat avatar bermanmaxim avatar bestfriendchris avatar blocke avatar bradcupit avatar charleso avatar codito avatar copelco avatar doug avatar durden avatar fozziethebeat avatar godfat avatar hadrieng2 avatar harobed avatar jadeallenx avatar kevinanewman avatar leblanc-simon avatar maruel avatar mtrythall avatar n1k0 avatar olivierverdier avatar philpennock avatar roktas avatar sdouche avatar shreyankg avatar soundmonster avatar spin6lock avatar tjormola avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

landslide's Issues

Separate and combine markdown source files

I'm currently using showoff, a similar markdown-based presentation generator which allows to separate and somewhat organize bulky contents (think of training materials for example)

I think adding something very simple in this direction would be a real added value :)

copytheme+relative support for custom css

Hello,

I think that the copytheme option combined with relative paths does not handle the custom css tag. Using the following configuration:

cat landslide.cfg
[landslide]
source = java_embarque.rst
destination = presentation-java_embarque.html
css = /home/jf/ensib/cours/rst/jf.css
relative = True
linenos = inline
copytheme = True

the resulting theme directory does not contain jf.css. In the html source file I have:

whereas other links are relative:

So the custom css file, should be copied to the theme directory and the html code should be:

sidebar directive breaks rst presentations

The sidebar directive seems to be implemented but broken. The following example with a long sentence inside the sidebar produces something but not really good...

.. sidebar:: title

sidebar text sidebar text sidebar sidebar text sidebar text sidebar

Maybe the sidebar content should be droped if not implemented.

Presentation pen keys

Hi,
my presentation pen use PgUp and PgDown to navigate (key-code: "104" and "109"), and not left and right keys. Another good feature of the pen is the "blank" button. With it (key-code 48, "b" key), your screen is blank. Last feature, the laser (need to "freeze" the key-code "63").

These key-codes are standardised, my pen works with evince or LibreOffice.

More generic Macro system

In our discussion on the Presenter View feature, one thing that came up was how it should be re-written as a Macro. In looking at the macro system, one thing that's become clear to me is it is insufficient for many enhancements to Landslide (you are currently only able to modify the content and css classes of a slide.

I propose changing the macro system to take in (and return) the slide_vars map directly, allowing you to modify slide_classes & content as we currently can, but also allowing the addition of new map variable (like presenter_notes from our conversation) as well as changing other things (like title, source, or header)

Doing this won't require too much of a change of the existing macros... In fact, we could add a subclass of the general Macro (maybe called SlideContentMacro) that has the exact same interface as the existing Macro system. Rewriting it to be based on this generic system should be trivial.

If we think this is a good idea, I can pitch in some time to help make this happen...

Thoughts?

Syntax highlighting not available with Rest format

Hello,

it seems, that syntax highlighting is not support with ReST.

When I try the following :

Some test:

.. code-block:: php

    

.. highlightlang:: php

    

I get no syntax highlighting. I get an ReST error instead.

It is up to you to decide which directive (code-block, or highlightlang) you want to support though.

Cheers :)

Theming and templating refactoring

I think the theming and templating capabilities of Landslide are currently underexploited (okay, they're crap). For example, we're not taking much advantage from Jinja2 features, especially loaders, blocks and template inheritance. We have (okay, I have) reinvented the wheel. That's not good.

So I've started a new branch in my fork to work on a full refactoring of this part of the application : https://github.com/n1k0/landslide/tree/new-templating

My main goal is to remove most of the templating logic and configuration from the generator module to fully use Jinja2 for what it intends to be, a template engine.

Thoughts and comments are welcome, and help would be much appreciated. In the meanwhile feel free to watch progress on the new-templating branch of my fork =)

light and tango styles not tracking changes in default

When using the light and tango styles from the git repository "presenter notes" appears on all the slides. I think this is because default now has significant changes that are not tracked by light and tango, e.g.,:


div#current_presenter_notes {
    display: none;
}

div.slide div.presenter_notes {
    display: none;
}


Version on PyPi is old

Could you bump the version number on PyPi? I installed via pip install landslide and got a version that was missing features. For example, I couldn't turn off line numbers from the command line.

landslide watch config.cfg

It would be nice to have a watch command so that you can just save your markdown file and then see the result in the browser without having to call landslide again. A big plus if it watched your theme files too.

watchdog looks like a good option to achieve it.

I could work on a fork and contribute it. Let me know.

I am using this to teach a javascript course and it is working great.

Stops rendering at 49 slides

I tracked down the problem to this line in generator.py

inner_slides = re.split(r'<hr.+>', parser.parse(file_contents),
                                re.DOTALL | re.UNICODE)

Python <2.7 does not take flags for re.split. The result is that maxsplit is set to 48.

embed image not end

landslide command not end while reading reST file which includes ".. image::".

Here is what i typed. Press Ctrl-c after waiting a couple of mins.

(sphinx)[mac]%landslide -i landslide.rst                     
Adding   landslide.rst (restructuredtext)
Embedded image python-logo-master-v3-TM.png
^CTraceback (most recent call last):
  File "/Users/example/Works/VEnvs/sphinx/bin/landslide", line 9, in <module>
    load_entry_point('landslide==0.8.2', 'console_scripts', 'landslide')()
  File "/Users/example/Works/VEnvs/sphinx/lib/python2.6/site-packages/landslide-0.8.2-py2.6.egg/landslide/main.py", line 166, in main
    run(input_file, options)
  File "/Users/example/Works/VEnvs/sphinx/lib/python2.6/site-packages/landslide-0.8.2-py2.6.egg/landslide/main.py", line 154, in run
    generator.Generator(input_file, **options.__dict__).execute()
  File "/Users/example/Works/VEnvs/sphinx/lib/python2.6/site-packages/landslide-0.8.2-py2.6.egg/landslide/generator.py", line 198, in execute
    self.write()
  File "/Users/example/Works/VEnvs/sphinx/lib/python2.6/site-packages/landslide-0.8.2-py2.6.egg/landslide/generator.py", line 467, in write
    html = self.render()
  File "/Users/example/Works/VEnvs/sphinx/lib/python2.6/site-packages/landslide-0.8.2-py2.6.egg/landslide/generator.py", line 460, in render
    slides = self.fetch_contents(self.source)
  File "/Users/example/Works/VEnvs/sphinx/lib/python2.6/site-packages/landslide-0.8.2-py2.6.egg/landslide/generator.py", line 244, in fetch_contents
    slides.append(self.get_slide_vars(inner_slide, source))
  File "/Users/example/Works/VEnvs/sphinx/lib/python2.6/site-packages/landslide-0.8.2-py2.6.egg/landslide/generator.py", line 345, in get_slide_vars
    re.DOTALL | re.UNICODE | re.IGNORECASE)
  File "/Users/example/Works/VEnvs/sphinx/lib/python2.6/re.py", line 142, in search
    return _compile(pattern, flags).search(string)
KeyboardInterrupt

pip installation fails

Trying to instal from the pip command:

$ sudo pip install landslide
Directory 'landslide' is not installable. File 'setup.py' not found.

Has the file been included in the package? (I'm not a pipy guru)

Presenter Notes RegExp Breaks

With a single slide I can reproduce a regexp related hang/busy spin in Landslide when using the -i argument to embed everything.

# Example                                                                    

<img src="large-ass-image.jpg">

The offending regexp is this from Generator.get_slide_vars:

find = re.search(r'(.+)?<h\d+?.*?>presenter notes</h\d>\s?(.+)?$', content,
                             re.DOTALL | re.UNICODE | re.IGNORECASE)

This never returns on my system (or at least until my patience ends). If I remove both of the " (.+)? " sections then it completes. I'm very weak at regexp stuff but it looks like " (.+)? " iterating over very large BASE64'd images in those content sections is incredibly inefficient and the source of the apparent hang. I'm afraid my regexp-fu is too weak to figure out how to fix it but if no one else gets around to it I might take a crack at it.

A git bisect shows this behavior started when the Presenter Notes code was originally merged.

(Test system was Ubuntu 11.04 32-bit with Python 2.7.1+ubuntu patches)

xml syntax highlighting isn't working

markdown outputs escaped xml so that the xml renders properly in the browser (for example: &lt; and &gt;), but we think the code highlighter doesn't recognize the escaped characters, so syntax highlighting appears broken.

Bug: links of toc unusable for .rst

The links of the generated table of contents does not work with .rst files:

## TOC

.. contents:: TOC
:depth: 1


heading 1


plop

----

heading 2

Exporting to PDF fails with accents

I've created my presentation with:

landslide -d presentation.pdf django.md and the PDF works without problems (no middle pages and no TOC showed) but special chars fail.

Rewrite README

The date-based approach of the current README was a bad idea.

It will be rewritten in a more permanent style.

Also I'd like to have links to nice landslide presentations that are currently accessible.

Touch interface

I tried to use a Landslide presentation on an iPad (using the iCab browser which has a full screen mode for VGA output). Swiping to get the next slide works, but I can’t find a way to do keyboard input to show/hide the outline, slide counter, etc. Is there anything I’m missing? Are there plans to add more touch-friendly interface elements?

Problem with presenter notes

Hello,

I was using an old (+ 9 months) version of landslide. I started today to take my .rst file and work with the current master version. When compiling my file, the "presenter notes" appears over my slide. I have not included any "presenter notes" directive in my source file. I reduced my .rst file to the minimum to reproduce the bug but I cannot figure out what is the problem. A test file can be downloaded at:

http://dl.free.fr/j5Wj4U7WR

A screenshot is available at:

http://dl.free.fr/bSphb2wAx

Add extra.js and extra.css files in theme

Hi! I've made simple changes in the default theme to get this: http://mirblu.com/slides/presentation.html

I've copied the files that I must change (only a little) and I link (ln -s) the others. I think that it could be more easy to provide a extra_screen.css (for example) to override the default CSS and a extra.js to add my little changes the default JS.

Sorry for my english... I will try to explain better if you need it.

help for a noobie please - error in rendering

I'm new to both ubuntu and HTML5 but I was pretty much blown away by the potential use of landslide.

I've followed all instructions installed landslide etc, but when I'm trying to run the presentation.html , as per instructions given in the "rendering" section of the readme.md document I get an error which says,

''Couldn't get a file descriptor referring to the console"

I might not be looking at something completely obvious but as I said I'm new and need all the help.

Cheers,
Koti Ivaturi

multiline presenter notes.

the notes are currently limited to one line. it's often nice to have multi-line notes. my current workaround is to just put my notes in something like:

<p class="notes">
lots
of lines
here
</p>

Split slide rendering from markdown, etc. script?

Just a thought, but it might be easier to maintain this, and innovate, if the slide rendering code (JS, CSS) were split into a separate project from the machinery to convert markdown to source (which is rather particular). You could then just use git submodule support to include one in the other.

Ideally, I'd like to see the best of this project's slide code merged with the best of https://github.com/paulrouget/dzslides.

width of images not taken into account for ReST files

It's me again :) The width of images seems not to be taken into account... It's probably more work to implement it than fixing a bug.

.. image:: images/arrays.png :width: 400px .. image:: images/arrays.png :width: 80%

Support multiple css files in themes

In order to help manage my personal themes (as well as keeping these themes up to date with new versions of Landslide), I think it would be useful to support more than one css file (for both print as well as screen views).

I propose creating a folder structure in the themes css directory as such:

default/
    css/
        print/
            print.css
        screen/
            screen.css

In the code, we could iterate over all the files in these folders (in alphabetical order) and add them with the proper stylesheet link in the html.

Again, I'm totally willing to help out with this. Just wanted somebody else to validate it's a good idea.

title page in middle of deck

sometimes it's nice to have another title page in the middle of a deck.
Examples:

  • switch from one presenter to another (but share same slides)
  • mark a milestone in the presentation (overview, current state, future) may each have their own 'title' page

Bug for heading level 3 for ReST

I think I have found a bug (difficult to reproduce with simple files).

The following ReST file fails to render the level 3 titles (the title is too low and overwrites the text). In this example the title "Heading 3" is bad rendrered:

Heading 1

bla bla


Heading 2

bla bla


Heading 3


Oups !!

----

Heading 3

oups !


Heading 2

bla



Heading 1.2

bla

Improve the print stylesheet for pdf export

My ideas:

  • Align everything left rather than center (like the slides)
  • Adjust font sizes so that the page breaks match the slides

Any other ideas for improvement? Please push back on my ideas if you disagree.

I hope to implement this by next week if no one else wants to.

PDF output

Hi,

The PDF output produced by Prince XML is black and white. Also, it adds an extra page after every slide reserved for notes.

Is it possible to get a colored PDF without extra pages, just like in the browser?

It would be interesting to make some experiments with wkhtmltopdf too. It is open source, while Prince is free for non-commercial use only. I made some tests with wkhtmltopdf but the result was not very good. However, I think it could be tweaked.

Best,

Laszlo

unicode issues with characters in markdown or base.html

Inserting this in slides.md :

accentué

raises this error :

markdown.MarkdownException: UnicodeDecodeError: Markdown only accepts unicode or ascii input.

inserting this :

© copyright or accentué

raises this error :

UnicodeDecodeError: 'ascii' codec can't decode byte …

option for generating TOC

Adding a feature for automatically generating TOC would be nice. This could be done via a javascript function which would create the TOC when loading the html page.

Wish: relative paths for theme and images

Another wish: it is difficult to copy a landslide presentation to another computer or tu put it on a web server because the links for themes and images have the full path name:

Maybe it could help to provide a way to produce relative path names in the HTML output:

Embed CSS images with -i option

Hi!

I've tested if you can embed a image into the url('') definition at CSS and yes, you can. So I try to do that with landslide code but I have some questions.

I can do it "easily" in the EmbedImagesMacro if the content variable have the css embeded before embed img in the HTML. Some as:

  1. Embed css+html
  2. Embed images html (<img) and embed images css (url(''))

This could be asily with the regexp in the Macro.

Other way is do that get_css and control the embed variable, but I think that is not the good place to do that.

If you help me to start I can do that in my fork and commit after.

Thanks!

Landslide on AppEngine

Hi,

I've hit some trouble trying to use landslide on an appengine instance, probably because of the dependencies.

Can you say whether or not the system has any dependencies that will specifically prohibit using appengine? If not, I will continue to bang away.

Thanks,

landslide installation fails

On a fresh Ubuntu install:

$ sudo pip install landslide
Downloading/unpacking landslide
  Downloading landslide-0.4.0.tar.gz (51Kb): 51Kb downloaded
  Running setup.py egg_info for package landslide
Installing collected packages: landslide
  Running setup.py install for landslide
    changing mode of build/scripts-2.5/landslide from 644 to 755
    changing mode of /usr/bin/landslide to 755
Successfully installed landslide
Cleaning up...
niko@nikobox:~$ landslide 
Traceback (most recent call last):
  File "/usr/bin/landslide", line 23, in <module>
    from generator import Generator
ImportError: No module named generator

Now investigating...

tidy html output by default?

this has been suggested by bradcupit

I have started to look into it.

Any opinions? pytidylib or utidylib should work...

Issue with rst files and olivierverdier/landslide@36cdc36 branch

I tried to test the branch of Olivier for syntax highlighting in ReST files. But I have a problem with this version (maybe it's an installation problem ?).

I did:

cd olivierverdier-landslide-36cdc36
sudo python setup.py build
sudo python setup.py install

And then:

landslide android.rst
Adding android.rst (restructuredtext)
Generated file: presentation.html

which seems to be ok because landslide does not complain about my code-block directives.
The, openin the presentation the first slide is ok, but the second is "invisible" (I can to hit but I does not see it).
The ReST file is:

slide 1

.. code-block:: java

Resources res = getResources();
String hw = res.getString(R.string.hello);


slide 2

This is not shown !

Auto load macros from the themes directory

Due to the relatively tight coupling between css/html and what the macros are producing, I think allowing people to add new macros inside of their themes makes sense.

I propose adding a folder (called macros) to the existing themes directories, moving all of the existing macros to the default theme, and writing code to autoload from these files.

If we think this is a good idea, I'd be willing to help out with this as well. My python is really rusty, so I'm not sure how much help I'd be in the autoloading code, but everything else I'm sure I'd be able to add value with.

Thoughts?

Wish: automatic slide break with rst sections

Into the rst2pdf tool, the developers implemented a command line switch to enable automatic page break with every new section title. The switch controls the section depth that are concerned by automatic page break.

In landslide, each new slide is generated by ---- (for .rst files). As my document is supposed to be used to generate slides but also an A4 course material, I have 3 level of sectionning titles and do not need any ---- between sections, whereas I need to add them to make landslide work.

Maybe it could be interesting to add a -b switch (break switch) to make automatic the introduction of ----. The execution of:

landslide -b 2 test.rst

would introduce a slide break before each section of level 1 and 2 (but not for levels 3+).

Print stylesheet?

First, thank you for providing such a nice tool.

Would be nice however to be able to print the generated presentation, either directly from the browser (and probably using the export to PDF feature) or from a command line utility such as princexml.

Therefore a printing stylesheet would be a great addition :)

What do you think?

Error when decoding utf-8 characters for RST files

Hi,
I think there is a bug for RST files.

When computing a .md file with utf-8 characters, like:
jf@radotte:~/swap$ cat test.md

Test

Eté et accentué !

all is going well when generating the slides:

jf@radotte:~/swap$ landslide test.md
Adding test.md (markdown)
Generated file: presentation.html

but when doing the same with test.rst:

jf@radotte:~/swap$ cat test.rst

Test

Eté et accentué !

the following error occurs:

jf@radotte:~/swap$ landslide test.rst
Adding test.rst (restructuredtext)
Error: 'ascii' codec can't decode byte 0xc3 in position 5: ordinal not in range(128)

It seems that the wrong codec (ascii) is chosen, instead of utf-8.

Forcing the utf-8 codec has no effect:

jf@radotte:~/swap$ landslide -e utf8 test.rst
Adding test.rst (restructuredtext)
Error: 'ascii' codec can't decode byte 0xc3 in position 5: ordinal not in range(128)

Firefox offset bug on next slide

When using Firefox, as you progress through the slides the left margin is offset by a few pixels. After a few slides the main page starts to slip off the screen. Interestingly this only happens going forward; returning to the previous slide is fine.

Disabling the moz-transition on div.slide makes it more obvious.

I've tracked the problem down to margin-left on the .slide.future and .slide.far-future rules. Hiding those elements or removing the margin fixes the problem. I've tried all sorts of tweaks, but my css is pretty rudimentary..

I have the feeling that this could be a Firefox bug, but if anyone has ideas how to work around it that would be much appreciated. For now I'll stick to Chrome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.