A service that converts a bunch of RSS feeds into a Telegram channel.
- Uses JSON as a source of RSS feeds (you can put it on GitHub Gist)
- Uses JSON on GitHub Gist as a storage for the state (just for fun C:)
- Publishes posts from those RSS feeds to a Telegram channel
- Create a JSON file with the following structure and put it somewhere:
{
"feeds": [
"https://blog.github.com/all.atom",
"https://github.blog/engineering.atom",
"http://www.reddit.com/r/golang/.rss"
]
}
- If you want your bot to see new RSS feeds without rebuild, make sure your link always points to the latest version of the file (e.g.
https://gist.githubusercontent.com/rozag/dcd1b09bbe12a942dbe0f3bcbb2ace7b/raw/feeds-tech.json
). See instructions for GitHub Gist here
- Create a new private GitHub Gist with the following content:
{}
. Remember the.json
file name and the Gist id (you can find it in the URL) - Create a GitHub token with
gist
scope. Remember the generated token
- Create a Telegram channel. Remember it's id (e.g. @my_channel)
- Ask BotFather to create a new bot for you. Remember your bot token
- Add your new bot to administrators of your new channel
- BTW you can simply run the app with
go run .
- Clone this repo
git clone https://github.com/rozag/rss-tg-chan.git
cd rss-tg-chan
- Put all your ids and tokens to the
config.ini
file like this:
source=LINK_TO_YOUR_SOURCES_JSON
githubToken=YOUR_GITHUB_TOKEN_WITH_GIST_SCOPE
githubGistID=YOUR_STORAGE_JSON_GIST_ID
githubGistFileName=YOUR_STORAGE_JSON_GIST_FILE_NAME
tgToken=YOUR_TELEGRAM_BOT_TOKEN
tgChannel=@YOUR_TELEGRAM_CHANNEL_ID
- Build docker image:
docker build --rm --tag YOUR_IMAGE_NAME:YOUR_IMAGE_TAG .
- Run your container locally
docker run YOUR_IMAGE_NAME:YOUR_IMAGE_TAG
or usedocker save
,scp
anddocker load
to transfer it to some remote host
If you find a bug - create an issue. It's your contribution. And PRs are always welcome.
This project is licensed under the MIT License - see the LICENSE file for details.