]> Devi Nivas Git - chevron.git/commitdiff
Updated the README.md
authornoah morrison <noah@morrison.ph>
Wed, 19 Nov 2014 02:16:49 +0000 (21:16 -0500)
committernoah morrison <noah@morrison.ph>
Wed, 19 Nov 2014 02:23:33 +0000 (21:23 -0500)
README.md

index 5a726c09422feedf606f74b2236e2de66d26789f..077e635faf61bcd1ec9517e7fa5dbf395a4f3c3a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,10 +1,40 @@
 [![Build Status](https://travis-ci.org/noahmorrison/chevron.svg?branch=master)](https://travis-ci.org/noahmorrison/chevron)
 
+
 A python implementation of the [mustache templating language](http://mustache.github.io).
 
-Commandline usage:
+Why chevron?
+------------
+
+I'm glad you asked!
+
+* chevron is fast!
+
+Chevron runs in less than half the time of [pystache](http://github.com/defunkt/pystache) (Which is not even up to date on the spec).
+And in about 70% the time of [Stache](https://github.com/hyperturtle/Stache) (A 'trimmed' version of mustache, also not spec compliant).
+
+* chevron is pep8
+
+The pep8 command is run by [travis](https://travis-ci.org/noahmorrison/chevron) to ensure consistency.
+
+* chevron is spec compliant
+
+Chevron passes all the unittests provided by the [spec](https://github.com/mustache/spec) (in every version listed above).
+
+If you find a test that chevron does not pass, please [report it.](https://github.com/noahmorrison/chevron/issues/new)
+
+* chevron is python 2 and 3 compliant
+
+Python 2.6, 2.7, 3.2, 3.3, and 3.4 are all tested by travis.
+
+
+
+USAGE
+-----
+
+Commandline usage: (if installed via pypi)
 ```
-    ./chevron.py [data file] [template file]
+$ chevron [data file] [template file]
 ```
 
 Python usage with strings
@@ -37,6 +67,59 @@ args = {
 chevron.render(**args)
 ```
 
+chevron supports partials (via dictionaries)
+```
+import chevron
+
+args = {
+    template: 'Hello, {{> thing }}!',
+
+    partials_dict: {
+        'thing': 'World'
+    }
+}
+
+chevron.render(**args)
+```
+
+chevron supports partials (via the filesystem)
+```
+import chevron
+
+args = {
+    template: 'Hello, {{> thing }}!',
+
+    # defaults to .
+    partials_path: 'partials/',
+
+    # defaults to mustache
+    partials_ext: 'ms',
+}
+
+# ./partials/thing.ms will be read and rendered
+chevron.render(**args)
+```
+
+INSTALL
+-------
+
+- with git
+```
+$ git clone https://github.com/noahmorrison/chevron.git
+```
+
+or using submodules
+```
+$ git submodules add https://github.com/noahmorrison/chevron.git
+```
+
+Also available on pypi!
+
+- with pip
+```
+$ pip install chevron
+```
+
 
 
 TODO