From 9efb82736d1d2cf80bcf98cf4696a48f45b200ee Mon Sep 17 00:00:00 2001 From: MK13 Date: Thu, 14 Oct 2021 23:53:04 +0200 Subject: [PATCH] Fix notification icon path issue and update readme Signed-off-by: MK13 --- README.md | 5 ++++- anime-rss.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5eb100e..36ebcb7 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,12 @@ Also requires at least Python `3.9`. ## Install ###### Install dependencies -`pip install feedparser` +`pip install feedparser notify-py` ###### Clone repo `git clone ...` +###### Install systemd service and timer (optional) +`anime-rss` comes with a systemd user unit and timer. To install those, execute the `install-systemd-unit.sh` script. +It will copy the unit and timer to `~/.config/systemd/user/` ## Config ###### Adjust `config.json` diff --git a/anime-rss.py b/anime-rss.py index 380cc44..7d4cf28 100644 --- a/anime-rss.py +++ b/anime-rss.py @@ -4,6 +4,7 @@ import re import subprocess import argparse from notifypy import Notify +import os feedparser.USER_AGENT = "anime-rss/1.0" @@ -35,7 +36,7 @@ def send_notification(message): notification = Notify() notification.title = "anime-rss" notification.message = message - notification.icon = "notfication-icon.png" + notification.icon = os.path.dirname(os.path.realpath(__file__)) + "/notfication-icon.png" notification.send()