Skip to content

Commit 7f1d94e

Browse files
committed
Add ntfy feature description to README.md
1 parent cb874d3 commit 7f1d94e

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020

2121
<img width="394" alt="Screen Shot 2021-07-31 at 12 49 49 PM" src="https://user-images.githubusercontent.com/3497137/127746862-79012afd-caa7-4319-930d-7acfc74fa2f4.png">
2222

23+
*Image when recieving a notification on a mobilephone using ntfy*
24+
25+
<img width="324" height="318" src="static/images/via_ntfy_sample.png">
26+
2327
## Quick demos and tutorials :notebook:
2428

2529
To test out this extension without any local set-up, please check out the [binder link](https://mybinder.org/v2/gh/mwakaba2/jupyterlab-notifications/main?urlpath=lab/tree/tutorial/py3_demo.ipynb). This will set-up the environment, install the extension, and take you to several demo notebooks for you to play around with to get familiar with the notifications extension.
@@ -85,6 +89,12 @@ Use the following settings to update cell execution time for a notification and
8589
// The minimum execution time to send out notification for a particular notebook cell (in seconds).
8690
"minimum_cell_execution_time": 60,
8791

92+
// Notification Methods
93+
// Methods how to notificate messages. Select from 'browser' or 'ntfy'
94+
"notification_methods": [
95+
"browser"
96+
],
97+
8898
// Report Notebook Cell Execution Time
8999
// Display notebook cell execution time in the notification.
90100
// If last_cell_only is set to true, the total duration of the selected cells will be displayed.
@@ -98,6 +108,45 @@ Use the following settings to update cell execution time for a notification and
98108

99109
![notification](https://user-images.githubusercontent.com/3497137/111881088-01db5200-897d-11eb-8faa-4701cabfcde4.gif)
100110

111+
## (Option) Notifications using `ntfy`
112+
113+
You can recieve notifications via `ntfy`.
114+
115+
**ntfy 2.7.0 documentation** https://ntfy.readthedocs.io/en/latest/
116+
117+
> 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.
118+
119+
### How to work
120+
121+
Install `ntfy`.
122+
123+
```console
124+
$ pip install ntfy
125+
```
126+
Configure ntfy in accodance with [the ntfy official document](https://ntfy.readthedocs.io/en/latest/#configuring-ntfy)
127+
128+
```console
129+
$ vim ~/.config/ntfy/ntfy.yml
130+
```
131+
132+
```yaml
133+
backends:
134+
- pushover
135+
pushover:
136+
user_key: hunter2
137+
```
138+
139+
Change the notifications [settings](#settings). Append `"ntfy"` into `notification_methods` attribute.
140+
- NOTE: The value `browser` implies default conventional method, which uses Webbrowser's Notification API.
141+
142+
```json5
143+
{
144+
// ...
145+
"notification_methods": ["browser", "ntfy"]
146+
// ...
147+
}
148+
```
149+
101150
## Contributing
102151

103152
### Development install

static/images/via_ntfy_sample.png

76.6 KB
Loading

0 commit comments

Comments
 (0)