README.md in sablon-0.0.3 vs README.md in sablon-0.0.4
- old
+ new
@@ -1,14 +1,14 @@
# Sablon
[![Gem Version](https://badge.fury.io/rb/sablon.svg)](http://badge.fury.io/rb/sablon) [![Build Status](https://travis-ci.org/senny/sablon.svg?branch=master)](https://travis-ci.org/senny/sablon)
Is a document template processor for Word `docx` files. It leverages Word's
-built-in formatting and layouting capabilities to make it easy to create your
-templates.
+built-in formatting and layouting capabilities to make template creation easy
+and efficient.
-*Note: Sablon is still in early development. If you encounter any issues along the way please report.*
+*Note: Sablon is still in early development. Please report if you encounter any issues along the way.*
## Installation
Add this line to your application's Gemfile:
@@ -49,11 +49,15 @@
```
«=post.title»
```
+NOTE: The dot operator can also be used to perform a hash lookup.
+This means that it's not possible to call methods on a hash instance.
+Sablon will always try to make a lookup instead.
+
#### Conditionals
Sablon can render parts of the template conditonally based on the value of a
context variable. Conditional fields are inserted around the content.
@@ -95,10 +99,21 @@
#### Nesting
It is possible to nest loops and conditionals.
+### Executable
+
+The `sablon` executable can be used to process templates on the command-line.
+The usage is as follows:
+
+```
+cat <context path>.json | sablon <template path> <output path>
+```
+
+Have a look at [this test](test/executable_test.rb) for an example.
+
### Examples
There is a [sample template](test/fixtures/sablon_template.docx) in the
repository, which illustrates the functionality of sablon:
@@ -128,9 +143,9 @@
5. Create a new Pull Request
## Inspiration
-The following projects address a similar goal and inspired the work on Sablon:
+These projects address a similar goal and inspired the work on Sablon:
* [ruby-docx-templater](https://github.com/jawspeak/ruby-docx-templater)
* [docx_mailmerge](https://github.com/annaswims/docx_mailmerge)