Asset overrides
The asset is the application identity shared by all services: the name
sent as User-Agent and sender, the description and URL some services
show, the per-type images and where persistent state is kept. A YAML
configuration can override it (TEXT files cannot):
version: 1
asset:
app_id: Backup Bot
image_url_mask: https://img.example.com/{THEME}/{TYPE}-{XY}{EXTENSION}
storage_path: ~/.cache/backup-bot
urls:
- json://localhost:8080/hook
| Key | Default | Effect |
|---|---|---|
app_id | Mercurio | User-Agent and sender name for many services |
app_desc | Mercurio Notifications | longer description, used by some services |
app_url | https://github.com/AlphaJack/mercurio | link in footers and buttons |
theme | default | replaces {THEME} in the image masks |
image_url_mask | https://alphajack.github.io/mercurio/assets/icons/logo.png | per-type images: {TYPE}, {XY}, {THEME}, {EXTENSION} are replaced; empty disables them |
image_url_logo | https://alphajack.github.io/mercurio/assets/icons/logo.png | the logo; empty disables it |
default_extension | .png | replaces {EXTENSION} |
default_html_color | #888888 | colour when no type colour applies |
default_ascii_chars | [?] | marker when no type marker applies |
storage_path | none | persistent store directory (~ expanded); the CLI’s default is --storage-path |
image_path_mask | none | icon file for desktop notifiers, same placeholders; empty sends none. Default: the bundled icon |
pgp_autogen | yes | generate a PGP key pair in the storage folder when e-mail encryption needs one; default yes |
timezone (or tz) sets the zone of the dates services write (e-mail
Date:, syslog) for URLs without ?tz=: an IANA name, any case, or the
location alone (paris). An unknown zone is ignored with a warning
(Ignored invalid timezone "...").
Keys without effect
Accepted without effect: image_path_logo, encoding, async_mode, interpret_escapes, abort_on_chain_failure, pem_autogen, secure_logging, http_redirects, lang, language, timezone, tz.
Use -e, -Da or ?redirect=no for what some of them
control. Keys starting or ending with _ are ignored with a warning;
unknown keys (including interpret_emojis, storage_mode, storage_salt,
storage_idlen) and values of the wrong type are rejected with a warning
(WARNING - Invalid asset key "storage_mode"., visible with
mercurio check -v).
Scope
- The overrides apply to every service of that configuration and its includes; when several files of one load set a key, the last one read wins.
- They do not affect other
-csources or URLs on the command line. - They override the CLI’s
--storage-pathand the library’sAssetfor those services. They only take effect when they set at least one key from the table. - In the library,
Config::asset_for(&base)returns the asset a configuration applies on top ofbase.