Coder Social home page Coder Social logo

raxiam / rplace2022 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from placenl2022/rplace2022

0.0 0.0 0.0 91 KB

Python version of PlaceNL's headless bot with automatic access token refresh

License: MIT License

Python 99.63% Dockerfile 0.37%

rplace2022's Introduction

Reddit /r/place 2022 headless bot

This headless Python bot will automatically login to reddit, obtain access tokens (and refreshes them when they expire), obtain orders from the C&C server and automatically place pixels at the desired locations.

Requirements

  • Python >= 3.8
  • NumPy
  • Matplotlib
  • Rich
  • aiohttp
  • tomli

Installation & updating to a new version

pip install --force git+https://github.com/PlaceNL/rPlace2022.git

Docker image

For people experienced with Docker, there's also a docker image you can run:

docker run -t --pull=always --restart unless-stopped ghcr.io/placenl/placenl-python -u 'USERNAME' 'PASSWORD'

Usage

Linux / macOS

PlaceNL -u 'USERNAME' 'PASSWORD'

The bot supports multiple users:

PlaceNL -u 'USERNAME1' 'PASSWORD1' -u 'USERNAME2' 'PASSWORD2'

IMPORTANT: On macOS/Linux, use single quotes, otherwise your shell might interpret special characters.

Windows

On Windows, docker is probably the easiest way.

  1. Install Docker Desktop.

  2. Docker requires Windows Subsystem for Linux, so install that too.

  3. Docker requires a kernel update for WSL, install from here: https://docs.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package. Only step 4.1 is required.

  4. Open PowerShell and run the above listed Docker command, but use double quotes instead of single quotes (or specify a path to a config file, described below).

    docker run -t --pull=always --restart unless-stopped ghcr.io/placenl/placenl-python -u "USERNAME" "PASSWORD"
  5. It should be up and running! It will also automatically restart in case of a rare crash.

Specifying users in a config file

Besides specifying the username and password combinations on the command line, it's also possible to specify them in a TOML config file. TOML is an INI-like file format, see the config-example.toml for an example.

To specify the path to the config file, add the --from-config flag (shorthand: -c):

PlaceNL --from-config config.toml

If using Docker, you'll need to give the container access to your files, otherwise it won't be able to find your config.toml file. So use cd to navigate to the directory with your config file, and run the following command:

Linux/macOS:

docker run -t --pull=always --restart unless-stopped -v $(pwd):/mnt ghcr.io/placenl/placenl-python -c /mnt/config.toml

Windows (powershell):

docker run -t --pull=always --restart unless-stopped -v ${PWD}:/mnt ghcr.io/placenl/placenl-python -c /mnt/config.toml

rplace2022's People

Contributors

cube707 avatar lrvdijk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.