From 4671cf5facc50921281f4b7cc8b0986c932e9b24 Mon Sep 17 00:00:00 2001 From: Brendan Haines Date: Sat, 14 Sep 2024 17:46:39 -0600 Subject: [PATCH] get rid of default config path --- README.md | 4 +++- goat_monitor/goat_monitor.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2834f0b..afc537b 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Yes, I know Gotify doesn't have "goat" in its name but it sounds like it. ## Configuration +Configuration lives in a TOML file which should have (at a minimum) the following: + ```toml server = "https://gotify.example.com" app_token = "app_token_from_gotify" @@ -15,7 +17,7 @@ app_token = "app_token_from_gotify" ## Usage ``` -goat_monitor --config ./config.toml --retries -1 -- +goat_monitor --config ./config.toml --retries 3 -- ``` The command can be any shell command including arbitrarily many options / arguments. diff --git a/goat_monitor/goat_monitor.py b/goat_monitor/goat_monitor.py index a4f8407..98c375f 100644 --- a/goat_monitor/goat_monitor.py +++ b/goat_monitor/goat_monitor.py @@ -17,7 +17,8 @@ from goat_monitor._version import __version__ # type: ignore @click.argument("command", nargs=-1, required=False, type=str) @click.option( "--config", - default="~/.config/goat_monitor.toml", + # default="~/.config/goat_monitor.toml", + required=True, type=click.Path(path_type=Path), help="Use a .toml configuration file", )