defrank / newsbot

News Slackbot inspired by pybites

Home Page:https://derekmfrank.com/newsbot/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

Requirements

  • Python 3.6+ (not tested on lower versions) with PIP

Optional

  • Docker with Docker Compose

Install

  1. Clone the repository (or fork and clone).
  2. Copy or move secrets.yml.sample to secrets.yml.

Setup Slackbot

  • Required: slackbot.name, slackbot.token
  • Optional: slackbot.id
  1. Create a new bot user
  2. Store the bot's username in secrets.yml as slackbot.name
  3. Store the API Token in secrets.yml as slackbot.token
  4. Note: slackbot.id is optional and will be determined at instantiation of NewsSlackBot

Setup Twitter

  • Required: consumer.key, consumer.secret, access.token, access.token_secret
  1. Create a new Twitter app
  2. Look for Manage the keys and access tokens near the Consumer Key (API Keys) and make sure the Consumer and Access keys are generated.
  3. Store the Consumer Key in secrets.yml as twitter.consumer.key
  4. Store the Consumer Secret in secrets.yml as twitter.consumer.sercet
  5. Store the Access Token in secrets.yml as twitter.access.token
  6. Store the Access Token Secret in secrets.yml as twitter.access.token_secret

Install with Docker

  1. Once you have finished secrets.yml, then we just build the image.

    docker-compose build

Install with virtualenv

Not supported

Vanilla install

  1. Assuming you have Python 3 installed, let's get the environment setup:

    pip3 install -r requirements.txt

Run

  1. Be sure to setup the environment in Install first.

Run with Docker

  1. Launch the container:

    docker-compose up -d

Run with virtualenv

Not supported

Vanilla run

  1. Run in the foreground:

    ./run.sh

    OR background:

    ./run.sh &

About

News Slackbot inspired by pybites

https://derekmfrank.com/newsbot/

License:Mozilla Public License 2.0


Languages

Language:Python 96.0%Language:Makefile 2.7%Language:Shell 1.3%