Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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
KeyDefaultEffect
app_idMercurioUser-Agent and sender name for many services
app_descMercurio Notificationslonger description, used by some services
app_urlhttps://github.com/AlphaJack/mercuriolink in footers and buttons
themedefaultreplaces {THEME} in the image masks
image_url_maskhttps://alphajack.github.io/mercurio/assets/icons/logo.pngper-type images: {TYPE}, {XY}, {THEME}, {EXTENSION} are replaced; empty disables them
image_url_logohttps://alphajack.github.io/mercurio/assets/icons/logo.pngthe logo; empty disables it
default_extension.pngreplaces {EXTENSION}
default_html_color#888888colour when no type colour applies
default_ascii_chars[?]marker when no type marker applies
storage_pathnonepersistent store directory (~ expanded); the CLI’s default is --storage-path
image_path_masknoneicon file for desktop notifiers, same placeholders; empty sends none. Default: the bundled icon
pgp_autogenyesgenerate 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 -c sources or URLs on the command line.
  • They override the CLI’s --storage-path and the library’s Asset for 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 of base.