NGTmeaty / tor

The leader of the show for r/TranscribersOfReddit!

Home Page:https://reddit.com/r/transcribersofreddit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Travis build status BugSnag

Transcribers of Reddit

This is the source code for the bot moderating and managing several parts of the subreddit /r/TranscribersOfReddit ("ToR"), a community dedicated to transcribing images, audio, and video. It acts under the username "/u/TranscribersOfReddit".

Among other things, this bot handles:

  • Posting transcription requests to /r/TranscribersOfReddit as relevant content shows up on partner subreddits
  • Responding to transcribers claiming and marking requests as complete
  • Augmenting the score of a transcriber upon successful completion of a transcription

Requirements

  • Redis (tracking completed posts and queue system)
  • Reddit API keys

NOTE:

This code is not complete. The praw.ini file is required to run the bots and contains such information as the useragents and various secrets. It is built for Python 3.6.

Installation

From release

Given a release in https://github.com/GrafeasGroup/tor/releases, download the attached .tar.gz file for your platform/architecture and pip install it directly like so:

$ pip install ./path/to/tor-3.6.1-linux-x86_64.tar.gz

From source

Make sure you have an up-to-date copy of pip installed and Python 3.6.

$ git clone https://github.com/GrafeasGroup/tor.git tor
$ cd tor/
$ pip install .

Big Picture

Triggered flow (via bot inbox):

  • If username mention in a comment:
    • Grab id of mentioned post's parent
    • Make new post on ToR
  • If reply to comment (e.g., claim or done):
    • claim - Assigns transcription ownership of the post to the user who first commented this way
    • done - Checks for transcription and adjusts flair according to reward system

Monitoring daemon (via subreddit's /new feed):

  • For each subreddit that has opted in:
    • Search for audio, video, and image content:
      • Check against whitelist of domain filters
      • Post url to the content back to /r/TranscribersOfReddit

Build

To build the package from source, start in the base of the repository and run:

$ python setup.py bdist --format=gztar

When building is complete, upload everything in the dist/ directory that was just created as part of the GitHub release.

Usage

$ tor-moderator
# => [daemon mode + logging]

Contributing

See CONTRIBUTING.md for more.

About

The leader of the show for r/TranscribersOfReddit!

https://reddit.com/r/transcribersofreddit

License:MIT License


Languages

Language:Python 100.0%