examiner
1.0.0
Operating system notification center monitoring, corresponding processing scripts can be written
For a detailed implementation introduction, see this tweet: Regardless of WeChat DingTalk or any other software, I wrote a universal message monitoring and processing robot.
pip install examiner
# 新特性
pip install git+https://github.com/howie6879/examiner
# 开发
git clone https://github.com/howie6879/examiner
cd examiner
# 推荐使用pipenv 你也可以使用自己中意的环境构建方式
pipenv install --python=/Users/howie6879/anaconda3/envs/python36/bin/python3.6 --skip-lock
Next, you only need to build your own monitoring script in the root directory, such as monitoring WeChat, and create a file named wechat_app.py
:
from examiner import Examiner
app_names = [ "Wechat" ]
examiner_app = Examiner ( app_names )
info_list = examiner_app . get_notifications ()
for each in info_list :
print ( each )
Output:
{ ' title ' : '老胡的储物柜' , ' subtitle ' : ' ' , ' body ' : '测试消息监控,任何应用都行' , ' delivered_date ' : datetime.datetime(2019, 10, 20, 21, 40, 26, 428654), ' presented ' : 1, ' app_identifier ' : ' com.tencent.xinwechat ' , ' app_name ' : ' WeChat ' , ' md5 ' : ' 75e24e2ccc502f01c101fcbd3637950b ' }