CLI Samples

Help

[Errno 2] No such file or directory: 'datatemplate'

Data File

---
key1: value1

---
key: value
key1: different value

Template File

.. -*- mode: rst -*-

Static Heading
--------------

Individual Item
~~~~~~~~~~~~~~~

{{ data[0]|tojson }}

List of Items
~~~~~~~~~~~~~

{% for item in data %}
- {{item|tojson}}

  - {{item.key}}
  - {{item.key1}}
{% endfor %}


Mapping Series Table
~~~~~~~~~~~~~~~~~~~~

Rendering a table from a list of nested dictionaries using dynamic
headers.

{{ make_list_table_from_mappings(
    [('Key', 'key'), ('Key One', 'key1')],
    data,
    title='Table from series of mappings',
    ) }}

Rendering a Template

$ datatemplate render -o multiple-documents \
  doc/source/_templates/sample-multiple.tmpl \
  doc/source/sample-multiple.yaml
[Errno 2] No such file or directory: 'datatemplate'

Experimenting by Dumping Data

CSV Data With Headers

$ datatemplate dump -o dialect:excel-tab \
  -o headers \
  doc/source/sample.csv
[Errno 2] No such file or directory: 'datatemplate'

CSV Data Without Headers

$ datatemplate dump -o dialect:excel-tab \
  doc/source/sample.csv
[Errno 2] No such file or directory: 'datatemplate'