用landslide创建html5 slide

Landslide是一款用python写的制作Html5 slide的软件。

Landslide通过源代码来产生Html文件。

举个例子,制作一个介绍python流程控制的slide,这里是Rst源码

    Python
======

--------------

    If
==

* Please don't use ()
* Never forget the ``:`` at the end of the line

    Check this code:

.. sourcecode:: python

    x, y = 1, 2
    if x > y:
    print 'x is greater'

--------------

    For
===

* ``for`` iterates over a sequence
* Never forget the ``:`` at the end of the line

    Check this code:

.. sourcecode:: python

    numbers = [1, 2, 3, 4, 5,]
    for number in numbers:
    print number

--------------

    While
=====

* ``while`` is like ``if``, but executes while the codition is ``True``
* please don't use ()
* never forget the ``:`` at the end of the line

    Check this code:

.. sourcecode:: python

    from random import randint

    args = (1, 10,)
    x = randint(*args)
    while x != 6:
    x = randint(*args)

--------------

    Thank you!
==========

首先要安装landslide,利用python得easy_install工具即可方便安装

sudo easy_install landslide

保存上边的RST代码为python.rst,运行

landslide python.rst

即可产生html文件,效果图

原文:here

好玩,下次的slide就用它做了,顺便学学css和rst。。。