Giter VIP home page Giter VIP logo

pydis-pixel's Introduction

PydisPixels Painter

This is the script I'm using to join in on the python discord pixels event!

Setup

Oh look, a very convenient shell script!

curl https://raw.githubusercontent.com/EEKIM10/pydis-pixel/master/install.sh | bash

BEFORE YOU RUN!

You must first get an API token from https://pixels.pythondiscord.com/show_token. Once you've done that, create a file called auth.txt, and paste it in there. It must be in your current working directory.

Looping

(basically, native 24/7 running)

You can specify if the program should loop itself with the command line argument --loop

Note: looping will use the same input values you're asked when you start the program. This is useful for "protecting" one of your drawings.

$ python3 main.py --loop once  # will loop once
$ python3 main.py --loop 2  # will loop two times
$ python3 main.py  # will loop once
$ python3 main.py --loop infinite

Headless running

If you want to run this script without a console to take inputs (e.g. via a crontab or whatever), you can pass command line arguments for every input:

# Setting where the source image is
$ python3 main.py --image /path/to/image  # path can be relative, absolute, or a HTTP[S] URI.

# Controlling cursor boundaries
# -X: The start of the cursor (horizontally, left)
# -Y: The start of the cursor (vertically, top)
# -H: The end of the cursor (horizontally, right)
# -V: The end of the cursor (vertically, bottom)
$ python3 main.py -X 0 -Y 0 -H 240 -V 135

# Painting a 12x16 image called "box.png" (this command won't ask for any input whatsoever):
$ python3 main.py -X 100 -Y 100 -H 112 -V 116 -I $HOME/Downloads/box.png

pydis-pixel's People

Contributors

nexy7574 avatar

Forkers

tymanwastaken

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.