Code Monkey home page Code Monkey logo

ordinalpunks.server's Introduction

ordpunkd - (Zero-Config) Art Base Server for Ordinal Punks Fam & Frens

ordpunkd - zero-config web server / services; (auto-)downloads & serves pre-configured pixel art collections "out-of-the-box"; incl. 2x/4x/8x zoom for bigger image sizes and more; binaries for easy "xcopy" installation for windows, linux & friends

Download Binaries For Easy "Xcopy" Installation

Find the archives to download - about 3 Megabytes (MB) - for Windows, Linux and Friends at the Releases Page ».

Unpack the archive (e.g. ordpunk-*.tar.gz or ordpunk-*.zip) and than start / run the binary:

$ ordpunkd

This will start-up a (web) server (listening on port 8080). To test open up http://localhost:8080 in your browser (to get the index web page listing all collections).

Build & Run From Source

Use / issue / type (in the /ordinalpunks.server directory):

$ go build ordpunkd.go

to get a zero-config x-copy binary for your operation system / architecture. To run use:

$ ordpunkd

This will start-up a (web) server (listening on port 8080). To test open up http://localhost:8080 in your browser (to get the index web page listing all collections).

Ordinal Punks Fam & Frens - The Server Edition

The ordpunk (web) server will (auto-)download on demand the first-time only pre-configured pixel art collections (using all-in-one image composites) to your working directory and use the "cached" version from the next time on (incl. server restarts).

The ordinal punk fam & frens pixel art collections pre-configured¹ include:

¹: see collections.csv

Bonus: For more see the Ordinal Punks Sandbox »

(Web) Services

To get pixel art images, use /:name/:id[.png|.svg].

Let's try the (default) binary raster graphics format using the portable network graphics (.png) encoding. Example:

/greenbacks/0, /greenbacks/1, /greenbacks/2, (same as /greenbacks/0.png, /greenbacks/1.png, /greenbacks/2.png) ...

or /goldcoins/0, /goldcoins/1, /goldcoins/2, (same as /goldcoins/0.png, /goldcoins/1.png, /goldcoins/2.png) ...

Note / Tip: For now all collections here start ids / numbers with zero (0) NOT one (1). If you are using official punk ids / numbers - starting with one (1) - than subtract one¹ from the id e.g. use 65 for 66, 66 for 67, ..., 0 for 1, 99 for 100 and so on.

¹: Note: Only if the collection here is listed with a count of a hundred (100) and NOT a hundred and one (101).

Let's try the scalable vector graphics (.svg) format in text. Example:

/greenbacks/0.svg, /greenbacks/1.svg, /greenbacks/2.svg, ...

or /goldcoins/0.svg, /goldcoins/1.svg, /goldcoins/2.svg, ...

Note: Pixels get "encoded" as rectangle "shapes" with a width and height of one (1×1). Transparent pixels with the red/green/blue/alpha (rgba) value of (0 or 0/0/0/0) get dropped.

z (zoom) Parameter - 2x, 4x, 8x, 10x, 20x ... (.png only)

Note: The default image size is the default (minimum) pixel size of the collection e.g. 24x24 for punks. Use the z (zoom) parameter to upsize.

Let's try 2x:

/greenbacks/0.png?z=2, /greenbacks/1.png?z=2, /greenbacks/2.png?z=2, ...

or /goldcoins/0.png?z=2, /goldcoins/1.png?z=2, /goldcoins/2.png?z=2, ...

or /polaroids/0.png?z=2, /polaroids/1.png?z=2, /polaroids/2.png?z=2, ...

Let's try 4x:

/sketches/0.png?z=4, /sketches/1.png?z=4, /sketches/2.png?z=4, ...

or /neons/0.png?z=4, /neons/1.png?z=4, /neons/2.png?z=4, ... And so on.

bg (background) Parameter (.png only)

Let's try adding the classic orange background in red/green/blue (rgb) hexcode #ff9900. Use the bg (background) parameter:

/punks/0.png?bg=ff9900, /punks/1.png?bg=ff9900, /punks/2.png?bg=ff9900, ...

silhouette Parameter (.png only)

Let's try a black silhouette. Use the silhouette parameter:

/punks/0.png?silhouette=black, /punks/1.png?silhouette=black, /punk/2.png?silhouette=black, ...

Bonus - Glory to Ukraine! Fuck (Vladimir) Putin! Stop the War! - Send A Stop The War Message To The World With Your Profile Picture

Let's try two-colored with the background in blue and the silhouette (foreground) in yellow:

/punks/0.png?bg=ukraineblue&silhouette=ukraineyellow, /punks/1.png?bg=ukraineblue&silhouette=ukraineyellow, /punks/2.png?bg=ukraineblue&silhouette=ukraineyellow, ...

Let's try the ukraine flag in the background:

/punks/0.png?flag=ukraine, /punks/1.png?flag=ukraine, /punks/2.png?flag=ukraine, ...

Bonus - Philip! Phree the Phunks!

Let's try to flip vertically, that is, mirror, the images - that turns right-looking images into left-looking and vice versa. Use the m (mirror) parameter:

/doggies/0.png?m=t, /doggies/1.png?m=t, /doggies/2.png?m=t, ...

That's it for now.

Questions? Comments?

Post them over at the Help & Support page. Thanks.

ordinalpunks.server's People

Contributors

geraldb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.