All Projects → mattrobenolt → Jinja2 Cli

mattrobenolt / Jinja2 Cli

Licence: bsd-2-clause
CLI for Jinja2

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Jinja2 Cli

Structured Text Tools
A list of command line tools for manipulating structured text data
Stars: ✭ 6,180 (+1946.36%)
Mutual labels:  cli, xml, yaml, toml
Dasel
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.
Stars: ✭ 759 (+151.32%)
Mutual labels:  cli, xml, yaml, toml
Python Benedict
dict subclass with keylist/keypath support, I/O shortcuts (base64, csv, json, pickle, plist, query-string, toml, xml, yaml) and many utilities. 📘
Stars: ✭ 204 (-32.45%)
Mutual labels:  xml, yaml, toml
Ansible Config encoder filters
Ansible role used to deliver the Config Encoder Filters.
Stars: ✭ 48 (-84.11%)
Mutual labels:  xml, yaml, toml
Grow
A declarative website generator designed for high-quality websites, with a focus on easy maintenance and localization.
Stars: ✭ 360 (+19.21%)
Mutual labels:  cli, yaml, jinja2
Remarshal
Convert between CBOR, JSON, MessagePack, TOML, and YAML
Stars: ✭ 421 (+39.4%)
Mutual labels:  cli, yaml, toml
Oq
A performant, and portable jq wrapper to facilitate the consumption and output of formats other than JSON; using jq filters to transform the data.
Stars: ✭ 132 (-56.29%)
Mutual labels:  cli, xml, yaml
Konf
A type-safe cascading configuration library for Kotlin/Java/Android, supporting most configuration formats
Stars: ✭ 225 (-25.5%)
Mutual labels:  xml, yaml, toml
Hugo Elasticsearch
Generate Elasticsearch indexes for Hugo static sites by parsing front matter
Stars: ✭ 19 (-93.71%)
Mutual labels:  cli, yaml, toml
Yq
Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
Stars: ✭ 1,688 (+458.94%)
Mutual labels:  cli, xml, yaml
Cli
A simple, fast, and fun package for building command line apps in Go
Stars: ✭ 16,995 (+5527.48%)
Mutual labels:  cli, yaml, toml
remark-frontmatter
remark plugin to support frontmatter (YAML, TOML, and more)
Stars: ✭ 167 (-44.7%)
Mutual labels:  yaml, toml
Prinder
Free Pull Request reminder for Github. Has configurations to post reminders to Slack and email along with jinja templating
Stars: ✭ 21 (-93.05%)
Mutual labels:  yaml, jinja2
paerser
No description or website provided.
Stars: ✭ 38 (-87.42%)
Mutual labels:  yaml, toml
smacha
SMACHA is a meta-scripting, templating, and code generation engine for rapid prototyping of ROS SMACH state machines.
Stars: ✭ 15 (-95.03%)
Mutual labels:  yaml, jinja2
gen-cisco
🧨 Generates Cisco scripts based on YAML files
Stars: ✭ 29 (-90.4%)
Mutual labels:  yaml, jinja2
go-config
Configuration file loader for Go
Stars: ✭ 27 (-91.06%)
Mutual labels:  yaml, toml
cfg-rs
A Configuration Library for Rust Applications
Stars: ✭ 18 (-94.04%)
Mutual labels:  yaml, toml
transfer
Converts from one encoding to another. Supported formats HCL ⇄ JSON ⇄ YAML⇄TOML⇄XML⇄plist⇄pickle⇄properties ...
Stars: ✭ 70 (-76.82%)
Mutual labels:  yaml, toml
front-matter
The most featured front matter (yaml, json, neon, toml) parser and dumper for PHP.
Stars: ✭ 23 (-92.38%)
Mutual labels:  yaml, toml

$ jinja2

A CLI interface to Jinja2

$ jinja2 helloworld.tmpl data.json --format=json
$ cat data.json | jinja2 helloworld.tmpl
$ curl -s http://httpbin.org/ip | jinja2 helloip.tmpl
$ curl -s http://httpbin.org/ip | jinja2 helloip.tmpl > helloip.html

Install

$ pip install jinja2-cli

Usage

Usage: jinja2 [options] <input template> <input data>

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  --format=FORMAT       format of input variables: auto, ini, json,
                        querystring, yaml, yml
  -e EXTENSIONS, --extension=EXTENSIONS
                        extra jinja2 extensions to load
  -D key=value          Define template variable in the form of key=value
  -s SECTION, --section=SECTION
                        Use only this section from the configuration
  --strict              Disallow undefined variables to be used within the
                        template

Optional YAML support

If PyYAML is present, you can use YAML as an input data source.

$ pip install jinja2-cli[yaml]

Optional TOML support

If toml is present, you can use TOML as an input data source.

$ pip install jinja2-cli[toml]

Optional XML support

If xmltodict is present, you can use XML as an input data source.

$ pip install jinja2-cli[xml]

TODO

  • Variable inheritance and overrides
  • Tests!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].