Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
maddenp-noaa committed Feb 27, 2024
1 parent b2ce03a commit 1f921f9
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions docs/sections/user_guide/cli/tools/mode_template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ The ``uw`` mode for handling :jinja2:`Jinja2 templates<templates>`.
$ uw template render --help
usage: uw template render [-h] [--input-file PATH] [--output-file PATH] [--values-file PATH]
[--values-format {ini,nml,sh,yaml}] [--values-needed] [--dry-run]
[--quiet] [--verbose]
[--values-format {atparse,bash,cfg,fieldtable,ini,jinja2,nml,sh,yaml,yml}]
[--values-needed] [--partial] [--dry-run] [--debug] [--quiet]
[--verbose]
[KEY=VALUE ...]
Render a template
Expand All @@ -45,10 +46,12 @@ The ``uw`` mode for handling :jinja2:`Jinja2 templates<templates>`.
Path to output file (defaults to stdout)
--values-file PATH
Path to file providing override or interpolation values
--values-format {ini,nml,sh,yaml}
--values-format {atparse,bash,cfg,fieldtable,ini,jinja2,nml,sh,yaml,yml}
Values format
--values-needed
Print report of values needed to render template
--partial
Permit partial template rendering
--dry-run
Only log info, making no changes
--debug
Expand Down Expand Up @@ -142,7 +145,14 @@ and a YAML file called ``values.yaml`` with the following contents:
[2023-12-18T19:30:05] ERROR Required value(s) not provided:
[2023-12-18T19:30:05] ERROR recipient
But values may be supplemented by ``key=value`` command-line arguments. For example:
But the ``--partial`` switch may be used to render as much as possible while passing expressions containing missing values through unchanged:

.. code-block:: text
$ uw template render --input-file template --values-file values.yaml --partial
Hello, {{ recipient }}!
Values may also be supplemented by ``key=value`` command-line arguments. For example:

.. code-block:: text
Expand Down

0 comments on commit 1f921f9

Please sign in to comment.