Skip to content

A bot for comparing top-level youtube comments and reddit comments.

Notifications You must be signed in to change notification settings

AndresMWeber/youcomment

Repository files navigation

A bot for comparing top-level youtube comments and reddit comments for a reddit post that centers around a youtube link.

CircleCI Codacy Badge Coverage Codacy Badge Grade Python Version Heroku App Status

Github Latest Release Github Last Commit Github Issues Github License PRs Welcome

Table of Contents

  1. Installation
  2. Usage
  3. Developing
  4. Configuration
  5. Meet the Bot
  6. Contributing
  7. File Descriptions
  8. Changelog
  9. License

Installation

Python and Git set up

  1. Clone the Repository:

git clone https://github.com/AndresMWeber/youcomment.git

  1. Create a virtual environment for the bot to run in

python3 -m venv venv --no-site-packages

  1. Activate the virtual env

source venv/bin/activate

  1. Install requirements

pip install -r requirements.txt

Configuration

Set up API Access

Key Description
YC_REDDIT_CLIENT_ID The generated field under "personal use script"
YC_REDDIT_CLIENT_SECRET The generated Secret field.
YC_REDDIT_USER The username to your reddit bot.
YC_REDDIT_PASS The password to your reddit bot.
YC_YOUTUBE_API_KEY The API Key you generated for Youtube.
  • WARNING: without these environment variables set, the program will not function.

Usage

You have the option of running the bot in a few different ways:

Python

from youcomment.bot import YouCompareBot
bot = YouCompareBot()
bot.run()
import youcomment.bot

CLI

$ youcomment

Developing

You can run tests using a couple options while within the top git repo folder:

  • python setup.py test
  • python -m unittest discover

Meet the Bot

My current test subreddit it is active in is here:

https://reddit.com/r/you_comment_bot

Feel free to make a new post if you want to test the bot

Contributing

  • If you want to help please feel free to do it.
  • If you need help please fell free to ask me.
  • If you find any bug or exploit please tell me: I will try to fix them or if you want you can fix them and I will include your changes in the project.
  • If you find a way to improve the bot, please share it with everybody.

File Descriptions


File Description
youcomment/ A module for comparing reddit and youtube top-level comments
youcomment/bot.py The actual bot
youcomment/reddit.py The handler for all reddit api commands
youcomment/youtube.py The handler for all youtube api commands
youcomment/database.py The database manager file
youcomment/config.py The configuration file
youcomment/version.py Contains only the project version number
youcomment/data/template.md The message template
tests/ Tests
.circleci/config.yml CircleCI configuration file

Version History

Changelog

License

MIT License

About

A bot for comparing top-level youtube comments and reddit comments.

Resources

Stars

Watchers

Forks

Packages

No packages published