0.6.2 • Published 2 months ago

pandemics-mustache v0.6.2

Weekly downloads
3
License
BSD-3-Clause
Repository
gitlab
Last release
2 months ago

pandemics-mustache

Wrapper to apply mustache templating to your manuscript in pandemics.

Usage

cat my_document > pandemics-mustache [view1.json] [view2.json] [...]

Where the arguments are .json or .yaml files that contain the 'views' (ie. the name/values association to replace in the template).

If no arguments are given, pandemics-mustache will look in the front matter of the document provided on stdin:

---
mustache: results.json
---

or

---
mustache:
- results/res1.json
- results/res2.yaml
---

Glob expansion

You can directly load a set of files using globs:

---
mustache: results/*
---

Conflict management

If multiple files are provided, it might happen that the same entry is defined twice, which will throw an error. One workaround is add a prepend a prefix to the values loaded from a file, eg:

---
mustache:
- results/res1.json
- prefix: newres
  file: results/res2.yaml
---

will make all values in results/res2.yaml available using {{ newres.keyinres2 }}.

0.6.2

2 months ago

0.6.1

2 months ago

0.6.0

2 months ago

0.5.2

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.5.1

2 years ago

0.3.1

5 years ago