Skip to content

dacapo1142/PTTfeeds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PTTfeeds

Monitor PTT for interesting new posts with specified authors.

這是一個PTT發文追蹤器。他會透過PTT web介面,定期抓取最新的發文,當發文內容符合使用者定義的規則時,便會寄信通知。(注意,PTT web版的更新大約有五分鐘的延遲)

Installation

$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/dacapo1142/PTTfeeds/master/install.sh)"

Usage

$ cd PTTfeeds && python server.py

Setting

使用者可以自行定義通知的規則,其定義放置於settings.json中。(若查無此檔,程式將自行建立)

Example

{
    "gmail_user_id": "sender",
    "boards": {
        "Test": [{
            "subscribers": ["sub1@gmail.com"],
            "author": "author1",
            "title": ["a", "b", "c"]
        }, {
            "subscribers": ["sub2@gmail.com", "sub3@gmail.com"],
            "title": ["aaa"],
            "content": ["123", "321"]
        }]
    }
}

gmail_user_id代表了用以寄送email的gmail信箱帳號,範例為sender,故寄信地址為sender@gmail.com。 當在Test版出現新文章,其「作者為author1」且「標題包含abc」便會寄信通知sub1@gmail.com;當出現「標題包含aaa」且「內容包含123321」時,寄信通知sub2@gmail.comsub3@gmail.com

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published