/place-canada-2023

Primary LanguagePythonMIT LicenseMIT

Reddit r/place Overlay Script for r/placecanada

Installation for builders

  1. Install the Tampermonkey (Chrome) or Violentmonkey (Firefox) browser extensions.
  2. Open the raw source file link and the extension will automatically ask for installation.
  3. Accept it and the next time r/place is loaded you should see a "Toggle Overlay button"
  4. Once the overlay is loaded it may ask you to allow fetching the config over Github. Click "Always allow" when asked.

alt text

Troubleshooting

Tampermonkey being blocked

For anyone else that might be struggling with the template not working, but you are in the correct area. I found an extra step I had to do that was blocking Tampermonkey from working.
Right-click the Tampermonkey extension in the top right of the browser, move down to 'This can read and change site data ->' and make sure that's set to either 'on reddit.com' or to 'on all sites'... mine was set to the top one, 'when you click the extension', and therefore it wasn't working. As soon as I switched it, and refreshed, it was working!

Support

Please each out in the #overlay-help channel of the r/placecanada discord for any issue with the overlay.

For maintainers

Image preparation

  1. See /pictures/canada.provinces.psd to update our current design
  2. Images to add to the overlay must be placed under ./pictures in a 1x scale
  3. Edit target_config.toml with the image name and top left position

Overlay image generation

  1. You will need python version 3.11+ in order to generate the overlay
  2. Move your cli into the generator directory : cd ./generator
  3. Generate a local venv : python3 -m venv ./venv
  4. Activate the venv : source ./venv/bin/activate (Unix) or source ./venv/Scripts/activate/ (Windows)
  5. Install requirement : pip install -r ./requirements.txt
  6. Run the generation script : ./generate.sh
  7. New overlay images should be under ./outputs

Deploy the new overlay

  1. Commit and push the new files in master branch
  2. Test that the overlay updated for you before any anouncement, the cache may take up to 5 minutes to update
  3. Announce the overlay change to and admin or coordinator on r/placecanada discord