|
2 | 2 |
|
3 | 3 | ## Intro |
4 | 4 |
|
5 | | - |
| 5 | +<figure> |
| 6 | +<img src="resources/logo/tera-cli-logo_256.png" alt="tera cli logo 256" /> |
| 7 | +</figure> |
6 | 8 |
|
7 | 9 | [tera](https://github.com/Keats/tera) is a template engine written in Rust and inspired by Jinja2. It allows merging some data called `context data` into a template and produces a new output. This project, `tera-cli`, is a command line for the [tera template engine](https://github.com/Keats/tera). |
8 | 10 |
|
@@ -186,61 +188,24 @@ Passing the `-a | --escape` flag allows escaping the content. |
186 | 188 |
|
187 | 189 | ## Usage |
188 | 190 |
|
189 | | - teracli 0.2.2 |
190 | | - chevdor <chevdor@gmail.com> |
191 | | - Command line utility for the tera templating engine. You need to provide a template using the tera |
192 | | - syntax as well as some data (various format are supported) |
193 | | - |
194 | | - USAGE: |
195 | | - tera [OPTIONS] --template <TEMPLATE> [CONTEXT] |
196 | | - |
197 | | - ARGS: |
198 | | - <CONTEXT> Location of the context data. This file can be of the following type: json | |
199 | | - toml | yaml. If you prefer to pass the data as stdin, use `--stdin` |
200 | | - |
201 | | - OPTIONS: |
202 | | - -a, --escape |
203 | | - Auto-escape rendered content. This is useful for HTML output |
204 | | - |
205 | | - -e, --env |
206 | | - If true, the current ENV will be appended to the data under the --env-key key |
207 | | - |
208 | | - --env-first |
209 | | - By default, the context is made of the data you pass and the ENV is applied afterwards. |
210 | | - Setting this option will apply the ENV first. This is interesting if you prefer your |
211 | | - data to override the ENV |
212 | | - |
213 | | - --env-key <ENV_KEY> |
214 | | - By default, if --env is set, the environment variables will be attached at the root of |
215 | | - the context. This is convenient but may end up conflicting with your data. To prevent |
216 | | - collisions, you can provide a custom key with this option |
217 | | - |
218 | | - --env-only |
219 | | - If you want to solely use the ENV as context, you may pass this option. This will |
220 | | - prevent an error about no context being passed to be raised |
221 | | - |
222 | | - --fail-on-collision |
223 | | - if you prefer your data to override the ENV |
224 | | - |
225 | | - -h, --help |
226 | | - Print help information |
227 | | - |
228 | | - -i, --include |
229 | | - This flag tells the command to parse all templates found in the same path where the |
230 | | - given template is located [aliases: inherit] |
231 | | - |
232 | | - --include-path <INCLUDE_PATH> |
233 | | - Option to define a different path from which search and parse templates [aliases: |
234 | | - inherit-path] |
235 | | - |
236 | | - -o, --out <OUT> |
237 | | - Optional output file. If not passed, using stdout |
238 | | - |
239 | | - -s, --stdin |
240 | | - The context data can be passed using stdin |
241 | | - |
242 | | - -t, --template <TEMPLATE> |
243 | | - Location of the template |
244 | | - |
245 | | - -V, --version |
246 | | - Print version information |
| 191 | + Command line utility for the tera templating engine. You need to provide a template using the tera syntax as well as some data (various format are supported) |
| 192 | + |
| 193 | + Usage: tera [OPTIONS] --template <TEMPLATE> [CONTEXT] |
| 194 | + |
| 195 | + Arguments: |
| 196 | + [CONTEXT] Location of the context data. This file can be of the following type: json | toml | yaml. If you prefer to pass the data as stdin, use `--stdin` |
| 197 | + |
| 198 | + Options: |
| 199 | + -t, --template <TEMPLATE> Location of the template |
| 200 | + -i, --include This flag tells the command to parse all templates found in the same path where the given template is located [aliases: inherit] |
| 201 | + --include-path <INCLUDE_PATH> Option to define a different path from which search and parse templates [aliases: inherit-path] |
| 202 | + -s, --stdin The context data can be passed using stdin |
| 203 | + -e, --env If true, the current ENV will be appended to the data under the --env-key key |
| 204 | + --env-key <ENV_KEY> By default, if --env is set, the environment variables will be attached at the root of the context. This is convenient but may end up conflicting with your data. To prevent collisions, you can provide a custom key with this option |
| 205 | + --env-first By default, the context is made of the data you pass and the ENV is applied afterwards. Setting this option will apply the ENV first. This is interesting if you prefer your data to override the ENV |
| 206 | + --fail-on-collision if you prefer your data to override the ENV |
| 207 | + --env-only If you want to solely use the ENV as context, you may pass this option. This will prevent an error about no context being passed to be raised |
| 208 | + -o, --out <OUT> Optional output file. If not passed, using stdout |
| 209 | + -a, --escape Auto-escape rendered content. This is useful for HTML output |
| 210 | + -h, --help Print help |
| 211 | + -V, --version Print version |
0 commit comments