Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fedora-infra/fedmsg-notify
Fedmsg Desktop Notifications
https://github.com/fedora-infra/fedmsg-notify
Last synced: 3 months ago
JSON representation
Fedmsg Desktop Notifications
- Host: GitHub
- URL: https://github.com/fedora-infra/fedmsg-notify
- Owner: fedora-infra
- License: gpl-3.0
- Archived: true
- Created: 2013-02-01T18:54:35.000Z (almost 12 years ago)
- Default Branch: develop
- Last Pushed: 2018-11-13T10:17:09.000Z (almost 6 years ago)
- Last Synced: 2024-05-15T13:06:18.191Z (6 months ago)
- Language: Python
- Homepage: http://lewk.org/blog/fedmsg-notify
- Size: 146 KB
- Stars: 15
- Watchers: 15
- Forks: 7
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
fedmsg-notify
=============Subscribing to the [Fedora Infrastructure Messsage Bus](http://fedmsg.com) on the desktop.
![fedmsg-notify](http://lewk.org/img/fedmsg-notify-0-crop.png "Realtime desktop notifications")
Features
--------* A dbus-activated `fedmsg-notify-daemon` that consumes every message
from the Fedora Infrastructure Messaging bus.* A `fedmsg-notify-config` graphical interface that lets you filter which
messages to displayInstalling
----------Due to a dependency on Twisted's gtk3reactor, fedmsg-notify is currently
only available on [Fedora 18](https://apps.fedoraproject.org/packages/fedmsg-notify).```
yum -y install fedmsg-notify
```Running
--------Once installed the "Fedmsg Notification Configuration" should appear in your
application menu. You can also run `fedmsg-notify-config` by hand, or `python
-m fedmsg_notify.gui` from git.![fedmsg-notify-config](http://lewk.org/img/fedmsg-notify-config-0.png "fedmsg-notify-config")
![fedmsg-notify-config](http://lewk.org/img/fedmsg-notify-config-1.png "fedmsg-notify-config")Using notification preferences from the FMN server
--------------------------------------------------It is possible to retrieve your notification preferences from the [FMN
server](https://apps.fedoraproject.org/notifications/) instead of configuring
them locally. To enable this behavior, run:```
gsettings set org.fedoraproject.fedmsg.notify use-server-prefs true
gsettings set org.fedoraproject.fedmsg.notify fmn-url https://apps.fedoraproject.org/notifications/api/
```Writing applications that consume fedmsg messages through DBus
--------------------------------------------------------------The `fedmsg-notify-daemon` has the ability to relay messages over DBus. When
enabled, it will trigger a `org.fedoraproject.fedmsg.notify.MessageReceived`
signal upon each message. This behavior can be enabled by running:```
gsettings set org.fedoraproject.fedmsg.notify emit-dbus-signals true
```Here is an example of a basic Python program that listens to fedmsg-notify signals over DBus.
```python
import json
import dbusfrom gi.repository import GObject
from dbus.mainloop.glib import DBusGMainLoopdef consume(topic, body):
print(topic)
print(json.loads(body))DBusGMainLoop(set_as_default=True)
bus = dbus.SessionBus()
bus.add_signal_receiver(consume, signal_name='MessageReceived',
dbus_interface='org.fedoraproject.fedmsg.notify',
path='/org/fedoraproject/fedmsg/notify')
loop = GObject.MainLoop()
loop.run()
```