notify you on Wechat when certain task is completed
Project description
# WECHAT NOTIFY
Many scripts today may take a long time to run, such as deep learning tasks. We wonder to check the results immediately after its accomplishment but keeping an eye on the process is not desirable.
This project is aimed to notify you through WeChat when certain command is completed.
## requirements
This package rely on requests.
`bash pip3 install requests `
### SERVER CHAN
This project rely on [SERVER CHAN](http://sc.ftqq.com/3.version) to push notifications to WeChat. Please follow the instructions on the website and set your SCKEY to environment variable as SERVER_CHAN_TOKEN.
Your command’s output and error will be write to file stdout and stderr regardless of whether notification will be push or not.
## usage
`bash notify [bash command] `
Note that special chars of bash, such as >, need to be escaped so that the script can capture the corrent bash command. For example:
`bash notify python train.py \> trail.log `
## example
WECHAT_NOTIFY will push three kinds of notifications.
[Success]: inform you [what command, start time, how long the command takes, last three lines of output(if exists)]
<img src=’imgs/success.png’ height=300>
[Failed]: inform you [what command, start time, how long the command takes, last three lines of stderr(if exists)]
<img src=’imgs/failed.png’ height=300> <!– ![img](imgs/failed.png) –>
[Keyboard Interrupt]: inform you [what command, start time, ‘Keyboard Interrupt’]
<img src=’imgs/kayboard.png’ height=300> <!– ![img](imgs/kayboard.png) –>
## TODO
[ ] unit test
[ ] Email support
[ ] test on WeChat Work
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file wechat_notify-1.0-py3-none-any.whl
.
File metadata
- Download URL: wechat_notify-1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e162110b1cbdf71cb630de7391fdb7d5c430cd87f197f996983926250f5e7259 |
|
MD5 | 9ddd92573c7de25f121852cb58e9e38e |
|
BLAKE2b-256 | 1cfcdb5df9ff13d940e9cf5d9d50f3c3edb436e00dcd3d824feec7be9485e536 |