<commit_before># Sablon

Is a document template processor based on `docx`. Tags are represented using
MailMerge fields.


## Installation

Add this line to your application's Gemfile:

```ruby
gem 'sablon'
```


## Usage

```ruby
require "sablon"
template = Sablon.template(File.expand_path("~/Desktop/template.docx"))
context = {
  title: "Fabulous Document",
  technologies: ["Ruby", "Markdown", "ODF"]
}
template.render_to_file File.expand_path("~/Desktop/output.docx"), context
```


### Writing Templates

Sablon templates are normal word documents (`.docx`) sprinkled with MergeFields
to perform operations. The following section will use the notation `«=title»` to<commit_msg>incorporate Travis status into README<commit_after># Sablon

[![Build Status](https://travis-ci.org/senny/sablon.svg?branch=master)](https://travis-ci.org/senny/sablon)

Is a document template processor based on `docx`. Tags are represented using
MailMerge fields.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'sablon'
```


## Usage

```ruby
require "sablon"
template = Sablon.template(File.expand_path("~/Desktop/template.docx"))
context = {
  title: "Fabulous Document",
  technologies: ["Ruby", "Markdown", "ODF"]
}
template.render_to_file File.expand_path("~/Desktop/output.docx"), context
```


### Writing Templates

Sablon templates are normal word documents (`.docx`) sprinkled with MergeFields
to perform operations. The following section will use the notation `«=title»` to
{'fraction_non_alphanumeric': 0.1321762349799733, 'fraction_numerical': 0.0, 'mean_word_length': 5.517391304347826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7259763', 'n_tokens_mistral': 497, 'n_tokens_neox': 464, 'n_words': 145}