-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathwallstreetbets.rb
77 lines (56 loc) · 1.6 KB
/
wallstreetbets.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
###########
# to run use:
# ruby ./wallstreetbets.rb
require 'cryptopunks'
## lets try 4 original (+ humans in all four skin tones)
## and 4 more designs (punk archetypes)
names = [
'human-male_4', ## formerly skin tone lighter
'human-male_3', ## - " - light
'human-male_2', ## - " - dark
'human-male_1', ## - " - darker
'zombie-male',
'ape-male',
'alien-male',
'demon-male',
'vampire-male',
'orc-male',
'skeleton-male',
]
names.each do |name|
punk = Punks::Sheet.find_by( name: name )
punk.save( "./i/design-#{name}.png" )
punk.zoom(4).save( "./i/design-#{name}@4x.png" )
end
hair = Image.parse( <<TXT, colors: ['000000', 'E8BC0D'] )
. . . . @ @ @ @ @ @ @ @ @ @
. . . . x x x x x x x x x @
. . . @ @ @ @ @ @ @ @ @ x @
. . x x x x x x x x x @ x @
. @ @ @ @ @ @ @ @ @ x @ x @
. x x x x x x x x @ x @ x @
. @ @ @ @ @ . . . . . . x @
x x x x x . . . . . . . . .
@ @ @ @ . . . . . . . . . .
. x x . . . . . . . . . . .
. @ @ . . . . . . . . . . .
TXT
puts " hair (#{hair.width}x#{hair.height})"
hair.save( './i/hair.png' )
hair.zoom(4).save( './i/[email protected]' )
shades = Image.parse( <<TXT, colors: ['000000'] )
@ @ @ @ @ @ @ @ @ @ @ @
. . @ @ @ @ . . @ @ @ @
. . . @ @ . . . . @ @ .
TXT
puts " shades (#{shades.width}x#{shades.height})"
shades.save( './i/shades.png' )
shades.zoom(4).save( './i/[email protected]' )
names.each do |name|
punk = Punks::Sheet.find_by( name: name )
punk.compose!( hair, 3, 2 )
punk.compose!( shades, 6, 11 )
punk.save( "./i/wallstreetbets-#{name}.png" )
punk.zoom(4).save( "./i/wallstreetbets-#{name}@4x.png" )
end
puts "bye"