Skip to main content

Automate posting and hosting of rounds on /r/picturegame

Project description

Botterino

Botterino allows automation of hosting and posting of /r/picturegame coordinates rounds

When running botterino, if you win a round, your round will automatically be posted. It will reply with 'x' or '+correct' to any comments on your round automatically, with configurable tolerances.


Pre-requisites

  1. All the files you interact with will live in the botterino-config folder which is located:
    1. windows: C:\Users\your username\botterino-config
    2. mac: /Users/<your username/botterino-config
    3. linux: ~/botterino-config These files are created for you the first time you run the bot
  2. You must have Python installed on your computer
    1. If on windows it is best to install python from the microsoft store
  3. Install the bot
    1. open a terminal or command prompt window and type the following command: pip install botterino
  4. You must create a Reddit app and add authentication details in botterino-config/praw.ini; see sample-praw.ini (on github) for an example
    1. Give app any name you choose, such as 'botterino'
    2. Choose 'script' as app type
    3. Fill in 'redirect URI' with http://localhost:8080 (This is irrelevant unless OAuth2 is used,but it's a required field)
    4. Once created, you'll have a 'secret', copy/paste that as client_secret in botterino-config/praw.ini
    5. You'll also have a less obvious client id, in the top left under the app name and the words 'personal use script' - copy/paste that into client_id in praw.ini
  5. Fill out the rest of 'botterino-config/praw.ini' with your Reddit username/password as well as anything you want for user_agent

Usage

  • add round(s) in botterino-config/rounds/rounds.yaml. See sample-rounds.yaml on botterino github page for information on round syntax
  • run with python -m botterino

Normal hosting

Rounds are kept in the 'rounds/rounds.yaml' file, see 'sample.yaml' for some examples

Steps

  1. Add round(s) to 'botterino-config/rounds/rounds.yaml'
  2. Open a terminal or command prompt and type python -m botterino
    1. Then all you have to do is win. Until you win, botterino will do nothing
    2. When you win, the top round in rounds.yaml is posted as soon as you are approved to host

Any new rounds added to 'botterino-config/rounds/rounds.yaml' while the app is running will automatically be added to the queue, no need to restart. Once a round is complete, it will be moved to 'botterino-config/rounds/archive.yaml'.

Live rounds

Botterino can be used on a round that is already live

This is useful for cases where

  1. You post manually and decide you would like bot to host
  2. Bot posts for you but crashes during hosting for some reason

Steps

  1. Will use the top round in rounds.yaml
    1. url field should be omitted
  2. Run with python -m botterino.failure

Hints:

Botterino can schedule hints and post them autmoatically. If the file botterino-config/hints.txt contains content, its content will be posted to the currently hosted round as a hint at the time specified by the user, and then the file is cleared. Default hint times can be specified in botterino-config/config.ini. The default value is hints=[25,45]. The default hint list can be overridden per round by adding the field hints: [10, 20,30] as a new field in rounds.yaml. Hint times are in minutes and are integers. Hints at hour boundaries do not need to be specified. If the hint file contains text it will be posted automatically at 60,120,180 etc...


Misc

Customize

Options such as correct message and incorrect message can be customized in botterino-config/config.ini

Update

Update this botterino with pip install --upgrade botterino

Issues

  • Bot does not run, crash message shows 403 error, everything in praw.ini looks correct
    1. try a different user agent

Colors on windows

This botterino uses colorful output. If you see strange output like this on windows Strange windows output then download Windows terminal from the Microsoft store.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

botterino-0.3.5.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

botterino-0.3.5-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file botterino-0.3.5.tar.gz.

File metadata

  • Download URL: botterino-0.3.5.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.7

File hashes

Hashes for botterino-0.3.5.tar.gz
Algorithm Hash digest
SHA256 a97efb60eeed2b187ee0f2253950b1fedfb33571dd43cda9568309ff22221c36
MD5 0c50816160f4c4c48c28dcf9552e0354
BLAKE2b-256 40e1bfb735e259f95d0f1f3be8a6a049f176eeb88a509b2a40077cd0f94cc5c6

See more details on using hashes here.

File details

Details for the file botterino-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: botterino-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.7

File hashes

Hashes for botterino-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d39bfc4dcc7e6d390bb69524062f78844eec7820e000151eb63f7f7afc2c81c7
MD5 0b0758fbbdc5c60b540c949d9da05e8d
BLAKE2b-256 83e4fbda5323751a98456ce072fd8db4b40598796f8008966db46824f791401f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page