FetchNews - news aggregator.
Service to fetch news from websites or RSS feeds.
User may specify news sources to monitor.
FetchNews will monitor these sources and save news articles into local database (SQLite).
Later user may ask FetchNews to show collected articles (optionally filtered by title substring)
Application is designed with Clean Architecture in mind.
Base things are defined in package news.
Article repository is implemented in package news/articlerepo/sqlite.
News source is implemented in packages news/source/http and news/source/rss.
UI is implemented in package news/ui/telegram.
Main() initializes article repository and starts ui. UI receives user commands and creates news source objects if needed.
(not tested build instructions myself yet)
Provided that:
- you have installed Docker and Go and go dep
- you have telegram bot and token
$ go get github.com/gorilych/fn/
$ cd $GOPATH/src/github.com/gorilych/fn/
$ dep ensure
$ build main.go
$ docker build -t <imagetag> .
For pure docker:
$ docker run --rm -i -t -e "TGBOTTOKEN=<your telegram bot token here>" <imagetag>
For kubernetes, create secret tg-fetchnews-bot with key token according to documentation and create deployment with (you might want to replace image tag in yaml beforehand)
$ kubectl create -f k8s.fetchnewsbot.yaml
Next, connect to your telegram bot. Start with /help command.
/stop command may be fetched next time bot runs.