Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

punkart

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

punkart

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

punk art

punkart gem - (automagically) turn your "classic" punk (pixel) heads into dollar greenbacks, gold/silver/bronze coins, and much more

  • home :: github.com/cryptopunksnotdead/cryptopunks
  • bugs :: github.com/cryptopunksnotdead/cryptopunks/issues
  • gem :: rubygems.org/gems/punkart
  • rdoc :: rubydoc.info/gems/punkart

Usage

Image#greenback (also known as dollar, dollarize)

Let's print dollar greenbacks... brrr...

require 'punkart'

specs = [
  ['Robot Male', 'Big Beard'],
  ['Human Male 2', 'Birthday Hat', 'Bubble Gum'],
  ['Human Female 1', 'Dark Hair', 'Flowers', 'Frown', 'Gold Chain'],
  ['Demon Male',     'Hoodie', 'Pipe'],
  ['Ape Male Blue',  'Bandana', 'Earring'],
  ['Human Male 3',  'Cowboy Hat', 'Smile', 'Laser Eyes'],
]

specs.each_with_index do |attributes, i|
   punk = Punk::Image.generate( *attributes )

   dollar = punk.greenback  ## turn into greenback dollar
   dollar.save( "dollar-#{i+1}.png" )
   dollar.zoom(4).save( "dollar-#{i+1}@4x.png" )
end

Voila!

turns into

4x

Image#goldcoin or silvercoin or bronzecoin

Let's continue and let's mint gold/silver/bronze coins...

specs.each_with_index do |attributes, i|
   punk = Punk::Image.generate( *attributes )

   coin = punk.goldcoin  ## turn into goldcoin
   coin.save( "goldcoin-#{i+1}.png" )
   coin.zoom(4).save( "goldcoin-#{i+1}@4x.png" )

   coin = punk.silvercoin  ## turn into silvercoin
   coin.save( "silvercoin-#{i+1}.png" )
   coin.zoom(4).save( "silvercoin-#{i+1}@4x.png" )

   coin = punk.bronzecoin  ## turn into bronzecoin
   coin.save( "bronzecoin-#{i+1}.png" )
   coin.zoom(4).save( "bronzecoin-#{i+1}@4x.png" )
end

Voila!

4x

That's it.

License

The scripts are dedicated to the public domain. Use it as you please with no restrictions whatsoever.

Questions? Comments?

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

FAQs

Package last updated on 21 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc