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
- Host: GitHub
- URL: https://github.com/svilborg/simplerestler
- Owner: svilborg
- License: mit
- Created: 2014-06-14T19:53:58.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-21T12:39:06.000Z (almost 12 years ago)
- Last Synced: 2025-01-26T04:27:48.941Z (over 1 year ago)
- Topics: library, markup, python, restructured-text
- Language: Python
- Size: 273 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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")
```