A bot for comparing top-level youtube comments and reddit comments for a reddit post that centers around a youtube link.
- Installation
- Usage
- Developing
- Configuration
- Meet the Bot
- Contributing
- File Descriptions
- Changelog
- License
- Clone the Repository:
git clone
https://github.com/AndresMWeber/youcomment.git
- Create a virtual environment for the bot to run in
python3 -m venv venv --no-site-packages
- Activate the virtual env
source venv/bin/activate
- Install requirements
pip install -r requirements.txt
- Create a Reddit App as script
- Obtain a Youtube API Key: (tutorial)
- Set the following environment variables on | mac | windows | linux |:
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.
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
You can run tests using a couple options while within the top git repo folder:
python setup.py test
python -m unittest discover
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
- 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 | 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 |