Coder Social home page Coder Social logo

seird / gotify-tray Goto Github PK

View Code? Open in Web Editor NEW
36.0 1.0 6.0 2.23 MB

Cross-platform desktop client for receiving messages from a Gotify server

License: GNU General Public License v3.0

Makefile 0.12% PowerShell 0.13% Python 97.50% Inno Setup 1.43% Shell 0.83%
client cross-platform gotify desktop

gotify-tray's Introduction

Gotify Tray

A tray notification application for receiving messages from a Gotify server.

Getting started

  • Download the latest release.

  • or, install via pip:

    $ pip install gotify-tray
  • or, run from source:

    $ pip install -r requirements.txt
    $ python -m gotify_tray

Features

  • Receive gotify messages in the native notification area.
  • Reconnect after wake from sleep or losing network connection.
  • Disable notification banners for low priority messages.
  • Manually delete received messages.
  • Go through a history of all previously received messages.
  • Receive missed messages after losing network connection.

Images

Main window

Default Dark
main window default main window dark

Notification banners

Windows 10 KDE MacOS 12
notification kde_notification macos_notification
notification kde_notification

Build instructions

See BUILDING.

Requirements

  • python >=3.10

gotify-tray's People

Contributors

ceruleansky avatar dependabot[bot] avatar hydrargyrum avatar seird avatar supermanimmy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gotify-tray's Issues

Client cannot handle images

Hello and thank you for creating this app. I'm very happy with it!

I noticed that images aren't parsed correctly in the text are inside the app. I have Jellyfin connected to Gotify and it sends notifications with the cover image of movies and episodes when they are added/removed or watched. The webhook plugin uses Markdown syntax to pass images that are then displayed correctly in the Gotify WebUI. The same cannot be said for this app. I'm attaching images for clarity.

Gotify Tray cannot parse the image and url correctly.
image

Correctly displayed in the web ui.
image

Releasing updates to PyPi.org

Thanks for creating and maintaining gotify-tray. I used it constantly.

I've installed gotify-tray with pipx on my system. Pipx gets apps from PyPi.org by default and it found version 0.1.10 on there.

You're previous and also your latest update don't seem to have made it to PyPi.org.

I am now wondering, are you intending to release future updates on PyPi.org as well?

No notifications on Mac OSX 12.5

No notifications on Mac OSX 12.5.
The tray application is launching and communication with the server works aswell.
New messages are listed in the message window.

I am working with terminal-notifier for other stuff, which works perfectly.

Thanks
Alex

AttributeError: 'QStyleHints' object has no attribute 'colorSchemeChanged'

Just upgraded to 0.5.0 and tried to restart gotify-try and am getting an AttributeError now.

Here's the stack trace i get:

Traceback (most recent call last):
  File "/home/mark/.local/bin/gotify-tray", line 8, in <module>
    sys.exit(main())
  File "/home/mark/.local/pipx/venvs/gotify-tray/lib/python3.10/site-packages/gotify_tray/__main__.py", line 9, in main
    start_gui()
  File "/home/mark/.local/pipx/venvs/gotify-tray/lib/python3.10/site-packages/gotify_tray/gui/MainApplication.py", line 402, in start_gui
    app.init_ui()
  File "/home/mark/.local/pipx/venvs/gotify-tray/lib/python3.10/site-packages/gotify_tray/gui/MainApplication.py", line 95, in init_ui
    self.link_callbacks()
  File "/home/mark/.local/pipx/venvs/gotify-tray/lib/python3.10/site-packages/gotify_tray/gui/MainApplication.py", line 359, in link_callbacks
    self.styleHints().colorSchemeChanged.connect(lambda _: self.theme_change_requested_callback(settings.value("theme", type=str)))
AttributeError: 'QStyleHints' object has no attribute 'colorSchemeChanged'

I am on Manjaro using XFCE / I3

MacOS icon

Hello there,

Love the app and would like to keep using it on my Macbook.

Would you consider updating the icon for the MacOS version so that it matches the general OS design language? Here's a suggestion that you are free to use if you like.

icon_1024x1024

Thanks and keep up the good work!

Message timestamps from servers in negative timezones cause issues and ValueError exceptions

gotify adds timestamps to messages using golang's time format which when marshaled into json is Internet date/time format aka rfc3339 which has negative timezones and Z for UTC and are represented as ISO 8601 strings.

There is an issue with the below code because fromisioformat as stated in the link is not ISO 8601 string compliant and can not handle servers in non-positive timezones.

Thus when handling a timestamp such as 2022-06-04T06:30:36.4359552-10:00 gotify-tray when validating a server with messages or handling messages later on will end up with errors such as:
ValueError: Invalid isoformat string: '2022-06-04T06:30:36.435955+2022-06-04T06:30:36.4359552-10:00'

def __init__(self, d: dict, *args, **kwargs):
s = (
d["date"].split(".")[0] # date
+ "."
+ d["date"].split(".")[1][:6] # ms
+ "+"
+ d["date"].split("+")[-1] # timezone
)
d.update(
{"date": datetime.datetime.fromisoformat(s).astimezone(local_timezone)}

To fix this one suggestion comes from python's documentation which recommends to not use fromisoformat but to use the 3rd party dateutil.parser.isoparse otherwise if you continue to depend on the s = ( function where it grabs the timezone it should have cases for "Z" and "-" tokens but it would be better to be more rigorous.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.