Script for /u/timestamp_bot
Switch branches/tags
Nothing to show
Clone or download
Latest commit 45a5a8b Aug 27, 2017
Permalink
Failed to load latest commit information.
.gitignore improve parsing Mar 26, 2017
Readme.md readme Aug 23, 2017
cron.log improve from suggestion Apr 1, 2017
main.py add minor check Aug 27, 2017
requirements.txt improve from suggestion Apr 1, 2017
sample-config.ini delete malformed comments Aug 23, 2017

Readme.md

About

Reddit bot that parses rising posts with parent comments as youtube url & child replies as timestamps to create grand child comments of timestamped youtube url link.

Ran as a cron job every 1 hour.

Steps to Run (on linux server)

  1. cp sample-config.ini config.ini & configure your bot.
  2. which python & replace shebang line#1 of main.py with the python path. [Python3 recommended]
  3. pip install -r requirements.txt to install python dependencies.
  4. crontab -e & add main.py as cronjob at the end of file with following format:

0 * * * * cd <absolute-path-to-repo>;<absolute-path-to-main.py> >> <aboluste-path-to-cron.log> 2>&1

Example: 0 * * * * cd /var/www/timestamp_bot;/var/www/timestamp_bot/main.py >> /var/www/timestamp_bot/cron.log 2>&1

Debugging

  1. cat /var/log/syslog | grep cron to check if cron job is running fine.
  2. cat cron.log to check for errors from bot/reddit server.
  3. cat timestamp_bot_log.log to check bot process/logs.

Issues/Suggestions

Report all issues/suggestions at issue page.