Telegram bot that publishes the latest articles from our blog to our Telegram channel. If you have a blog with a json1 feed and want to send the posts automatically to a telegram channel you can use this bot.
- Telegram variables
TELEGRAM_CHANNEL
: your telegram channel @channelTELEGRAM_TOKEN
: your telegram bot token, you can see this post
- Twitter variables
TWITTER_CONSUMER_KEY
: your twitter consumer keyTWITTER_CONSUMER_SECRET
: your twitter consumer secretTWITTER_ACCESS_TOKEN
: your twitter access tokenTWITTER_ACCESS_TOKEN_SECRET
: your twitter access token secret
- Application variables
RSS_FEED
: URL of the JSON feed of your blog. Examplehttps://api.binary-coffee.dev/posts/feed/json1
REFRESH_TIME
: interval of time to check for new items. Default60
DATA_ADAPTER
: type of adapter used to save the data. ExampleMemoryAdapter
|JsonAdapter
|MongodbAdapter
DATA_PATH
: (JsonAdapter) in case of use JsonAdapter, you can decide where to save the file. Default./data
.DATABASE_HOST
: (MongodbAdapter) host for your mongodb database. Defaultlocalhost
DATABASE_PORT
: (MongodbAdapter) port for your mongodb database. Default27017
DATABASE_NAME
: (MongodbAdapter) database name. defaultbc_db
- Clone the repo:
git clone https://github.com/dcs-community/binarycoffee_bot.git
- Create environment:
virtualenv -p python3 env
- Activate environment:
source env/bin/activate
- Set environment variables
- Install packages:
pip install -r requirements.txt
- Finally, run
python bot.py
See this post for help.
- Clone the repo:
git clone https://github.com/dcs-community/binarycoffee_bot.git
- Set environment variables
- Start docker-compose:
docker-compose up -d
Any contribution is welcome.
Check our LICENCE.md file.