Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

amkartashov/fn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FN

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)

Software design

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.

Build and run

(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.

Known issues

/stop command may be fetched next time bot runs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages