binary-coffee-dev / binarycoffee_bot

Bot that publishes the latest articles to the Telegram channel.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Binary Coffee Bot

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.

Setup project

Environment variables

  • CHANNEL: your channel user @channel
  • TOKEN: your bot token, you can see this post
  • RSS_FEED: URL of the JSON feed of your blog. example https://api.binary-coffee.dev/posts/feed/json1
  • REFRESH_TIME: interval of time to check for new items. default 60
  • DATA_ADAPTER: type of adapter used to save the data. example MemoryAdapter|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. default localhost
  • DATABASE_PORT: (MongodbAdapter) port for your mongodb database. default 27017
  • DATABASE_NAME: (MongodbAdapter) database name. default bc_db

Steps to start the bot

  1. Clone the repo: git clone https://github.com/dcs-community/binarycoffee_bot.git
  2. Create environment: virtualenv -p python3 env
  3. Activate environment: source env/bin/activate
  4. Set environment variables
  5. Install packages: pip install -r requirements.txt
  6. Finally, run python bot.py

Deploy in Heroku

See this post for help.

Setup with docker

  1. Clone the repo: git clone https://github.com/dcs-community/binarycoffee_bot.git
  2. Set environment variables
  3. Start docker-compose: docker-compose up -d

Contribution

Any contribution is welcome.

License

Check our LICENCE.md file.

About

Bot that publishes the latest articles to the Telegram channel.

License:MIT License


Languages

Language:Python 94.7%Language:Dockerfile 4.0%Language:Shell 1.0%Language:Procfile 0.2%