jinja2-cli-tddschn


Namejinja2-cli-tddschn JSON
Version 0.9.2 PyPI version JSON
download
home_pagehttps://github.com/tddschn/jinja2-cli-tddschn
SummaryA CLI interface to Jinja2
upload_time2023-11-28 17:41:15
maintainer
docs_urlNone
authorMatt Robenolt
requires_python>=3.12,<4.0
licenseBSD-2-Clause
keywords jinja2 jinja templating
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # $ jinja2

A CLI interface to Jinja2

Fork of jinja2-cli

<!-- ``` -->
<!-- $ 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 -->
<!-- ``` -->
<!---->
## Changelog

- Add -F to read value from files
<!-- add a cli option -F to accept a file’s content as value for a key, like `-D key=<content of file>`, but you can use it as `-f key=<path-to-file>` -->

## Installation

### pipx

This is the recommended installation method.

```
$ pipx install jinja2-cli-tddschn
```

### [pip](https://pypi.org/project/jinja2-cli-tddschn/)

```
$ pip install jinja2-cli-tddschn
```


## 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
  -F key=<path-to-file>, --file=key=<path-to-file>
                        Define template variable with a file content in the
                        form of key=<path-to-file>
  -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-tddschn[yaml]`

## Optional TOML support
If `toml` is present, you can use TOML as an input data source.

`$ pip install jinja2-cli-tddschn[toml]`

## Optional XML support
If `xmltodict` is present, you can use XML as an input data source.

`$ pip install jinja2-cli-tddschn[xml]`

## Optional HJSON support
If `hjson` is present, you can use HJSON as an input data source.

`$ pip install jinja2-cli-tddschn[hjson]`

## Optional JSON5 support
If `json5` is present, you can use JSON5 as an input data source.

`$ pip install jinja2-cli-tddschn[json5]`

<!-- ## TODO -->
<!--  * Variable inheritance and overrides -->
<!--   * Tests! -->
<!---->

## Develop

```
$ git clone https://github.com/tddschn/jinja2-cli-tddschn.git
$ cd jinja2-cli-tddschn
$ poetry install
```
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tddschn/jinja2-cli-tddschn",
    "name": "jinja2-cli-tddschn",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.12,<4.0",
    "maintainer_email": "",
    "keywords": "jinja2,jinja,templating",
    "author": "Matt Robenolt",
    "author_email": "matt@ydekproductions.com",
    "download_url": "https://files.pythonhosted.org/packages/04/d9/735d876f205054d98f6ecd929d07b4dba56a5d08c53c9fe999a7c7c0e0e3/jinja2_cli_tddschn-0.9.2.tar.gz",
    "platform": null,
    "description": "# $ jinja2\n\nA CLI interface to Jinja2\n\nFork of jinja2-cli\n\n<!-- ``` -->\n<!-- $ jinja2 helloworld.tmpl data.json --format=json -->\n<!-- $ cat data.json | jinja2 helloworld.tmpl -->\n<!-- $ curl -s http://httpbin.org/ip | jinja2 helloip.tmpl -->\n<!-- $ curl -s http://httpbin.org/ip | jinja2 helloip.tmpl > helloip.html -->\n<!-- ``` -->\n<!---->\n## Changelog\n\n- Add -F to read value from files\n<!-- add a cli option -F to accept a file\u2019s content as value for a key, like `-D key=<content of file>`, but you can use it as `-f key=<path-to-file>` -->\n\n## Installation\n\n### pipx\n\nThis is the recommended installation method.\n\n```\n$ pipx install jinja2-cli-tddschn\n```\n\n### [pip](https://pypi.org/project/jinja2-cli-tddschn/)\n\n```\n$ pip install jinja2-cli-tddschn\n```\n\n\n## Usage\n```\nUsage: jinja2 [options] <input template> <input data>\n\nOptions:\n  --version             show program's version number and exit\n  -h, --help            show this help message and exit\n  --format=FORMAT       format of input variables: auto, ini, json,\n                        querystring, yaml, yml\n  -e EXTENSIONS, --extension=EXTENSIONS\n                        extra jinja2 extensions to load\n  -D key=value          Define template variable in the form of key=value\n  -F key=<path-to-file>, --file=key=<path-to-file>\n                        Define template variable with a file content in the\n                        form of key=<path-to-file>\n  -s SECTION, --section=SECTION\n                        Use only this section from the configuration\n  --strict              Disallow undefined variables to be used within the\n                        template\n```\n\n## Optional YAML support\nIf `PyYAML` is present, you can use YAML as an input data source.\n\n`$ pip install jinja2-cli-tddschn[yaml]`\n\n## Optional TOML support\nIf `toml` is present, you can use TOML as an input data source.\n\n`$ pip install jinja2-cli-tddschn[toml]`\n\n## Optional XML support\nIf `xmltodict` is present, you can use XML as an input data source.\n\n`$ pip install jinja2-cli-tddschn[xml]`\n\n## Optional HJSON support\nIf `hjson` is present, you can use HJSON as an input data source.\n\n`$ pip install jinja2-cli-tddschn[hjson]`\n\n## Optional JSON5 support\nIf `json5` is present, you can use JSON5 as an input data source.\n\n`$ pip install jinja2-cli-tddschn[json5]`\n\n<!-- ## TODO -->\n<!--  * Variable inheritance and overrides -->\n<!--   * Tests! -->\n<!---->\n\n## Develop\n\n```\n$ git clone https://github.com/tddschn/jinja2-cli-tddschn.git\n$ cd jinja2-cli-tddschn\n$ poetry install\n```",
    "bugtrack_url": null,
    "license": "BSD-2-Clause",
    "summary": "A CLI interface to Jinja2",
    "version": "0.9.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/tddschn/jinja2-cli-tddschn/issues",
        "Homepage": "https://github.com/tddschn/jinja2-cli-tddschn",
        "Repository": "https://github.com/tddschn/jinja2-cli-tddschn"
    },
    "split_keywords": [
        "jinja2",
        "jinja",
        "templating"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "70e4751a9d36d44ac6f6e7dbe2231135379be02e62293a4c8939b6a127279cc5",
                "md5": "8d25318f30015842fe6eaccf1feddd33",
                "sha256": "e4c570fc205a1d6b44866597c106dc4281be5bc5aa16386a7fe0b043777376bc"
            },
            "downloads": -1,
            "filename": "jinja2_cli_tddschn-0.9.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8d25318f30015842fe6eaccf1feddd33",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12,<4.0",
            "size": 7428,
            "upload_time": "2023-11-28T17:41:14",
            "upload_time_iso_8601": "2023-11-28T17:41:14.359688Z",
            "url": "https://files.pythonhosted.org/packages/70/e4/751a9d36d44ac6f6e7dbe2231135379be02e62293a4c8939b6a127279cc5/jinja2_cli_tddschn-0.9.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "04d9735d876f205054d98f6ecd929d07b4dba56a5d08c53c9fe999a7c7c0e0e3",
                "md5": "8b94c1f40f806589bda50621a1bb098b",
                "sha256": "5e7f4d86446c1ac197b440aed81994b80dc1726a2ebf66c8a26a58dee1956b9e"
            },
            "downloads": -1,
            "filename": "jinja2_cli_tddschn-0.9.2.tar.gz",
            "has_sig": false,
            "md5_digest": "8b94c1f40f806589bda50621a1bb098b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12,<4.0",
            "size": 6523,
            "upload_time": "2023-11-28T17:41:15",
            "upload_time_iso_8601": "2023-11-28T17:41:15.932366Z",
            "url": "https://files.pythonhosted.org/packages/04/d9/735d876f205054d98f6ecd929d07b4dba56a5d08c53c9fe999a7c7c0e0e3/jinja2_cli_tddschn-0.9.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-28 17:41:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tddschn",
    "github_project": "jinja2-cli-tddschn",
    "github_not_found": true,
    "lcname": "jinja2-cli-tddschn"
}
        
Elapsed time: 1.88159s