bradly0cjw / OXWU-notify

地牛WakeUP! 連動BOT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a modify version of orginal code


Difference

  1. Support Line Multiply Notification
  2. Support Discord Multiply Webhooks
  3. Fix Count Down Function

Usage

Note

Only list diffence between mod and orginal Version

Tip

There is lot of tutoriel about how to get Discord Webhook URL and Line Acces Token.

Warning

Due to EULA of OX-WakeUP, This notify system is only for personal use.
Do not use this for commercial use or use this to provide service to others.

Caution

Count Down Feature is for reference only, it may not be accurate due to network delay, different devices, etc.
Repository owner and autuor are not responsible for any loss caused by this feature.
Use at your own risk.

Install

Warning

If you got any error, please check if you have installed python3.

  • double click Install.bat and done.

Tip

If you are using linux, use Install.sh instead.

enviroment setup

  • rename env.json.sample to env.json
    in env.json modify

Important

You need some basic knowledge about json file.

{
    "WEBHOOK_URL": [
        {
            "name": "optional", #name (optional)
            "threshold": 5.5, #threshold of alert 5強 denoted as 5.5
            "url": "Your Webhook URL" #Discord Webhook URL
        },
        {
            "name": "optional",
            "threshold": 5.0, #threshold of alert 5弱 denoted as 5.0 or 5
            "url": "Your Webhook URL"
        }
        #add here
    ],
    "CITY": "Your City", #Your City
    "AREA": "Your Area", #Your Area
    "ACCESS_TOKEN": [
        {
            "name": "optional", #name (optional)
            "threshold": 0, #threshold of alert , 0 means all alert
            "token": "Your Access Token" #Line Access Token
        },
        {
            "name": "optional",
            "threshold": -1, #threshold of alert , -1 means no alert
            "token": "Your Access Token"
        }
        #add here
    ]
}

Tip

If you want to add multiple instance, add following code at the end of the entry.

Disocrd
        ,{
            "name": "optional",
            "threshold": 1,
            "url": "Your Webhook URL"
        }

Line 
        ,{
            "name": "optional",
            "threshold": 1,
            "token": "Your Access Token"
        }

Discription Below is original part of readme.md

猴子程式交流會Discord

地牛Wake UP!連動 Discord-Webhook-EEW

安裝Python

Python的部分,使用官網或微軟商店安裝。

  • 建議安裝3.7以上 3.10以下(3.10以上無法正常使用) image

安裝套件

Caution

This part is obsoleted

開啟Install.bat,輸入1並按下Enter後就會開始安裝。 image image

修改資料

Caution

This part is obsoleted

.env

WEBHOOK_URL=YOUR_Webhook_URL #你的Webhook網址,取代掉YOUR_Webhook_URL
CITY=YOUR_CITY #你要顯示的縣、市 例:台北市,取代掉YOUR_CITY
AREA=YOYR_AREA #你要顯示的區 例:松山區,取代掉YOYR_AREA

地牛Wake UP!軟體設定

speech.bat設定為連動的軟體 (示意圖) (記得勾選僅執行一次) image

Tip

If you are using linux, use speech.sh instead.

開發人員

特別感謝Eric101201,都他寫的🛐

About

地牛WakeUP! 連動BOT


Languages

Language:Python 71.3%Language:Batchfile 27.8%Language:Shell 0.9%