onyo set

Set the value of key for matching assets. If the key does not exist, it is added and set appropriately.

Key names can be any valid YAML key name.

Multiple key=value pairs can be declared and divided by spaces. Quotes can be used around value, which is necessary when it contains a comma, whitespace, etc.

The type, make, model, and serial pseudo-keys can be set when the –rename flag is used. It will result in the file(s) being renamed.

If no asset or directory is specified, the current working directory is used. If Onyo is invoked from outside of the Onyo repository, the root of the repository is used.

Changes are printed to the terminal in the style of diff.

Errors reading or parsing files print to STDERR, but do not halt Onyo. Any error encountered while writing a file will cause Onyo to error and exit immediately.

usage: onyo set [-h] [-d N] [-m MESSAGE] [-n] [-q] [-r] [-y] -k KEYS
                [KEYS ...] [-p [PATH ...]]

Named Arguments

-d, --depth

descend at most N levels of directories below the starting-point, with an N value of 0 for infinite

Default: 0

-m, --message

Use the given MESSAGE as the commit message (rather than the default). If multiple -m options are given, their values are concatenated as separate paragraphs

-n, --dry-run

perform a non-interactive trial-run without making any changes

Default: False

-q, --quiet

silence output (requires the –yes flag)

Default: False

-r, --rename

Permit assigning values to pseudo-keys that would result in the file(s) being renamed.

Default: False

-y, --yes

respond “yes” to any prompts

Default: False

-k, --keys

key-value pairs to set in assets; multiple pairs can be given (e.g. key=value key2=value2)

-p, --path

assets or directories to set keys/values in

Default: [‘.’]