An open API service indexing awesome lists of open source software.

https://github.com/svilborg/simplerestler

Simple reStructuredText Builder
https://github.com/svilborg/simplerestler

library markup python restructured-text

Last synced: about 1 year ago
JSON representation

Simple reStructuredText Builder

Awesome Lists containing this project

README

          

Simple reStler
==============

Simple reStructuredText Builder - A small python library for building reStructuredText

Example :

```python

import simplerestler


doc = simplerestler.Document()

doc.title("Title")
doc.title("Subtitle", "=")
doc.ul("One", "Two", "Three")
doc.ol("One", "Two", "Three")

doc.hr()

doc.p("Lorem ipsum dolor sit amet, consectetur adipisicing elit, " +
"sed do eiusmod tempor " +
"incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam ..")

doc.pre("Same as here ")

doc.flist(title="Book Z", author="JJ Brown")

doc.image(src="https://avatars2.githubusercontent.com/u/2757518", height="40pt", alt="Icon")


doc.link(href="http://google.com", text="G00g1e")

doc.directive(type="math", text="10*x + 12*y = z")

doc.directive(type="sidebar", title="News", subtitle="Sport", text="Gooool!")

if printable :
print doc
else :
doc.save("/tmp/example.html")


```