Merge pull request #1 from karmanyaahm/master

Hey, thats cool. Thanks!
This commit is contained in:
Zeitpunk
2020-10-28 17:01:34 +01:00
committed by GitHub
2 changed files with 9 additions and 6 deletions

View File

@@ -14,11 +14,12 @@ This is a simple script for receiving [Gotify](https://github.com/gotify/server)
1. Clone this repo
<code>git clone https://github.com/ztpnk/gotify-dunst && cd gotify-dunst</code>
2. Install python requirements
2. Create a python venv `python3 -m venv .env`
3. Install python requirements
<code>./.env/bin/pip install -r requirements.txt</code>
3. Change the domain and token in main.py
4. Test if it runs
4. Change the domain and token in main.py
5. Test if it runs
<code>./.env/bin/python main.py</code>
5. Customize the gotify-dunst.service and copy it to /etc/systemd/system
6. Start and enable the Systemd Unit
6. Customize the gotify-dunst.service and copy it to /etc/systemd/system
7. Start and enable the Systemd Unit
<code>sudo systemd start gotify-dunst && sudo systemd enable gotify-dunst</code>

View File

@@ -8,7 +8,9 @@ domain = "push.example.com"
token = "z2Uny92TZBzsukg"
home = os.path.expanduser('~')
path = "{}/.cache/gotify-dust".format(home)
path = "{}/.cache/gotify-dunst".format(home)
if not os.path.isdir(path):
os.mkdir(path)
def get_picture(appid):
imgPath = "{}/{}.jpg".format(path, appid)