blob: 979ef1daa473320d716a4866f374933a75ade67b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Pikud Ha'oref Alarm Tracking
[](https://github.com/yuvadm/alarmpy/actions/workflows/build.yml)
[](https://pypi.org/project/alarmpy/)
A simple CLI tool for tracking Pikud Ha'oref alarms.
Polls the unofficial API endpoint every second for incoming alarms. Prints active alarms as they occur. Prints routine messages once every 5 minutes by default.

## ⚠️ Disclaimer ⚠️
This tool is based on an unofficial API, and cannot be guaranteed to show correct or timely data. **Do not** use it if human life is at stake. **Do not** assume it shows you correct data. **Do not** assume it works properly, or even works at all. Always follow official guidelines and procedures published by [Pikud Ha'oref](https://www.oref.org.il/).
Further fine-print covering the terms of use of this tool can be found in the [GPLv3 license](LICENSE) file.
## Install
### Pip
The easiest way to install is from PyPI with `pip`:
```bash
$ pip install alarmpy
```
You can then run the `alarmpy` executable directly:
```bash
$ alarmpy --help
```
### Pipenv
For development usage it's recommended to clone the git repo and use `pipenv`:
```bash
$ git clone https://github.com/yuvadm/alarmpy
$ cd alarmpy
$ pipenv sync -d
$ pipenv run alarmpy
```
## Usage
Advanced flags can be set as described in the usage:
```bash
$ pipenv run alarmpy --help
Usage: alarmpy.py [OPTIONS]
Options:
--language [en|he|ar|ru] Alert language
--polling-delay INTEGER Polling delay in seconds
--routine-delay INTEGER Routine message delay in seconds
--alarm-id Print alarm IDs
--repeat-alarms Do not suppress ongoing alarms
--quiet Print only active alarms
--desktop-notifications Create push notifications on your desktop
notification center (currently only in Mac OS)
--help Show this message and exit.
```
## License
[GPLv3](LICENSE)
|