World Conquest Chronicles

World Conquest Chronicles

Motivator, v1.0.0

The utility for repeatedly displaying notifications in the standard OS way.

Major version.

Features

  • use the cron specification for displaying notifications on a schedule:
    • support for seconds in the cron specification;
  • random selection of a notification for displaying;
  • support for the Spintax format in notifications.

Installation

$ go install github.com/thewizardplusplus/motivator@latest

Usage

$ motivator -h | -help | --help
$ motivator [options]

Options:

  • -h, -help, --help — show the help message and exit;
  • -config PATH — the path to a config file (default: config.json).

Config

Format of the config in the JSON Schema format:

{
  "type": "object",
  "required": ["cron", "phrases"],
  "properties": {
    "cron": {
      "type": "string",
      "description": "in the format of the `cron` specification"
    },
    "phrases": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    }
  }
}

Example of the config:

{
  "cron": "*/5 * * * * *",
  "phrases": [
    "{Hello|Hey} world, {hope {you're|you are} {okay|good}|have a nice day}",
    "{Hello|Hey}{ world|}, how are you today?",
    "The {slow|quick} {fox|deer} {gracefully |}jumps over the {sleeping|lazy} dog"
  ]
}

Repository

Link: https://github.com/thewizardplusplus/motivator/tree/v1.0.0.

Content: code.

License: MIT.