Skip to content

Commit d38d486

Browse files
committed
Update documentation
1 parent 936fda8 commit d38d486

File tree

4 files changed

+48
-34
lines changed

4 files changed

+48
-34
lines changed

README.md

+6-10
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
![](header.png)
44

55

6-
7-
8-
9-
106
## Installation
117

128
```sh
@@ -17,21 +13,21 @@
1713

1814
#### Ubuntu
1915

20-
```
21-
$ sudo apt install libcairo2-dev libgirepository1.0-dev
16+
```sh
17+
sudo apt install libcairo2-dev libgirepository1.0-dev
2218
```
2319
#### Arch Linux
2420

25-
```
26-
$ sudo pacman -S gobject-introspection
21+
```sh
22+
sudo pacman -S gobject-introspection
2723
```
2824

2925

3026
## Usage example
3127

3228
```python
3329
from notify import notification
34-
notification('body message', title='optinal')
30+
notification('summary text', message='message body', app_name='myapp')
3531
```
3632

3733

@@ -42,7 +38,7 @@ $ sudo pacman -S gobject-introspection
4238
cd notify-send
4339
python -m venv venv
4440
source venv/bin/activate
45-
pip install -e .
41+
pip install -e .[dev]
4642
```
4743

4844

docs/api.md

+22-19
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,44 @@
1-
21
## `Notification`
32

4-
Displays a notification.
53

4+
Displays a notification.
65

76
**Paramters:**
87

9-
| Name | type | description |
8+
| Name | Type | Description |
109
| ---------|------|--------------------------------------------------------------|
11-
| title | str | The summary text (optional). |
12-
| message | str | The message body |
10+
| summary | str | The summary text |
11+
| message | str | The message body (optional) |
12+
| timeout | int | Notification length in milliseconds (optional) |
13+
| app_name | str | Caller app name |
1314
|\*\*kwargs| | Additional arguments (optional) |
1415

16+
1517
## Linux
1618

17-
This module contains the code for the notification using the Gtk api.
19+
This module contains the code for the notification using Gtk api.
20+
1821

1922
### `LinuxNotification`
2023

24+
2125
Displays a notification using the Gtk API.
2226

2327
**Paramters:**
2428

25-
| Name | Type | Description |
26-
| ---------|-----------|------------------------ |
27-
| app_name | str | The application name to use for this notification. |
28-
| title | str | The summary text |
29-
| message | str | The message body text |
30-
| image | str | The icon filename or icon theme-compliant name |
29+
| Name | Type | Description |
30+
| ---------|-----------|------------------------------------------------|
31+
| summary | str | The summary text |
32+
| message | str | The message body (optional) |
33+
| timeout | int | The timeout in milliseconds (optional) |
34+
| app_name | str | Caller app name |
35+
| image | str | The icon filename or icon theme-compliant name |
3136

3237

3338
## Windows
3439

35-
This module contains the code for the notification using the Win32 api.
40+
41+
This module contains the code for the notification using Win32 api.
3642

3743

3844
### `Win32Notification`
@@ -44,10 +50,7 @@ Displays a notification using the Win32 API.
4450

4551
| Name | Type | Description |
4652
| ---------|-----------|-------------------------------------------------------|
53+
| summary | str | The summary text |
54+
| message | str | The message body (optional) |
55+
| timeout | int | Timeout in milliseconds (optional) |
4756
| tip | str | Tooltip text (optional) |
48-
| timeout | int | Timeout for ballon tooltip in milliseconds (optional) |
49-
| title | str | Title for ballon tooltip (optional) |
50-
| message | str | Balloon tooltip text (optional) |
51-
52-
53-

docs/index.md

+18-4
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,34 @@
22

33
Displays a notification suitable for the platform being run on.
44

5+
## Example
6+
7+
```python
8+
from notify import notification
9+
notification('summary text', message='message body', app_name='myapp')
10+
```
511

612
## Installation
713

814
```bash
915
$ pip install notify-send
1016
```
1117

12-
## Example
18+
### Prerequisites
1319

14-
```python
15-
from notify import notification
16-
notification('what you want said', title=':)')
20+
#### Ubunut
21+
22+
```
23+
$ sudo apt install libcairo2-dev libgirepository1.0-dev
1724
```
1825

26+
#### Arch Linux
27+
28+
```
29+
$ sudo pacman -S gobject-introspection
30+
```
31+
32+
1933
* [Notification](api.md#notification)
2034
* [Notification Linux](api.md#linux)
2135
* [Notification Windows](api.md#windows)

mkdocs.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
site_name: Notify-Send
22

33
theme:
4-
name: "material"
4+
name: material
55

66
plugins:
77
- search
88
- mkdocstrings
9+

0 commit comments

Comments
 (0)