diff --git a/README.md b/README.md index ba5a21f..a88daf9 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ global: # settings to us services: # service definition github_release: # service name - referenced within the 'feeds' definition service_feed: https://github.com/{{ name }}/releases.atom # where the rss feed is located - service_url: https://github.com/{{ name }} # used in the sub-title to link to the feed + service_url: https://github.com/{{ name }} # used in the subtitle to link to the feed ntfy_icon: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png ntfy_subtitle_prefix: 🤖 GitHub Release ntfy_subtitle_seperator: by @@ -65,12 +65,13 @@ feeds: # feeds to monitor from those services [...] config: - cache_location: ~/.cache + cache_location: /data run_on_startup: false log_level: info schedule: '*/30 * * * *' # crontab style expression - concurrent jobs are not possible service_wait: 60 # time to wait between services feed_wait: 5 # time to wait between posts of one feed + max_message_size: 4096 # max size of message for pagenation max_attempts: 3 # retry to send message; consider failed after retry_wait: 30 # time to wait between retrys ``` diff --git a/rss-ntfy/bot.py b/rss-ntfy/bot.py index a832684..1741dc9 100755 --- a/rss-ntfy/bot.py +++ b/rss-ntfy/bot.py @@ -56,7 +56,7 @@ def custom_validation(config): for feed_name, feed_config in config["feeds"].items(): if not "ntfy_topic" in feed_config: - if not "ntfy_topic" in config["services"][feed_name]: + if not "ntfy_topic" in config["services"][feed_name] and not "ntfy_topic" in config["global"]: raise jsonschema.ValidationError("The property 'ntfy_topic' must be present in either 'global', 'feeds', or 'services'.") @@ -88,12 +88,12 @@ def update_config(init=False): if custom_config is not None: if logger is not None: logger.debug(f'custom_config": {json.dumps(custom_config)}') - logger.debug(f'custom_config": {json.dumps(CONFIG)}') + logger.debug(f'default_config": {json.dumps(CONFIG)}') merged_config = merge_configurations(copy.deepcopy(DEFAULT_CONFIG), custom_config) if logger is not None: - logger.debug(f'custom_config": {json.dumps(merged_config)}') + logger.debug(f'merged_config": {json.dumps(merged_config)}') json_schema = load_schema(schema_path)