Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timgabets/torndown
Tornado + Markdown ft. Github apis
https://github.com/timgabets/torndown
Last synced: about 2 months ago
JSON representation
Tornado + Markdown ft. Github apis
- Host: GitHub
- URL: https://github.com/timgabets/torndown
- Owner: timgabets
- License: apache-2.0
- Created: 2014-02-17T13:45:01.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-02-24T22:14:42.000Z (almost 8 years ago)
- Last Synced: 2024-10-10T22:43:08.337Z (3 months ago)
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Torndown
Tornado web plugin to generate pages from Markdown.
Markdown may be stored in a foreign repository for high flexability and control.> Inspiration credited to [Scalling Asana.com][3]
## Features
- Request handler plugin for [Tornado Web][1]
- Github Integration by storing you markdown in a seperate repository
- Renders static [markdown][2] pages
- Caches page build for speed via [Debris][4]## Install
`pip install torndown`## Usage
```python
import os
import torndown
import tornado.web
import tornado.ioloop
import tornado.httpclient# Repository
os.environ["TORNDOWN_REPO"] = "stevepeak/torndown"
# The template to insert the rendered markdown
os.environ["TORNDOWN_TEMPLATE"] = "../example/base.html"application = tornado.web.Application([
# !important to have the r"(.*)"
(r"/(.*)", torndown.TorndownHandler)
])if __name__ == '__main__':
application.listen(8888)
tornado.ioloop.IOLoop.instance().start()
```### Real world example
Your support documentation, about us, home page copy and more can be stores in markdown files
in a seperate repository. There are many advantages to this. To learn more please read this
[great article by Justin Krause at Asana][3] which describes *pretty much* exactly what
`Torndown` can do for your website.[1]: http://www.tornadoweb.org/
[2]: http://daringfireball.net/projects/markdown/
[3]: http://eng.asana.com/2014/02/scaling-asana-com/
[4]: https://github.com/stevepeak/debris