Skip to content

Commit

Permalink
OnNotExist option renamed from -o to -e to avoid problems with sp…
Browse files Browse the repository at this point in the history
…ecifying output with `-o`.

Signed-off-by: Rieks <[email protected]>
  • Loading branch information
RieksJ committed Aug 29, 2024
1 parent 4e1e867 commit 3f46e4c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/specs/tools/13-mrg-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ If a configuration file used, the long version of the parameter must be used (wi
| :--------------------------- | :---: | :---------- |
| `-c`, `--config <path>` | n | Path (including the filename) of the tool's (YAML) configuration file. |
| `-s`, `--scopedir <path>` | Y | Path of the scope directory from which the tool is called. |
| `-o`, `--onNotExist <action>` | n | The action in case an MRG file unexpectedly does not exist. |
| `-e`, `--onNotExist <action>` | n | The action in case an MRG file unexpectedly does not exist. |
| `-V`, `--version` | n | output the version number of the tool. |
| `-h`, `--help` | n | display help for command. |

Expand Down
2 changes: 1 addition & 1 deletion docs/specs/tools/21-mrgt.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ If a configuration file used, the long version of the parameter must be used (wi
| :-------------------------- | :---: | :---------- |
| `-c`, `--config <path>` | n | Path (including the filename) of the tool's (YAML) configuration file. |
| `-h`, `--help` | n | display help for command. |
| `-o`, `--onNotExist <action>` | n | The action in case a `vsntag` was specified, but wasn't found in the SAF. |
| `-e`, `--onNotExist <action>` | n | The action in case a `vsntag` was specified, but wasn't found in the SAF. |
| `-s`, `--scopedir <path>` | n | Path of the scope directory from which the tool is called. |
| `-v`, `--vsntag <vsntag>` | n | Versiontag for which the MRG needs to be (re)generated. |
| `-V`, `--version` | n | output the version number of the tool. |
Expand Down
12 changes: 11 additions & 1 deletion docs/specs/tools/22-hrgt.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ hrgt [ <paramlist> ] [ <globpattern> ]
where:

- `<paramlist>` is an (optional) list of parameters, as specified in the table below.
- [`globpattern`](https://en.wikipedia.org/wiki/Glob_(programming)#Syntax) (optional) specifies a set of (input) files that are to be processed. If a [configuration file](/docs/specs/files/configuration-file) is used, its contents may specify an additional set of input files to be processed.
- [`globpattern`](https://en.wikipedia.org/wiki/Glob_(programming)#Syntax) specifies a set of (input) files that are to be processed. The set of input files must be specified either on the command-line or in a [configuration file](/docs/specs/files/configuration-file) that is specified with the `-c` option.

<details>
<summary>Legend</summary>
Expand All @@ -93,11 +93,21 @@ If a [configuration file](/docs/specs/files/configuration-file) used, the long v
| `-con[n]`, `--converter[n] <type> or <hexpr>`[^1] | n | Specifies the [converter](@) to be used to produce [HRG lists](@). This can either be a predefined converter, or a [handlebars template](@). See [HRGT Converters](#hrgt-converters) for details. |
| `-con[error]`, `--converter[error] <type> or <hexpr>` | n | Specifies the [converter](@) to be used to replace the [MRGRef](@) with in case the associated [MRG](@) file could not be found. |
| `-sort`, `--sort <type> or <hexpr>` | n | Specifies the value to be used to sort [HRG lists](@). This can either be a predefined value, or a [handlebars template](@). |
| `-e`, `--onNotExist <action>` | n | The action in case a `vsntag` was specified, but wasn't found in the SAF. |
| `-f`, `--force` | n | Allow overwriting of existing files. |
| `-h`, `--help` | n | display help for command. |

[^1]: Multiple converters may be specified by appending a number to the parameter key, e.g., `converter[1]: <template>` `converter[2]: <template>`, where `n` specifies the order in which converters are applied to every [MRG entry](@). Using `converter`, without a number, is equal to using `converter[1]`.

The `<action>` parameter can take the following values:

| `<action>` | Description |
| :--------- | :---------- |
| `'throw'` | an error is thrown (an exception is raised), and processing will stop. |
| `'warn'` | a message is displayed (and logged) and processing continues. |
| `'log'` | a message is written to a log(file) and processing continues. |
| `'ignore'` | processing continues as if nothing happened. |

## HRG Generation {#what-it-does}

All [text conversion tools](@), including the [HRGT](@), convert (input) text files into results (output text files) by locating particular text patterns, doing some processing, and constructing texts that are used to replace the located text patterns with. This is illustrated in the figure below, and further explained in the page [TEv2 Text Conversion](/docs/overview/tev2-text-conversion):
Expand Down

0 comments on commit 3f46e4c

Please sign in to comment.