Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-ntfy for openSUSE:Factory checked in at 2025-10-29 21:06:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-ntfy (Old) and /work/SRC/openSUSE:Factory/.python-ntfy.new.1980 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ntfy" Wed Oct 29 21:06:06 2025 rev:15 rq:1314209 version:2.7.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-ntfy/python-ntfy.changes 2025-06-10 09:10:12.907662549 +0200 +++ /work/SRC/openSUSE:Factory/.python-ntfy.new.1980/python-ntfy.changes 2025-10-29 21:07:16.840199528 +0100 @@ -1,0 +2,17 @@ +Tue Oct 28 20:25:23 UTC 2025 - Matthias Bach <[email protected]> + +- Update to version 2.7.1 + * Fix Matrix backend fails wheen trying to send messages with + unicode in them. + * Make theme icons available for linux backend. + * Swap Slacker for Slack SDK. + * Add compatibility with emoji 2.0. + * Compatility with Python 311, 3.12, and 3.13. +- Drop emoji-2.0-compatibility.patch merged upstream. +- Drop python-311-compat.patch merged upstream. +- Drop python-312-compat.patch merged upstream. +- Added a workaround for a test isolation issue affecting the + configuration tests. +- Switch service file from old disabled to modern manual run mode. + +------------------------------------------------------------------- Old: ---- emoji-2.0-compatibility.patch ntfy-2.7.0.tar.xz python-311-compat.patch python-312-compat.patch New: ---- ntfy-2.7.1.tar.xz ----------(Old B)---------- Old: * Compatility with Python 311, 3.12, and 3.13. - Drop emoji-2.0-compatibility.patch merged upstream. - Drop python-311-compat.patch merged upstream. Old:- Drop emoji-2.0-compatibility.patch merged upstream. - Drop python-311-compat.patch merged upstream. - Drop python-312-compat.patch merged upstream. Old:- Drop python-311-compat.patch merged upstream. - Drop python-312-compat.patch merged upstream. - Added a workaround for a test isolation issue affecting the ----------(Old E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-ntfy.spec ++++++ --- /var/tmp/diff_new_pack.K5VEoN/_old 2025-10-29 21:07:17.400223065 +0100 +++ /var/tmp/diff_new_pack.K5VEoN/_new 2025-10-29 21:07:17.404223233 +0100 @@ -20,7 +20,7 @@ %bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-ntfy -Version: 2.7.0 +Version: 2.7.1 Release: 0 Summary: A utility for sending push notifications License: GPL-3.0-only @@ -29,10 +29,7 @@ Source: ntfy-%{version}.tar.xz # https://github.com/dschep/ntfy/issues/247 Patch0: python-ntfy-no-mock.patch -Patch1: emoji-2.0-compatibility.patch Patch2: drop-misleading-shebangs.patch -Patch3: python-311-compat.patch -Patch4: python-312-compat.patch BuildRequires: %{python_module appdirs} # test requirements BuildRequires: %{python_module emoji >= 1.6.2} @@ -55,7 +52,7 @@ Suggests: python-instapush Suggests: python-psutil Suggests: python-rocketchat-API -Suggests: python-slacker +Suggests: python-slack-sdk Suggests: python-sleekxmpp Suggests: python-telegram-send BuildArch: noarch @@ -86,13 +83,18 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib}/ntfy* %check -%pytest --ignore 'tests/test_xmpp.py' -k 'not test_xmpp' +export XDG_CONFIG_HOME=/foo/config +# There is an isolation error. Somewhere in the tests the default configuration dict is modified. +# For the normal application execution that is not an issue as configuration is loaded only once. +# So this is the hacky workaround until the issue is fixed upstream. +%pytest --ignore 'tests/test_xmpp.py' -k 'not test_xmpp' --ignore 'tests/test_config.py' +%pytest --ignore 'tests/test_xmpp.py' -k 'not test_xmpp' 'tests/test_config.py' %pre %python_libalternatives_reset_alternative ntfy %files %{python_files} -%doc README.rst +%doc README.md %license LICENSE %python_alternative %{_bindir}/ntfy %{python_sitelib}/ntfy ++++++ _service ++++++ --- /var/tmp/diff_new_pack.K5VEoN/_old 2025-10-29 21:07:17.440224746 +0100 +++ /var/tmp/diff_new_pack.K5VEoN/_new 2025-10-29 21:07:17.444224914 +0100 @@ -1,16 +1,16 @@ <services> - <service name="obs_scm" mode="disabled"> + <service name="obs_scm" mode="manual"> <param name="url">https://github.com/dschep/ntfy.git</param> <param name="scm">git</param> - <param name="revision">v2.7.0</param> + <param name="revision">v2.7.1</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> </service> - <service name="tar" mode="disabled" /> - <service name="recompress" mode="disabled"> + <service name="tar" mode="manual" /> + <service name="recompress" mode="manual"> <param name="file">*.tar</param> <param name="compression">xz</param> </service> - <service name="set_version" mode="disabled" /> + <service name="set_version" mode="manual" /> </services> ++++++ ntfy-2.7.0.tar.xz -> ntfy-2.7.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/.gitignore new/ntfy-2.7.1/.gitignore --- old/ntfy-2.7.0/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/ntfy-2.7.1/.gitignore 2025-03-05 15:05:35.000000000 +0100 @@ -0,0 +1,11 @@ +*.py[co] +*.egg-info +/build +/dist +*travis.log +.eggs +htmlcov +*.orig +.coverage +cover +venv/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/.travis.yml new/ntfy-2.7.1/.travis.yml --- old/ntfy-2.7.0/.travis.yml 2018-11-23 23:42:53.000000000 +0100 +++ new/ntfy-2.7.1/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,51 +0,0 @@ -matrix: - include: - - language: generic - os: osx - before_install: - - virtualenv venv - - . ./venv/bin/activate - - language: generic - os: osx - before_install: - - pyenv install 3.6.3 - - virtualenv env -p $(pyenv root)/versions/3.6.3/bin/python - - source env/bin/activate - - language: python - python: 2.7 - os: linux - - language: python - python: 3.4 - os: linux - - language: python - python: 3.5 - os: linux - - language: python - python: 3.6 - os: linux - - language: python - python: pypy - os: linux -install: - - pip install -U pip setuptools - - pip install . .[xmpp] - - pip install coveralls yapf twine -script: | - set -e - coverage run --source=ntfy setup.py test - if ! python --version 2>&1; then - yapf -r ntfy -d - [ "$(yapf -r ntfy -d | wc -l)" -eq 0 ] - fi -after_success: coveralls -deploy: - - provider: pypi - twine_version: 1.12.1 - distributions: sdist bdist_wheel - on: - tags: true - python: 3.5 - repo: dschep/ntfy - user: dschep - password: - secure: Y1M1b2HnHi3uRgqXQWJSYFm2oAo+EbEEt4+9M8cqay1BhISUv0I727N/JUNiRoGAyt+6GTY9isEopO39LCXgTANYVzQHhQIEM9aY5DObFhwdkU3gv2YdE0MPAvh+VL3b5BDO8znc8lXxXzAvVDn4WFujnGeCPn+4ubP9OA2hnTyFiSlq+OqvNE6BoeZsUxeAOi29S65kSirevps1qDA/UeIT/94Qp5XtMolqlZtTTA6EEPNAA++mJcZYM7aBGf1oy89w7OupVw5t93Zhj90mb4z8p4VSfFXBcn40oo1DayegXF79tgqWLulz1fIzIJV3mY8Ge1Skp6HgJwNgmqOtiMcIwMbu/Kba9ifaFc+bUUQ1K0yZqNzznkDFscd8nQ9GJYXn+s92th0llQjBVzG5o89LPlEysMlb1ETu+BdP3kJruNX7ACKtQpBKMVHaYoDCkTb1rt7r5wbn/rc3wijRgTJo1fDG0XUuesAaaFpLo1bS3TRZQXu3zx+1OLQaXBWRA712HF6gLHbdK0aP8CCNWtayLz1ivjYg/F4W7rKePlTOeheRo2c8/k+CU6+AbblPZ7ane20/15tofzLnATFFpoRtXA7k4hfHIzC7s0R9nWYTU0OREe0ma+yJTUDQA+YKyVcPoFImdunGhkbxWDHggn+4RlXAWRPCRkhqI0g90Vw= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/README.md new/ntfy-2.7.1/README.md --- old/ntfy-2.7.0/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/ntfy-2.7.1/README.md 2025-03-05 15:05:35.000000000 +0100 @@ -0,0 +1,524 @@ +# About `ntfy` + +[](https://pypi.org/project/ntfy/) +[](http://ntfy.readthedocs.org/en/stable/?badge=latest) +[](https://saythanks.io/to/dschep) + +`ntfy` brings notification to your shell. It can automatically provide +desktop notifications when long running commands finish or it can send +push notifications to your phone when a specific command finishes. +Confused? This video demonstrates some of this functionality: + + + +## Quickstart + +``` shell +$ sudo pip install ntfy +$ ntfy send test +# send a notification when the command `sleep 10` finishes +# this sends the message '"sleep 10" succeeded in 0:10 minutes' +$ ntfy done sleep 10 +$ ntfy -b pushover -o user_key t0k3n send 'Pushover test!' +$ ntfy -t 'ntfy' send "Here's a custom notification title!" +$ echo -e 'backends: ["pushover"]\npushover: {"user_key": "t0k3n"}' > ~/.ntfy.yml +$ ntfy send "Pushover via config file!" +$ ntfy done --pid 6379 # pid extra +$ ntfy send ":tada: ntfy supports emoji! :100:" # emoji extra +# Enable shell integration +$ echo 'eval "$(ntfy shell-integration)"' >> ~/.bashrc +``` + +## Install + +The install technique in the quickstart is the suggested method of +installation. It can be installed in a virtualenv, but with some +caveats: Linux notifications require `--system-site-packages` for the +virtualenv and OS X notifications don\'t work at all. + +**:penguin: NOTE:** [Linux Desktop +Notifications](#linux-desktop-notifications---linux) require Python DBUS +bindings. See [here](#linux-desktop-notifications---linux) for more +info. + +### Shell integration + +`ntfy` has support for **automatically** sending notifications when long +running commands finish in bash and zsh. In bash it emulates zsh\'s +preexec and precmd functionality with +[rcaloras/bash-preexec](https://github.com/rcaloras/bash-preexec). To +enable it add the following to your `.bashrc` or `.zshrc`: + +``` shell +eval "$(ntfy shell-integration)" +``` + +By default it will only send notifications for commands lasting longer +than 10 seconds and if the terminal is focused. Terminal focus works on +X11(Linux) and with Terminal.app and iTerm2 on MacOS. Both options can +be configured via the `--longer-than` and `--foreground-too` options. + +To avoid unnecessary notifications when running interactive programs, +programs listed in `AUTO_NTFY_DONE_IGNORE` don\'t generate +notifications. For example: + +``` shell +export AUTO_NTFY_DONE_IGNORE="vim screen meld" +``` + +### Extras + +`ntfy` has a few features that require extra dependencies. + +: - `ntfy done -p $PID` requires installing as + `pip install ntfy[pid]` + - [emoji](https://en.wikipedia.org/wiki/Emoji) support requires + installing as `pip install ntfy[emoji]` + - [XMPP](https://xmpp.org/) support requires installing as + `pip install ntfy[xmpp]` + - [Telegram](https://telegram.org/) support requires installing as + `pip install ntfy[telegram]` + - [Instapush](https://instapush.im/) support requires installing + as `pip install ntfy[instapush]` + - [Slack](https://slack.com/) support requires installing as + `pip install ntfy[slack]` + - [Slack Incoming webhook](https://slack.com/) - simpler slack + implementation that doesn\'t have additional dependencies + - [Rocket.Chat](https://Rocket.Chat) support requires installing + as `pip install ntfy[rocketchat]` + +To install multiple extras, separate with commas: e.g., +`pip install ntfy[pid,emoji]`. + +## Configuring `ntfy` + +`ntfy` is configured with a YAML file stored at `~/.ntfy.yml` or in +standard platform specific locations: + +- Linux - `~/.config/ntfy/ntfy.yml` +- macOS - `~/Library/Application Support/ntfy/ntfy.yml` +- Windows - `C:\Users\<User>\AppData\Local\dschep\ntfy.yml` + +### Backends + +The backends key specifies what backends to use by default. Each backend +has its own configuration, stored in a key of its own name. For example: + +``` yaml +--- +backends: + - pushover +pushover: + user_key: hunter2 +pushbullet: + access_token: hunter2 +simplepush: + key: hunter2 +slack: + token: slacktoken + recipient: "#slackchannel" +xmpp: + jid: "[email protected]" + password: "xxxx" + mtype: "chat" + recipient: "[email protected]" +``` + +If you want mulitple configs for the same backend type, you can specify +any name and then specify the backend with a backend key. For example: + +``` yaml +--- +pushover: + user_key: hunter2 +cellphone: + backend: pushover + user_key: hunter2 +``` + +See the backends below for available backends and options. As of v2.6.0 +`ntfy` also supports [3rd party backends](#3rd-party-backends) + +### [Pushover](https://pushover.net) - `pushover` + +Required parameters: + +: - `user_key` + +Optional parameters: + +: - `sound` + - `priority` + - `expire` + - `retry` + - `callback` + - `api_token` - use your own application token + - `device` - target a device, if omitted, notification is sent to + all devices + - `url` + - `url_title` + - `html` + +### [Pushbullet](https://pushbullet.com) - `pushbullet` + +Required parameter: + +: - `access_token` - Your Pushbullet access token, created at + <https://www.pushbullet.com/#settings/account> + +Optional parameters: + +: - `device_iden` - a device identifier, if omited, notification is + sent to all devices + - `email` - send notification to pushbullet user with the + specified email or send an email if they aren\'t a pushullet + user + +### [Simplepush](https://simplepush.io) - `simplepush` + +Required parameter: + +: - `key` - Your Simplepush key, created by installing the Android + App (no registration required) at <https://simplepush.io> + +Optional parameters: + +: - `event` - sets ringtone and vibration pattern for incoming + notifications (can be defined in the simplepush app) + +### XMPP - `xmpp` + +Requires parameters: + +: - `jid` + - `password` + - `recipient` + +Optional parameters + +: - `hostname` (if not from jid) + - `port` + - `path_to_certs` + - `mtype` + +Requires extras, install like this: `pip install ntfy[xmpp]`. + +To verify the SSL certificates offered by a server: path_to_certs = +\"path/to/ca/cert\" + +Without dnspython library installed, you will need to specify the server +hostname if it doesn\'t match the jid. + +Specify port if other than 5222. NOTE: Ignored without specified +hostname + +NOTE: Google Hangouts doesn\'t support XMPP since 2017 + +### [Telegram](https://telegram.org) - `telegram` + +Requires extras, install like this: `pip install ntfy[telegram]`. + +Requires `ntfy` to be installed as `ntfy[telegram]`. This backend is +configured the first time you will try to use it: +`ntfy -b telegram send "Telegram configured for ntfy"`. + +### [Pushjet](https://pushjet.io/) - `pushjet` + +Required parameter: + +: - `secret` - The Pushjet service secret token, created with + <http://docs.pushjet.io/docs/creating-a-new-service> + +Optional parameters: + +: - + + `endpoint` - custom Pushjet API endpoint + + : (defaults to <https://api.pushjet.io>) + + - `level` - The importance level from 1(low) to 5(high) + + - `link` + +### [Notifico](https://n.tkte.ch/) - `notifico` + +Required parameter: + +: - + + `webhook` - The webhook link, created at <https://n.tkte.ch/> + + : (choose `Plain Text` service when creating the webhook) + +### [Slack](https://slack.com) - `slack` + +Requires extras, install like this: `pip install ntfy[slack]`. + +Required parameter: + +: - `token` - The Slack service secret token, either a legacy user + token created at + <https://api.slack.com/custom-integrations/legacy-tokens> or a + token obtained by creating an app at + <https://api.slack.com/apps?new_app=1> with `chat:write:bot` + scope and linking it to a workspace. + - `recipient` - The Slack channel or user to send notifications + to. If you use the `#` symbol the message is send to a Slack + channel and if you use the `@` symbol the message is send to a + Slack user. + +[Slack Incoming Webhook](https://slack.com) - `slack_webhook` +\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~ +Required parameter: \* `url` - the URL of the incoming webhook \* +`user` - The Slack channel or user to send notifications to + +### [Instapush](https://instapush.im/) - `insta` + +Requires extras, install like this `pip install ntfy[instapush]`. + +Instapush does not support notification title. It sends template-driven +notifications, so you have to setup you events on the dashboard first. +The backend is called insta due to homonymy with the instapush python +wrapper + +Required parameters: + +: - `appid` - The application id + - `secret` - The application secret + - `event_name` - The instapush event to be used + - `trackers` - The array of trakers to use + +Note on trackers: Trackers are placeholders for events (a sort of +notification template). If you defined more than one tracker in your +event you\'ll have to provide more messages. At the moment, the only way +to do so is to separate each message with a colon (:) character. You can +also escape the separator character: Example: + +``` shell +ntfy -b insta send "message1:message2" +ntfy -b insta send "message1:message2\:with\:colons" +``` + +### [Prowl](https://www.prowlapp.com/) - `prowl` + +Optional parameters: + +: - `api_key` + - `provider_key` + - `priority` + - `url` + +### [Linux Desktop Notifications](https://developer.gnome.org/notification-spec/) - `linux` + +Works via [dbus]{.title-ref}, works with most DEs like Gnome, KDE, XFCE +and with libnotify. + +The following dependecies should be installed. + +``` shell +$ sudo apt install python-dbus # on ubuntu/debian +``` + +You will need to install some font that supports emojis (in Debian +[fonts-symbola]{.title-ref} or Gentoo +[media-fonts/symbola]{.title-ref}). + +Optional parameters: + +: - `icon` - Specifies path to the notification icon, empty string + for no icon. + - `urgency` - Specifies the urgency level (low, normal, critical). + - `transient` - Skip the history (exp: the Gnome message tray) + (true, false). + - `soundfile` - Specifies the notification sound file (e.g. + /usr/share/sounds/notif.wav). + - `timeout` - Specifies notification expiration time level (-1 - + system default, 0 - never expire). + +### Windows Desktop Notifications - `win32` + +Uses `pywin32`. + +### Mac OS X Notification Center - `darwin` + +Requires `ntfy` to be installed globally (not in a virtualenv). + +### System log - `systemlog` + +Uses the `syslog` core Python module, which is not available on Windows +platforms. + +Optional parameters: + +: - `prio` - Syslog priority level. Default is `ALERT`. Possible + values are: + + - EMERG + - ALERT + - CRIT + - ERR + - WARNING + - NOTICE + - INFO + - DEBUG + + - `facility` - Syslog facility. Default is `LOCAL5`. Possible + values are: + + - KERN + - USER + - MAIL + - DAEMON + - AUTH + - LPR + - NEWS + - UUCP + - CRON + - SYSLOG + - LOCAL0 + - LOCAL1 + - LOCAL2 + - LOCAL3 + - LOCAL4 + - LOCAL5 + - LOCAL6 + - LOCAL7 + + - `fmt` - Format of the message to be sent to the system logger. + The title and the message are specified using the following + placeholders: + + - `{title}` + - `{message}` + + Default is `[{title}] {message}`. + +### [Termux:API](https://play.google.com/store/apps/details?id=com.termux.api&hl=en) - `termux` + +Requires the app to be install from the Play store and the CLI utility +be installed with `apt install termux-api`. + +### [Pushalot](https://pushalot.com) - `pushalot` + +Required parameter: + +: - `auth_token` - Your private Pushalot auth token, found here + <https://pushalot.com/manager/authorizations> + +Optional parameters: + +: - `source` - source of the notification + - `ttl` - message expire time in minutes (time to live) + - `url` - URL to include in the notifications + - `url_title` - visible URL title (ignored if no url specified) + - `image` - URL of image included in the notifications + - `important` - mark notifications as important + - `silent` - mark notifications as silent + +### [Rocket.Chat](https://rocket.chat) - `rocketchat` + +Requires extras, install like this: `pip install ntfy[rocketchat]`. + +Required parameters: + +: - `url` - URL of your Rocket.Chat instance + - `username` - login username + - `password` - login password + - `room` - room/channel name to post in + +### [Matrix.org](https://matrix.org) - `matrix` + +Requires extras, install like this: `pip install ntfy[matrix]`. + +Required parameters: + +: - `url` - URL of your homeserver instance + - `roomId` - room to post in + - `userId` - login userid + - `password` - login password + - `token` - access token + +You must either specify `token`, or `userId` and `password`. + +[Webpush](https://github.com/dschep/ntfy-webpush) - `ntfy_webpush` +\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~ +Webpush support is provded by an external ntfy module, install like +this: `pip install ntfy ntfy-webpush`. + +Required parameters: + +: - `subscription_info` - A + [PushSubscription](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription) + Object + - `private_key` - the path to private key file or anything else + that works with + [pywebpush](https://github.com/web-push-libs/pywebpush). + +For more info, see [ntfy-webpush]{#ntfy-webpush} +\<https://github.com/dschep/ntfy-webpush\>\`\_ + +### 3rd party backends + +To use or implement your own backends, specify the full path of the +module as your backend. The module needs to contain a module with a +function called `notify` with the following signature: + +``` python +def notify(title, message, **kwargs): + """ + kwargs contains retcode if using ntfy done or ntfy shell-integration + and all options in your backend's section of the config + """ + pass +``` + +### Other options + +Title is configurable with the [title]{.title-ref} key in the config. +Example: + +``` yaml +--- +title: Customized Title +``` + +### Backends ToDo + +- [Airgram](http://www.airgramapp.com) +- [Boxcar](https://boxcar.io) + +## Testing + +``` shell +python setup.py test +``` + +## Contributors + +- [dschep](https://github.com/dschep) - Maintainer & Lead Developer +- [danryder](https://github.com/danryder) - XMPP Backend & emoji + support +- [oz123](https://github.com/oz123) - Linux desktop notification + improvements +- [schwert](https://github.com/schwert) - PushJet support +- [rahiel](https://github.com/rahiel) - Telegram support +- [tymm](https://github.com/tymm) - Simplepush support +- [jungle-boogie](https://github.com/jungle-boogie) - Documentation + updates +- [tjbenator](https://github.com/tjbenator) - Advanced Pushover + options +- [mobiusklein](https://github.com/mobiusklein) - Win32 Bugfix +- [rcaloras](https://github.com/rcaloras) - Creator of + [bash-prexec]{.title-ref}, without which there woudn\'t be bash + shell integration for [ntfy]{.title-ref} +- [eightnoteight](https://github.com/eightnoteight) - Notifico support +- [juanpabloaj](https://github.com/juanpabloaj) - Slack support +- [giuseongit](https://github.com/giuseongit) - Instapush support +- [jlesage](https://github.com/jlesage) - Systemlog support +- [sambrightman](https://github.com/sambrightman) - Prowl support +- [mlesniew](https://github.com/mlesniew) - Pushalot support +- [webworxshop](https://github.com/webworxshop) - Rocket.Chat support +- [rhabbachi](https://github.com/rhabbachi) - transient option in + Linux desktop notifications +- [Half-Shot](https://github.com/Half-Shot) - Matrix support diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/README.rst new/ntfy-2.7.1/README.rst --- old/ntfy-2.7.0/README.rst 2018-11-23 23:42:53.000000000 +0100 +++ new/ntfy-2.7.1/README.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,455 +0,0 @@ -About ``ntfy`` -============== -|Version|_ |Docs|_ |Build|_ |WinBuild|_ |Coverage|_ |SayThanks|_ - -.. |Version| image:: https://img.shields.io/pypi/v/ntfy.svg?logo=data%3Aimage/svg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNDAiIGhlaWdodD0iMjQwIj48cGF0aCBmaWxsPSIjMzY3MWEyIiBkPSJNNjIuNDc2IDMzLjRjMC0xNi4zNiA0LjM4Ni0yNS4yNiAyOC42MDctMjkuNDk4IDE2LjQ0NC0yLjg4IDM3LjUyOC0zLjI0MiA1Ny4xOTMgMCAxNS41MzMgMi41NjQgMjguNjA3IDE0LjEzNCAyOC42MDcgMjkuNDk3djUzLjk3YzAgMTUuODMtMTIuNjkzIDI4Ljc5NS0yOC42MDcgMjguNzk1SDkxLjA4M2MtMTkuNDEgMC0zNS43NyAxNi41NS0zNS43NyAzNS4yNnYyNS44OTVIMzUuNjVjLTE2LjYzNiAwLTI2LjMyLTExLjk5My0zMC4zODgtMjguNzc2LTUuNDktMjIuNTQ2LTUuMjU2LTM1Ljk4IDAtNTcuNTc0QzkuODE4IDcyLjEzNyAyNC4zNzUgNjIuMTk4IDQxLjAxIDYyLjE5OGg3OC42OHYtNy4yMDRINjIuNDc2VjMzLjR6Ii8%2BPHBhdGggZmlsbD0iI2ZmZDA0NiIgZD0iTTE3Ni44ODMgMjA2LjEyM2MwIDE2LjM2LTE0LjE5OCAyNC42NDQtMjguNjA3IDI4Ljc3Ni0yMS42NzggNi4yMy0zOS4wNzUgNS4yNzMtNTcuMTkzIDAtMTUuMTMtNC40MS0yOC42MDctMTMuNDE3LTI4LjYwNy0yOC43OHYtNTMuOTdjMC0xNS41MzMgMTIuOTQ3LTI4Ljc5OCAyOC42MDctMjguNzk4aDU3LjE5M2MxOS4wNSAwIDM1Ljc3LTE2LjQ2NSAzNS43Ny0z NS45OFY2Mi4xOTZoMjEuNDQ0YzE2LjY1NiAwIDI0LjQ5NiAxMi4zNzYgMjguNjA3IDI4Ljc3NyA1LjcyMiAyMi43OCA1Ljk3NiAzOS44MTcgMCA1Ny41NzQtNS43ODUgMTcuMjUtMTEuOTcyIDI4Ljc3Ny0yOC42MDcgMjguNzc3aC04NS44djcuMjA1aDU3LjE5M3YyMS41OXoiLz48L3N2Zz4%3D -.. _Version: https://pypi.org/project/ntfy/ -.. |Docs| image:: http://readthedocs.org/projects/ntfy/badge/?version=latest -.. _Docs: http://ntfy.readthedocs.org/en/stable/?badge=latest -.. |Build| image:: https://img.shields.io/travis/dschep/ntfy/master.svg?logo=data%3Aimage/svg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSItMTQyLjUgLTE0Mi41IDMyIDE2IiB3aWR0aD0iMzIiIGhlaWdodD0iMTYiPjxjaXJjbGUgcj0iOCIgY3g9Ii0xMzQuNSIgY3k9Ii0xMzQuNSIgZmlsbD0iI2RkNDgxNCIvPjxnIGlkPSJhIiB0cmFuc2Zvcm09Im1hdHJpeCguMDU2NDYgMCAwIC4wNTY0NiAtMTM0LjUgLTEzNC41KSIgZmlsbD0iI2ZmZiI%252BPGNpcmNsZSBjeD0iLTk2LjQiIHI9IjE4LjkiLz48cGF0aCBkPSJNLTQ1LjYgNjguNGMtMTYuNi0xMS0yOS0yOC0zNC00Ny44IDYtNSA5LjgtMTIuMyA5LjgtMjAuNnMtMy44LTE1LjctOS44LTIwLjZjNS0xOS44IDE3LjQtMzYuNyAzNC00Ny44bDEzLjggMjMuMkMtNDYtMzUuMi01NS4zLTE4LjctNTUuMyAwYzAgMTguNyA5LjMgMzUuMiAyMy41IDQ1LjJ6Ii8%252BPC9nPjx1c2UgeGxpbms6aHJlZj0iI2EiIHRyYW5zZm9ybT0icm90YXRlKDEyMCAtMTM0LjUgLTEzNC41KSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIvPjx1c2UgeGxpbms6aHJlZj0iI2EiIHRyYW5zZm9ybT0icm90YXRlKC0xMjAgLTEzNC41IC0xMzQuNSkiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiLz48Y2lyY2xlIGN5PS ItMTM0LjUiIGN4PSItMTM0LjUiIHI9IjgiIGZpbGw9IiNkZDQ4MTQiLz48ZyB0cmFuc2Zvcm09Im1hdHJpeCguMDU2NDYgMCAwIC4wNTY0NiAtMTM0LjUgLTEzNC41KSIgZmlsbD0iI2ZmZiI%252BPGNpcmNsZSByPSIxOC45IiBjeD0iLTk2LjQiLz48cGF0aCBkPSJNLTQ1LjYgNjguNGMtMTYuNi0xMS0yOS0yOC0zNC00Ny44IDYtNSA5LjgtMTIuMyA5LjgtMjAuNnMtMy44LTE1LjctOS44LTIwLjZjNS0xOS44IDE3LjQtMzYuNyAzNC00Ny44bDEzLjggMjMuMkMtNDYtMzUuMi01NS4zLTE4LjctNTUuMyAwYzAgMTguNyA5LjMgMzUuMiAyMy41IDQ1LjJ6Ii8%252BPC9nPjx1c2UgaGVpZ2h0PSIxMDAlIiB3aWR0aD0iMTAwJSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIC0xMzQuNSAtMTM0LjUpIiB4bGluazpocmVmPSIjYSIvPjx1c2UgaGVpZ2h0PSIxMDAlIiB3aWR0aD0iMTAwJSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCAtMTM0LjUgLTEzNC41KSIgeGxpbms6aHJlZj0iI2EiLz48cGF0aCBkPSJNLTExMS41NTUtMTMwLjAzMWE4LjY5OCA4LjY5OCAwIDAgMS0uODYgMS41NDZjLS40NTMuNjQ1LS44MjMgMS4wOTItMS4xMDkgMS4zNC0uNDQyLjQwNy0uOTE2LjYxNS0xLjQyNC42MjctLjM2NCAwLS44MDQtLjEwNC0xLjMxNS0uMzE0LS41MTQtLjIxLS45ODUtLjMxMy0xLjQxNy0uMzEzLS40NTIgMC0uOTM3LjEwMy0xLjQ1Ni4zMTMtLjUyLjIxLS45MzguMzItMS4yNTguMzMtLjQ4Ny4wMjEtLjk3Mi0uMTkzLTEuNDU3LS4 2NDMtLjMwOS0uMjctLjY5Ni0uNzMyLTEuMTU5LTEuMzg3LS40OTctLjctLjkwNS0xLjUxLTEuMjI1LTIuNDM0LS4zNDMtLjk5OS0uNTE1LTEuOTY2LS41MTUtMi45MDIgMC0xLjA3Mi4yMzItMS45OTcuNjk2LTIuNzcyYTQuMDgyIDQuMDgyIDAgMCAxIDEuNDU3LTEuNDc0IDMuOTIgMy45MiAwIDAgMSAxLjk3LS41NTZjLjM4NyAwIC44OTQuMTIgMS41MjQuMzU1LjYyOC4yMzYgMS4wMzIuMzU1IDEuMjA5LjM1NS4xMzIgMCAuNTgtLjE0IDEuMzQtLjQxOC43MTgtLjI1OSAxLjMyNS0uMzY2IDEuODIxLS4zMjQgMS4zNDcuMTA5IDIuMzU4LjY0IDMuMDMgMS41OTUtMS4yMDMuNzMtMS43OTkgMS43NTItMS43ODcgMy4wNjIuMDEgMS4wMjEuMzgxIDEuODcgMS4xMDkgMi41NDUuMzMuMzEzLjY5OC41NTUgMS4xMDguNzI3LS4wODkuMjU4LS4xODMuNTA1LS4yODIuNzQyem0tMy4wODgtMTIuMTQ5YzAgLjgtLjI5MiAxLjU0Ny0uODc1IDIuMjM5LS43MDMuODIyLTEuNTUzIDEuMjk3LTIuNDc2IDEuMjIyYTIuNTAyIDIuNTAyIDAgMCAxLS4wMTgtLjMwM2MwLS43NjguMzM0LTEuNTkuOTI4LTIuMjYzLjI5Ni0uMzQuNjczLS42MjMgMS4xMy0uODQ5LjQ1Ny0uMjIyLjg4OS0uMzQ1IDEuMjk1LS4zNjYuMDExLjEwNy4wMTYuMjE0LjAxNi4zMnoiIGZpbGw9IiNmZmYiLz48L3N2Zz4%3D -.. _Build: https://travis-ci.org/dschep/ntfy -.. |WinBuild| image:: https://img.shields.io/appveyor/ci/dschep/ntfy/master.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjEyOCIgaGVpZ2h0PSIxMjgiIHZpZXdCb3g9IjAgMCAxMjggMTI4Ij48ZyBmaWxsPSIjMUJBMUUyIiB0cmFuc2Zvcm09InNjYWxlKDgpIj48cGF0aCBkPSJNMCAyLjI2NWw2LjUzOS0uODg4LjAwMyA2LjI4OC02LjUzNi4wMzd6Ii8%2BPHBhdGggZD0iTTYuNTM2IDguMzlsLjAwNSA2LjI5My02LjUzNi0uODk2di01LjQ0eiIvPjxwYXRoIGQ9Ik03LjMyOCAxLjI2MWw4LjY3LTEuMjYxdjcuNTg1bC04LjY3LjA2OXoiLz48cGF0aCBkPSJNMTYgOC40NDlsLS4wMDIgNy41NTEtOC42Ny0xLjIyLS4wMTItNi4zNDV6Ii8%2BPC9nPjwvc3ZnPg== -.. _WinBuild: https://ci.appveyor.com/project/dschep/ntfy -.. |Coverage| image:: https://coveralls.io/repos/github/dschep/ntfy/badge.svg?branch=master -.. _Coverage: https://coveralls.io/github/dschep/ntfy?brach=master -.. |Requires| image:: https://requires.io/github/dschep/ntfy/requirements.svg?branch=master -.. _Requires: https://requires.io/github/dschep/ntfy/requirements/?branch=master -.. |SayThanks| image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg -.. _SayThanks: https://saythanks.io/to/dschep - - -``ntfy`` brings notification to your shell. It can automatically provide -desktop notifications when long running commands finish or it can send -push notifications to your phone when a specific command finishes. -Confused? This video demonstrates some of this functionality: - -.. image:: https://raw.githubusercontent.com/dschep/ntfy/master/docs/demo.gif - -Quickstart ----------- - -.. code:: shell - - $ sudo pip install ntfy - $ ntfy send test - # send a notification when the command `sleep 10` finishes - # this sends the message '"sleep 10" succeeded in 0:10 minutes' - $ ntfy done sleep 10 - $ ntfy -b pushover -o user_key t0k3n send 'Pushover test!' - $ ntfy -t 'ntfy' send "Here's a custom notification title!" - $ echo -e 'backends: ["pushover"]\npushover: {"user_key": "t0k3n"}' > ~/.ntfy.yml - $ ntfy send "Pushover via config file!" - $ ntfy done --pid 6379 # pid extra - $ ntfy send ":tada: ntfy supports emoji! :100:" # emoji extra - # Enable shell integration - $ echo 'eval "$(ntfy shell-integration)"' >> ~/.bashrc - -Install -------- -The install technique in the quickstart is the suggested method of installation. -It can be installed in a virtualenv, but with some caveats: Linux notifications -require ``--system-site-packages`` for the virtualenv and OS X notifications -don't work at all. - -**:penguin: NOTE:** `Linux Desktop Notifications <#linux-desktop-notifications---linux>`_ -require Python DBUS bindings. See `here <#linux-desktop-notifications---linux>`_ for more info. - -Shell integration -~~~~~~~~~~~~~~~~~ -``ntfy`` has support for **automatically** sending notifications when long -running commands finish in bash and zsh. In bash it emulates zsh's preexec and -precmd functionality with `rcaloras/bash-preexec <https://github.com/rcaloras/bash-preexec>`_. -To enable it add the following to your ``.bashrc`` or ``.zshrc``: - -.. code:: shell - - eval "$(ntfy shell-integration)" - -By default it will only send notifications for commands lasting longer than 10 -seconds and if the terminal is focused. Terminal focus works on X11(Linux) and -with Terminal.app and iTerm2 on MacOS. Both options can be configured via the -``--longer-than`` and ``--foreground-too`` options. - -To avoid unnecessary notifications when running interactive programs, programs -listed in ``AUTO_NTFY_DONE_IGNORE`` don't generate notifications. For example: - -.. code:: shell - - export AUTO_NTFY_DONE_IGNORE="vim screen meld" - -Extras -~~~~~~ -``ntfy`` has a few features that require extra dependencies. - * ``ntfy done -p $PID`` requires installing as ``pip install ntfy[pid]`` - * [emoji](https://en.wikipedia.org/wiki/Emoji) support requires installing as ``pip install ntfy[emoji]`` - * [XMPP](https://xmpp.org/) support requires installing as ``pip install ntfy[xmpp]`` - * [Telegram](https://telegram.org/) support requires installing as ``pip install ntfy[telegram]`` - * [Instapush](https://instapush.im/) support requires installing as ``pip install ntfy[instapush]`` - * [Slack](https://slack.com/) support requires installing as ``pip install ntfy[slack]`` - * [Rocket.Chat](https://Rocket.Chat) support requires installing as ``pip install ntfy[rocketchat]`` - -To install multiple extras, separate with commas: e.g., ``pip install ntfy[pid,emjoi]``. - -Configuring ``ntfy`` --------------------- - -``ntfy`` is configured with a YAML file stored at ``~/.ntfy.yml`` or in standard platform specific locations: - -* Linux - ``~/.config/ntfy/ntfy.yml`` -* macOS - ``~/Library/Application Support/ntfy/ntfy.yml`` -* Windows - ``C:\Users\<User>\AppData\Local\dschep\ntfy.yml`` - -Backends -~~~~~~~~ - -The backends key specifies what backends to use by default. Each backend has -its own configuration, stored in a key of its own name. For example: - -.. code:: yaml - - --- - backends: - - pushover - pushover: - user_key: hunter2 - pushbullet: - access_token: hunter2 - simplepush: - key: hunter2 - slack: - token: slacktoken - recipient: "#slackchannel" - xmpp: - jid: "[email protected]" - password: "xxxx" - mtype: "chat" - recipient: "[email protected]" - -If you want mulitple configs for the same backend type, you can specify any -name and then specify the backend with a backend key. For example: - -.. code:: yaml - - --- - pushover: - user_key: hunter2 - cellphone: - backend: pushover - user_key: hunter2 - -See the backends below for available backends and options. As of v2.6.0 ``ntfy`` also supports -`3rd party backends <#3rd-party-backends>`_ - -`Pushover <https://pushover.net>`_ - ``pushover`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Required parameters: - * ``user_key`` - -Optional parameters: - * ``sound`` - * ``priority`` - * ``expire`` - * ``retry`` - * ``callback`` - * ``api_token`` - use your own application token - * ``device`` - target a device, if omitted, notification is sent to all devices - * ``url`` - * ``url_title`` - * ``html`` - -`Pushbullet <https://pushbullet.com>`_ - ``pushbullet`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Required parameter: - * ``access_token`` - Your Pushbullet access token, created at https://www.pushbullet.com/#settings/account - -Optional parameters: - * ``device_iden`` - a device identifier, if omited, notification is sent to all devices - * ``email`` - send notification to pushbullet user with the specified email or send an email if they aren't a pushullet user - -`Simplepush <https://simplepush.io>`_ - ``simplepush`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Required parameter: - * ``key`` - Your Simplepush key, created by installing the Android App (no registration required) at https://simplepush.io - -Optional parameters: - * ``event`` - sets ringtone and vibration pattern for incoming notifications (can be defined in the simplepush app) - -XMPP - ``xmpp`` -~~~~~~~~~~~~~~~ -Requires parameters: - * ``jid`` - * ``password`` - * ``recipient`` -Optional parameters - * ``hostname`` (if not from jid) - * ``port`` - * ``path_to_certs`` - * ``mtype`` - -Requires extras, install like this: ``pip install ntfy[xmpp]``. - -To verify the SSL certificates offered by a server: -path_to_certs = "path/to/ca/cert" - -Without dnspython library installed, you will need -to specify the server hostname if it doesn't match the jid. - -Specify port if other than 5222. -NOTE: Ignored without specified hostname - -NOTE: Google Hangouts doesn't support XMPP since 2017 - -`Telegram <https://telegram.org>`_ - ``telegram`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Requires extras, install like this: ``pip install ntfy[telegram]``. - -Requires ``ntfy`` to be installed as ``ntfy[telegram]``. This backend is -configured the first time you will try to use it: ``ntfy -b telegram send -"Telegram configured for ntfy"``. - -`Pushjet <https://pushjet.io/>`_ - ``pushjet`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Required parameter: - * ``secret`` - The Pushjet service secret token, created with http://docs.pushjet.io/docs/creating-a-new-service - -Optional parameters: - * ``endpoint`` - custom Pushjet API endpoint - (defaults to https://api.pushjet.io) - * ``level`` - The importance level from 1(low) to 5(high) - * ``link`` - -`Notifico <https://n.tkte.ch/>`_ - ``notifico`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Required parameter: - * ``webhook`` - The webhook link, created at https://n.tkte.ch/ - (choose ``Plain Text`` service when creating the webhook) - -`Slack <https://slack.com>`_ - ``Slack`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Requires extras, install like this: ``pip install ntfy[slack]``. - -Required parameter: - * ``token`` - The Slack service secret token, created in https://api.slack.com/web#authentication - * ``recipient`` - The Slack channel or user to send notifications to. If you use the ``#`` symbol the message is send to a Slack channel and if you use the ``@`` symbol the message is send to a Slack user. - -`Instapush <https://instapush.im/>`_ - ``insta`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Requires extras, install like this ``pip install ntfy[instapush]``. - -Instapush does not support notification title. -It sends template-driven notifications, so you have to setup you events on the dashboard first. -The backend is called insta due to homonymy with the instapush python wrapper - -Required parameters: - * ``appid`` - The application id - * ``secret`` - The application secret - * ``event_name`` - The instapush event to be used - * ``trackers`` - The array of trakers to use - -Note on trackers: -Trackers are placeholders for events (a sort of notification template). If you defined more than one tracker in your event -you'll have to provide more messages. At the moment, the only way to do so is to separate each message with a colon (:) character. -You can also escape the separator character: -Example: - -.. code:: shell - - ntfy -b insta send "message1:message2" - ntfy -b insta send "message1:message2\:with\:colons" - -`Prowl <https://www.prowlapp.com/>`_ - ``prowl`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Optional parameters: - * ``api_key`` - * ``provider_key`` - * ``priority`` - * ``url`` - -`Linux Desktop Notifications <https://developer.gnome.org/notification-spec/>`_ - ``linux`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Works via `dbus`, works with most DEs like Gnome, KDE, XFCE and with libnotify. - -The following dependecies should be installed. - -.. code:: shell - - $ sudo apt install python-dbus # on ubuntu/debian - -You will need to install some font that supports emojis (in Debian `fonts-symbola` or Gentoo `media-fonts/symbola`). - -Optional parameters: - * ``icon`` - Specifies path to the notification icon, empty string for no icon. - * ``urgency`` - Specifies the urgency level (low, normal, critical). - * ``transient`` - Skip the history (exp: the Gnome message tray) (true, false). - * ``soundfile`` - Specifies the notification sound file (e.g. /usr/share/sounds/notif.wav). - * ``timeout`` - Specifies notification expiration time level (-1 - system default, 0 - never expire). - -Windows Desktop Notifications - ``win32`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Uses ``pywin32``. - -Mac OS X Notification Center - ``darwin`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Requires ``ntfy`` to be installed globally (not in a virtualenv). - -System log - ``systemlog`` -~~~~~~~~~~~~~~~~~~~~~~~~~~ -Uses the ``syslog`` core Python module, which is not available on Windows -platforms. - -Optional parameters: - * ``prio`` - Syslog priority level. Default is ``ALERT``. Possible values - are: - - * EMERG - * ALERT - * CRIT - * ERR - * WARNING - * NOTICE - * INFO - * DEBUG - - * ``facility`` - Syslog facility. Default is ``LOCAL5``. Possible values - are: - - * KERN - * USER - * MAIL - * DAEMON - * AUTH - * LPR - * NEWS - * UUCP - * CRON - * SYSLOG - * LOCAL0 - * LOCAL1 - * LOCAL2 - * LOCAL3 - * LOCAL4 - * LOCAL5 - * LOCAL6 - * LOCAL7 - - * ``fmt`` - Format of the message to be sent to the system logger. The - title and the message are specified using the following placeholders: - - * ``{title}`` - * ``{message}`` - - Default is ``[{title}] {message}``. - -`Termux:API <https://play.google.com/store/apps/details?id=com.termux.api&hl=en>`_ - ``termux`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Requires the app to be install from the Play store and the CLI utility be -installed with ``apt install termux-api``. - -`Pushalot <https://pushalot.com>`_ - ``pushalot`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Required parameter: - * ``auth_token`` - Your private Pushalot auth token, found here https://pushalot.com/manager/authorizations - -Optional parameters: - * ``source`` - source of the notification - * ``ttl`` - message expire time in minutes (time to live) - * ``url`` - URL to include in the notifications - * ``url_title`` - visible URL title (ignored if no url specified) - * ``image`` - URL of image included in the notifications - * ``important`` - mark notifications as important - * ``silent`` - mark notifications as silent - -`Rocket.Chat <https://rocket.chat>`_ - ``rocketchat`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Requires extras, install like this: ``pip install ntfy[rocketchat]``. - -Required parameters: - * ``url`` - URL of your Rocket.Chat instance - * ``username`` - login username - * ``password`` - login password - * ``room`` - room/channel name to post in - -`Matrix.org <https://matrix.org>`_ - ``matrix`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Requires extras, install like this: ``pip install ntfy[matrix]``. - -Required parameters: - * ``url`` - URL of your homeserver instance - * ``roomId`` - room to post in - * ``userId`` - login userid - * ``password`` - login password - * ``token`` - access token - -You must either specify ``token``, or ``userId`` and ``password``. - - -`Webpush <https://github.com/dschep/ntfy-webpush>`_ - ``ntfy_webpush`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Webpush support is provded by an external ntfy module, install like this: ``pip install ntfy ntfy-webpush``. - -Required parameters: - * ``subscription_info`` - A `PushSubscription <https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription>`_ Object - * ``private_key`` - the path to private key file or anything else that works with `pywebpush <https://github.com/web-push-libs/pywebpush>`_. - -For more info, see _`ntfy-webpush` <https://github.com/dschep/ntfy-webpush>`_ - - -3rd party backends -~~~~~~~~~~~~~~~~~~ -To use or implement your own backends, specify the full path of the module as your backend. The -module needs to contain a module with a function called ``notify`` with the following signature: - -.. code:: python - - def notify(title, message, **kwargs): - """ - kwargs contains retcode if using ntfy done or ntfy shell-integration - and all options in your backend's section of the config - """ - pass - - -Other options -~~~~~~~~~~~~~ - -Title is configurable with the `title` key in the config. Example: - -.. code:: yaml - - --- - title: Customized Title - - -Backends ToDo -~~~~~~~~~~~~~ -- `Airgram <http://www.airgramapp.com>`_ -- `Boxcar <https://boxcar.io>`_ - -Testing -------- - -.. code:: shell - - python setup.py test - -Contributors ------------- -- `dschep <https://github.com/dschep>`_ - Maintainer & Lead Developer -- `danryder <https://github.com/danryder>`_ - XMPP Backend & emoji support -- `oz123 <https://github.com/oz123>`_ - Linux desktop notification improvements -- `schwert <https://github.com/schwert>`_ - PushJet support -- `rahiel <https://github.com/rahiel>`_ - Telegram support -- `tymm <https://github.com/tymm>`_ - Simplepush support -- `jungle-boogie <https://github.com/jungle-boogie>`_ - Documentation updates -- `tjbenator <https://github.com/tjbenator>`_ - Advanced Pushover options -- `mobiusklein <https://github.com/mobiusklein>`_ - Win32 Bugfix -- `rcaloras <https://github.com/rcaloras>`_ - Creator of `bash-prexec`, without which there woudn't be bash shell integration for `ntfy` -- `eightnoteight <https://github.com/eightnoteight>`_ - Notifico support -- `juanpabloaj <https://github.com/juanpabloaj>`_ - Slack support -- `giuseongit <https://github.com/giuseongit>`_ - Instapush support -- `jlesage <https://github.com/jlesage>`_ - Systemlog support -- `sambrightman <https://github.com/sambrightman>`_ - Prowl support -- `mlesniew <https://github.com/mlesniew>`_ - Pushalot support -- `webworxshop <https://github.com/webworxshop>`_ - Rocket.Chat support -- `rhabbachi <https://github.com/rhabbachi>`_ - transient option in Linux desktop notifications -- `Half-Shot <https://github.com/Half-Shot>`_ - Matrix support diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/appveyor.yml new/ntfy-2.7.1/appveyor.yml --- old/ntfy-2.7.0/appveyor.yml 2018-11-23 23:42:53.000000000 +0100 +++ new/ntfy-2.7.1/appveyor.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -build: false - -environment: - matrix: - - PYTHON: "C:/Python27" - - PYTHON: "C:/Python35" - -init: - - "ECHO %PYTHON%" - - ps: "ls C:/Python*" - -install: - # FIXME: updating pip fails with PermissionError - # - "%PYTHON%/Scripts/pip.exe install -U pip setuptools" - - "%PYTHON%/Scripts/pip.exe install -e . .[xmpp]" - -test_script: - - "%PYTHON%/Scripts/pip.exe --version" - - "%PYTHON%/python.exe setup.py test" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/docs/.gitignore new/ntfy-2.7.1/docs/.gitignore --- old/ntfy-2.7.0/docs/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/ntfy-2.7.1/docs/.gitignore 2025-03-05 15:05:35.000000000 +0100 @@ -0,0 +1 @@ +_build Binary files old/ntfy-2.7.0/docs/logo.png and new/ntfy-2.7.1/docs/logo.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/ntfy/__init__.py new/ntfy-2.7.1/ntfy/__init__.py --- old/ntfy-2.7.0/ntfy/__init__.py 2018-11-23 23:42:53.000000000 +0100 +++ new/ntfy-2.7.1/ntfy/__init__.py 2025-03-05 15:05:35.000000000 +0100 @@ -3,10 +3,10 @@ from os import getcwd, path, name from socket import gethostname from importlib import import_module -from inspect import getargspec +from inspect import getfullargspec from .backends.default import DefaultNotifierError -__version__ = '2.7.0' +__version__ = '2.7.1' _user_home = path.expanduser('~') _cwd = getcwd() @@ -65,7 +65,7 @@ notifier = e.module e = e.exception - args, _, _, defaults = getargspec(notifier.notify) + args, _, _, defaults, *_ = getfullargspec(notifier.notify) possible_args = set(args) required_args = set(args) if defaults is None else set(args[:-len(defaults)]) required_args -= set(['title', 'message', 'retcode']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/ntfy/backends/linux.py new/ntfy-2.7.1/ntfy/backends/linux.py --- old/ntfy-2.7.0/ntfy/backends/linux.py 2018-11-23 23:42:53.000000000 +0100 +++ new/ntfy-2.7.1/ntfy/backends/linux.py 2025-03-05 15:05:35.000000000 +0100 @@ -5,7 +5,7 @@ def notify(title, message, - icon=icon.png, + icon=path.abspath(icon.png), urgency=None, transient=None, soundfile=None, @@ -61,5 +61,5 @@ hints.update({'sound-file': soundfile}) message = message.replace('&', '&') - dbus_iface.Notify('ntfy', 0, "" if not icon else path.abspath(icon), title, + dbus_iface.Notify('ntfy', 0, "" or icon, title, message, [], hints, int(timeout)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/ntfy/backends/matrix.py new/ntfy-2.7.1/ntfy/backends/matrix.py --- old/ntfy-2.7.0/ntfy/backends/matrix.py 2018-11-23 23:42:53.000000000 +0100 +++ new/ntfy-2.7.1/ntfy/backends/matrix.py 2025-03-05 15:05:35.000000000 +0100 @@ -1,3 +1,4 @@ +from __future__ import unicode_literals from matrix_client.client import MatrixClient def notify(title, message, url, roomId, userId=None, token=None, password=None, retcode=None): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/ntfy/backends/ntfy_sh.py new/ntfy-2.7.1/ntfy/backends/ntfy_sh.py --- old/ntfy-2.7.0/ntfy/backends/ntfy_sh.py 1970-01-01 01:00:00.000000000 +0100 +++ new/ntfy-2.7.1/ntfy/backends/ntfy_sh.py 2025-03-05 15:05:35.000000000 +0100 @@ -0,0 +1,12 @@ +import requests + + +def notify(title, message, topic, host='https://ntfy.sh', user=None, password=None, **kwargs): + auth_kwarg = {'auth': (user, password)} if user and password else {} + + requests.post( + f"{host}/{topic}", + headers=dict(title=title), + data=message, + **auth_kwarg, + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/ntfy/backends/slack.py new/ntfy-2.7.1/ntfy/backends/slack.py --- old/ntfy-2.7.0/ntfy/backends/slack.py 2018-11-23 23:42:53.000000000 +0100 +++ new/ntfy-2.7.1/ntfy/backends/slack.py 2025-03-05 15:05:35.000000000 +0100 @@ -1,8 +1,8 @@ -from slacker import Slacker +from slack_sdk import WebClient def notify(title, message, token, recipient, retcode=None): - slack = Slacker(token) + slack = WebClient(token=token) - slack.chat.post_message(recipient, message) + slack.chat_postMessage(channel=recipient, text=message) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/ntfy/backends/slack_webhook.py new/ntfy-2.7.1/ntfy/backends/slack_webhook.py --- old/ntfy-2.7.0/ntfy/backends/slack_webhook.py 1970-01-01 01:00:00.000000000 +0100 +++ new/ntfy-2.7.1/ntfy/backends/slack_webhook.py 2025-03-05 15:05:35.000000000 +0100 @@ -0,0 +1,23 @@ +import requests + + +def notify(title, message, url, user, **kwargs): + + requests.post( + url, + json={ + "username": "ntfy", + "icon_url": "https://ntfy.readthedocs.io/en/latest/_static/logo.png", + "text": "{0}\n{1}".format(title, message), + "channel": user, + "blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "*{0}* {1}".format(title, message), + }, + } + ], + }, + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/ntfy/backends/telegram.py new/ntfy-2.7.1/ntfy/backends/telegram.py --- old/ntfy-2.7.0/ntfy/backends/telegram.py 2018-11-23 23:42:53.000000000 +0100 +++ new/ntfy-2.7.1/ntfy/backends/telegram.py 2025-03-05 15:05:35.000000000 +0100 @@ -1,18 +1,16 @@ from os import makedirs, path - from appdirs import user_config_dir - from telegram_send import configure, send +import asyncio config_dir = user_config_dir('ntfy', 'dschep') config_file = path.join(config_dir, 'telegram.ini') - def notify(title, message, retcode=None): """Sends message over Telegram using telegram-send, title is ignored.""" if not path.exists(config_file): if not path.exists(config_dir): makedirs(config_dir) print("Follow the instructions to configure the Telegram backend.\n") - configure(config_file) - send(messages=[message], conf=config_file) + asyncio.run(configure(config_file)) + asyncio.run(send(messages=[message], conf=config_file)) \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/ntfy/cli.py new/ntfy-2.7.1/ntfy/cli.py --- old/ntfy-2.7.0/ntfy/cli.py 2018-11-23 23:42:53.000000000 +0100 +++ new/ntfy-2.7.1/ntfy/cli.py 2025-03-05 15:05:35.000000000 +0100 @@ -358,7 +358,7 @@ if message is None: return 0 if emojize is not None and not args.no_emoji: - message = emojize(message, use_aliases=True) + message = emojize(message, language='alias') return notify( message, args.title, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/ntfy/config.py new/ntfy-2.7.1/ntfy/config.py --- old/ntfy-2.7.0/ntfy/config.py 2018-11-23 23:42:53.000000000 +0100 +++ new/ntfy-2.7.1/ntfy/config.py 2025-03-05 15:05:35.000000000 +0100 @@ -9,6 +9,7 @@ from ruamel import yaml from . import __version__ +from .default_config import config as default_configuration if yaml.version_info < (0, 15): safe_load = yaml.safe_load @@ -33,7 +34,7 @@ except IOError as e: if e.errno == errno.ENOENT and config_path == DEFAULT_CONFIG: logger.info('{} not found'.format(config_path)) - config = {} + config = default_configuration else: logger.error( 'Failed to open {}'.format(config_path), exc_info=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/ntfy/default_config.py new/ntfy-2.7.1/ntfy/default_config.py --- old/ntfy-2.7.0/ntfy/default_config.py 1970-01-01 01:00:00.000000000 +0100 +++ new/ntfy-2.7.1/ntfy/default_config.py 2025-03-05 15:05:35.000000000 +0100 @@ -0,0 +1 @@ +config = {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/setup.py new/ntfy-2.7.1/setup.py --- old/ntfy-2.7.0/setup.py 2018-11-23 23:42:53.000000000 +0100 +++ new/ntfy-2.7.1/setup.py 2025-03-05 15:05:35.000000000 +0100 @@ -8,19 +8,18 @@ extra_deps = { ':sys_platform == "win32"': ['pywin32'], ':sys_platform == "darwin"': ['pyobjc-core', 'pyobjc'], - 'xmpp': [ - 'sleekxmpp', 'dnspython' if version_info[0] < 3 else 'dnspython3'], + 'xmpp': ['sleekxmpp', 'dnspython3'], 'telegram': ['telegram-send'], 'instapush': ['instapush'], - 'emoji': ['emoji'], + 'emoji': ['emoji >= 1.6.2'], 'pid':['psutil'], - 'slack':['slacker'], + 'slack':['slack_sdk'], 'rocketchat':['rocketchat-API'], 'matrix':['matrix_client'], } test_deps = ['mock', 'sleekxmpp', 'emoji', 'psutil'] -long_description = open('README.rst').read() +long_description = "See the repo readme for mor information" setup( name='ntfy', @@ -47,13 +46,7 @@ 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', ], keywords='push notification', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ntfy-2.7.0/tests/test_cli.py new/ntfy-2.7.1/tests/test_cli.py --- old/ntfy-2.7.0/tests/test_cli.py 2018-11-23 23:42:53.000000000 +0100 +++ new/ntfy-2.7.1/tests/test_cli.py 2025-03-05 15:05:35.000000000 +0100 @@ -174,7 +174,7 @@ @patch('ntfy.backends.default.notify') def test_args(self, mock_notify): mock_notify.return_value = None - self.assertEquals(0, + self.assertEqual(0, ntfy_main([ '-o', 'foo', 'bar', '-b', 'default', '-t', 'TITLE', 'send', 'test'
