seanlobo / automemer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AutoMemer

A bot to deliver a constant stream of memes to your slack group of choice. It uses Python3.6+, as well as Praw to query user defined subreddits and the Slack Python API to post messages. It can be customized with respect to subreddits scraped, scrape interval, post (to slack) interval, subreddit upvote thresholds and more.

Setup

Slack

  1. Follow this guide to setup a bot for your workspace. You'll want to connect to the Real Time Messaging (RTM) API

  2. Run print_bot_id.py to determine the ID of your bot (change the name from automemer to whatever the name of the bot is)

  3. Fill out ids.sh with the relevant information and run source ids.sh

Reddit

  1. Create a reddit application by following this guide

  2. Add the client secret and id to a praw.ini file as shown here

  3. Modify the Reddit instance in scrape_reddit.py as needed.

Running

  1. run pip install requirements.txt, in a virtualenv if desired

  2. Run python3 setup.py to setup the db and directory structure

  3. Run python3 slackbot.py to begin the bot

About

License:MIT License


Languages

Language:Python 99.8%Language:Shell 0.2%