Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Hosting Requirements

Joe Kaufeld edited this page Jul 3, 2017 · 2 revisions

Hosting Requirements

OS

The bots assume they are running under Ubuntu Server (or some variant thereof) with Python 3.4+. The end goal is to move to Python 3.6 to take advantage of f-strings and some performance boosts, but right now we are limited by what we have available in our production environment.

Required software

  • Redis (latest)
  • Tesseract >= 3.04

Tesseract must be compiled from source as the Ubuntu packages are too old for the python integration. This is not a tremendously painful process, but it still must be done.

Schema

The Redis schema is self-building, but is outlined here:

  • post_ids: when a post is found on a partner subreddit, the ID is checked against this set. If it's not in the set, we haven't worked on it yet. If it is in the set, we skip the post.
  • complete_post_ids: if a post is started, it gets placed in post_ids, but when we post it on r/ToR we add the id here too. This allows us to detect if something failed during the process of posting, which allows us to retry.
  • accepted_CoC: a set of all usernames who have accepted the Code of Conduct. This is used to verify who needs to be presented with the CoC or not.
  • total_completed: an incrementing integer that ticks up when a volunteer-completed post is verified.
  • total_posted: an incrementing integer that ticks up when a new piece of content is posted back to u/ToR for working on.
  • ocr_ids is a set of images that need to be passed to u/transcribot. Each value in the set looks like this: ocr::{id}. When a value is added to the set, a similar key/value pair is added where ocr::{id} is the key and the value is the post ID of the post that u/ToR made while reposting said content. That way, u/transcribot knows a) where the original content is and b) where to post the attempted transcription so that volunteers can use it if they want to.

Credentials

Credentials are generated by following this document: http://praw.readthedocs.io/en/latest/getting_started/configuration/prawini.html#defining-additional-sites

Clone this wiki locally