Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.
/ luogu-painter Public archive

Paints on Luogu paint board efficiently.

License

Notifications You must be signed in to change notification settings

0f-0b/luogu-painter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

luogu-painter(1)

Name

luogu-painter - paint images on Luogu paint board.

Installation

Make sure you have Deno installed, and then run the following in a terminal:

deno install --allow-read --allow-net https://cdn.jsdelivr.net/gh/sjx233/luogu-painter@main/main.ts

Synopsis

luogu-painter [OPTION]... FILE X Y

Description

luogu-painter tries to draw FILE on Luogu paint board at position (X, Y) if provided tokens. FILE should be a 32-bit RGBA PNG image.

Options

  • -s FILE, --tokens=FILE

    Read tokens from FILE, one per line. Empty lines and lines starting with # are ignored.

  • -r, --randomize

    Pick pixels to draw next randomly instead of sequentially.

  • -t NUMBER, --cooldown=NUMBER

    For each token, pause for NUMBER milliseconds after drawing a pixel.

  • -p FILE, --preview=FILE

    Periodically save a preview of how the image would be drawn to FILE.

  • -h, --help

    Display a summary of options and exit.

Examples

Assuming tokens.txt includes the following contents:

# these are the tokens
585e035f4d4487a9f20833691a3afe7df593134d
c41413a2796265824bc43c48f38517efe173e61f

To draw an image at position (800, 400) using the 2 tokens, with the order of pixels randomized, while also generating a preview:

luogu-painter -s tokens.txt -r -p preview.png image.png 800 400

See Also

About

Paints on Luogu paint board efficiently.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published