cryptopunks 2.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,23 +1,27 @@
1
-
2
-
3
- module Cryptopunks
4
-
5
- MAJOR = 2
6
- MINOR = 0
7
- PATCH = 0
8
- VERSION = [MAJOR,MINOR,PATCH].join('.')
9
-
10
- def self.version
11
- VERSION
12
- end
13
-
14
- def self.banner
15
- "cryptopunks/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] in (#{root})"
16
- end
17
-
18
- def self.root
19
- File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
20
- end
21
-
22
- end # module Cryptopunks
23
-
1
+
2
+
3
+ module Pixelart
4
+ module Module
5
+ module Cryptopunks
6
+
7
+ MAJOR = 3
8
+ MINOR = 0
9
+ PATCH = 0
10
+ VERSION = [MAJOR,MINOR,PATCH].join('.')
11
+
12
+ def self.version
13
+ VERSION
14
+ end
15
+
16
+ def self.banner
17
+ "cryptopunks/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] in (#{root})"
18
+ end
19
+
20
+ def self.root
21
+ File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
22
+ end
23
+
24
+ end # module Cryptopunks
25
+ end # module Module
26
+ end # module Pixelart
27
+
data/lib/cryptopunks.rb CHANGED
@@ -1,109 +1,66 @@
1
- ## 3rd party
2
- require 'pixelart/base'
3
- require 'csvreader'
4
-
5
-
6
-
7
- ## extra stdlibs
8
- require 'digest' ## move/add to pixelart upstream - why? why not?
9
- require 'optparse'
10
- require 'gli' ## used for command line tool
11
-
12
-
13
-
14
- ## our own code
15
- require 'cryptopunks/version' # note: let version always go first
16
-
17
- ## forward define superclass for image
18
- module Cryptopunks
19
- class Image < Pixelart::Image; end
20
- end
21
-
22
-
23
- require 'cryptopunks/attributes'
24
- require 'cryptopunks/structs'
25
- require 'cryptopunks/composite'
26
- ## add old backwards compatible alias
27
-
28
- module Cryptopunks
29
- class Image
30
- Composite = ImageComposite
31
- end
32
- end
33
-
34
-
35
- require 'cryptopunks/dataset'
36
-
37
- require 'cryptopunks/colors'
38
- require 'cryptopunks/image'
39
-
40
- require 'cryptopunks/generator'
41
-
42
- ###
43
- ## add convenience pre-configurated generatored with build-in spritesheet (see config)
44
-
45
- module Cryptopunks
46
-
47
- def self.generator
48
- @generator ||= Generator.new( "#{root}/config/spritesheet.png",
49
- "#{root}/config/spritesheet.csv" )
50
- end
51
-
52
- class Image
53
- def self.generate( *values )
54
- img = Cryptopunks.generator.generate( *values )
55
- ## note: unwrap inner image before passing on to c'tor (requires ChunkyPNG image for now)
56
- new( img.image )
57
- end
58
- end # class Image
59
-
60
-
61
- class Spritesheet
62
- ## note: for now class used for "namespace" only
63
- def self.find_by( name:, gender: nil ) ## return archetype/attribute image by name
64
- # note: pass along name as q (query string)
65
- Cryptopunks.generator.find( name, gender: gender )
66
- end
67
- end # class Spritesheet
68
- ## add convenience (alternate spelling) alias - why? why not?
69
- SpriteSheet = Spritesheet
70
- Sheet = Spritesheet
71
- end # module Cryptopunks
72
-
73
-
74
-
75
- ####
76
- # add CryptoPunksData (off-chain) contract
77
- require 'cryptopunks/contract/punksdata-assets'
78
- require 'cryptopunks/contract/punksdata-meta'
79
- require 'cryptopunks/contract/punksdata-contract'
80
- CryptoPunksData = CryptopunksData
81
- PunksData = CryptopunksData
82
-
83
-
84
-
85
-
86
-
87
- require 'cryptopunks/tool'
88
-
89
- ### add tool convenience helper
90
- module Cryptopunks
91
- def self.main( args=ARGV ) Tool.new.run( args ); end
92
- end ## module Cryptopunks
93
-
94
-
95
-
96
-
97
-
98
- ### add some convenience shortcuts
99
- CryptoPunks = Cryptopunks
100
- Punks = Cryptopunks
101
-
102
-
103
- ###
104
- # note: for convenience auto include Pixelart namespace!!! - why? why not?
105
- include Pixelart
106
-
107
-
108
-
109
- puts Cryptopunks.banner # say hello
1
+ ## 3rd party
2
+ require 'punks'
3
+
4
+
5
+
6
+ ## extra stdlibs
7
+ require 'digest' ## move/add to pixelart upstream - why? why not?
8
+ require 'optparse'
9
+ require 'gli' ## used for command line tool
10
+
11
+
12
+
13
+ ## our own code
14
+ require 'cryptopunks/version' # note: let version always go first
15
+
16
+
17
+ require 'cryptopunks/attributes'
18
+ require 'cryptopunks/structs'
19
+ require 'cryptopunks/composite'
20
+
21
+
22
+ ## add old backwards compatible alias
23
+ module Punk
24
+ class Image
25
+ Composite = ImageComposite
26
+ end
27
+ end
28
+
29
+
30
+
31
+ require 'cryptopunks/dataset'
32
+
33
+ require 'cryptopunks/colors'
34
+ require 'cryptopunks/image'
35
+
36
+
37
+ ####
38
+ # add CryptoPunksData (off-chain) contract
39
+ require 'cryptopunks/contract/punksdata-assets'
40
+ require 'cryptopunks/contract/punksdata-meta'
41
+ require 'cryptopunks/contract/punksdata-contract'
42
+ CryptoPunksData = CryptopunksData
43
+ PunksData = CryptopunksData
44
+
45
+
46
+
47
+
48
+
49
+ require 'cryptopunks/tool'
50
+
51
+ ### add tool convenience helper
52
+ module Punk
53
+ def self.main( args=ARGV ) Tool.new.run( args ); end
54
+ end ## module Punk
55
+
56
+
57
+
58
+
59
+
60
+ ###
61
+ # note: for convenience auto include Pixelart namespace!!! - why? why not?
62
+ include Pixelart
63
+
64
+
65
+
66
+ puts Pixelart::Module::Cryptopunks.banner # say hello
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptopunks
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-15 00:00:00.000000000 Z
11
+ date: 2022-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pixelart
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 1.3.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 1.3.2
27
27
  - !ruby/object:Gem::Dependency
28
- name: csvreader
28
+ name: punks
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 0.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 0.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: gli
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -78,17 +78,17 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '3.22'
81
+ version: '3.23'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '3.22'
89
- description: cryptopunks - mint your own 24×24 pixel punk images off chain from the
90
- True Official Genuine CryptoPunks™ sha256-verified original 10 000 unique character
91
- collection; incl. 2x/4x/8x zoom for bigger sizes
88
+ version: '3.23'
89
+ description: cryptopunks - generate your own 24×24 pixel punk images (off-chain) from
90
+ the Official Genuine Matt & John's® Punks sha256-verified original 10 000 unique
91
+ character collection; incl. 2x/4x/8x zoom for bigger sizes
92
92
  email: wwwmake@googlegroups.com
93
93
  executables:
94
94
  - cryptopunk
@@ -105,8 +105,6 @@ files:
105
105
  - Rakefile
106
106
  - bin/cryptopunk
107
107
  - bin/punk
108
- - config/spritesheet.csv
109
- - config/spritesheet.png
110
108
  - lib/cryptopunks.rb
111
109
  - lib/cryptopunks/attributes.rb
112
110
  - lib/cryptopunks/colors.rb
@@ -115,7 +113,6 @@ files:
115
113
  - lib/cryptopunks/contract/punksdata-contract.rb
116
114
  - lib/cryptopunks/contract/punksdata-meta.rb
117
115
  - lib/cryptopunks/dataset.rb
118
- - lib/cryptopunks/generator.rb
119
116
  - lib/cryptopunks/image.rb
120
117
  - lib/cryptopunks/structs.rb
121
118
  - lib/cryptopunks/tool.rb
@@ -141,10 +138,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
138
  - !ruby/object:Gem::Version
142
139
  version: '0'
143
140
  requirements: []
144
- rubygems_version: 3.1.4
141
+ rubygems_version: 3.3.7
145
142
  signing_key:
146
143
  specification_version: 4
147
- summary: cryptopunks - mint your own 24×24 pixel punk images off chain from the True
148
- Official Genuine CryptoPunks™ sha256-verified original 10 000 unique character collection;
149
- incl. 2x/4x/8x zoom for bigger sizes
144
+ summary: cryptopunks - generate your own 24×24 pixel punk images (off-chain) from
145
+ the Official Genuine Matt & John's® Punks sha256-verified original 10 000 unique
146
+ character collection; incl. 2x/4x/8x zoom for bigger sizes
150
147
  test_files: []
@@ -1,237 +0,0 @@
1
- id, name, gender, type, more_names
2
- 0, Male 1, m, Archetype - Human,
3
- 1, Male 2, m, Archetype - Human,
4
- 2, Male 3, m, Archetype - Human,
5
- 3, Male 4, m, Archetype - Human,
6
- 4, Female 1, f, Archetype - Human,
7
- 5, Female 2, f, Archetype - Human,
8
- 6, Female 3, f, Archetype - Human,
9
- 7, Female 4, f, Archetype - Human,
10
- 8, Zombie, m, Archetype - Zombie,
11
- 9, Zombie Female, f, Archetype - Zombie,
12
- 10, Ape, m, Archetype - Ape,
13
- 11, Ape Female, f, Archetype - Ape,
14
- 12, Alien, m, Archetype - Alien,
15
- 13, Alien Female, f, Archetype - Alien,
16
- 14, Demon, m, Archetype - Demon,
17
- 15, Demon Female, f, Archetype - Demon,
18
- 16, Mummy, m, Archetype - Mummy,
19
- 17, Mummy Female, f, Archetype - Mummy,
20
- 18, Orc, m, Archetype - Orc,
21
- 19, Orc Female, f, Archetype - Orc,
22
- 20, Robot, m, Archetype - Robot,
23
- 21, Robot Female, f, Archetype - Robot,
24
- 22, Skeleton, m, Archetype - Skeleton,
25
- 23, Skeleton Female, f, Archetype - Skeleton,
26
- 24, Vampire, m, Archetype - Vampire,
27
- 25, Vampire Female, f, Archetype - Vampire,
28
- 26, Zombie (Ape), m, Archetype - Zombie,
29
- 27, Alien (Ape), m, Archetype - Alien,
30
- 28, Alien 0°, m, Archetype - Alien,
31
- 29, Alien 30°, m, Archetype - Alien,
32
- 30, Alien 60°, m, Archetype - Alien,
33
- 31, Alien 90°, m, Archetype - Alien,
34
- 32, Alien 120°, m, Archetype - Alien,
35
- 33, Alien 150°, m, Archetype - Alien,
36
- 34, Alien 180°, m, Archetype - Alien,
37
- 35, Alien 210°, m, Archetype - Alien,
38
- 36, Alien 240°, m, Archetype - Alien,
39
- 37, Alien 270°, m, Archetype - Alien,
40
- 38, Alien 300°, m, Archetype - Alien,
41
- 39, Alien 330°, m, Archetype - Alien,
42
- 40, Alien (Ape) 0°, m, Archetype - Alien,
43
- 41, Alien (Ape) 30°, m, Archetype - Alien,
44
- 42, Alien (Ape) 60°, m, Archetype - Alien,
45
- 43, Alien (Ape) 90°, m, Archetype - Alien,
46
- 44, Alien (Ape) 120°, m, Archetype - Alien,
47
- 45, Alien (Ape) 150°, m, Archetype - Alien,
48
- 46, Alien (Ape) 180°, m, Archetype - Alien,
49
- 47, Alien (Ape) 210°, m, Archetype - Alien,
50
- 48, Alien (Ape) 240°, m, Archetype - Alien,
51
- 49, Alien (Ape) 270°, m, Archetype - Alien,
52
- 50, Alien (Ape) 300°, m, Archetype - Alien,
53
- 51, Alien (Ape) 330°, m, Archetype - Alien,
54
- 52, Alien Female 0°, f, Archetype - Alien,
55
- 53, Alien Female 30°, f, Archetype - Alien,
56
- 54, Alien Female 60°, f, Archetype - Alien,
57
- 55, Alien Female 90°, f, Archetype - Alien,
58
- 56, Alien Female 120°, f, Archetype - Alien,
59
- 57, Alien Female 150°, f, Archetype - Alien,
60
- 58, Alien Female 180°, f, Archetype - Alien,
61
- 59, Alien Female 210°, f, Archetype - Alien,
62
- 60, Alien Female 240°, f, Archetype - Alien,
63
- 61, Alien Female 270°, f, Archetype - Alien,
64
- 62, Alien Female 300°, f, Archetype - Alien,
65
- 63, Alien Female 330°, f, Archetype - Alien,
66
- 64, 3D Glasses, m, Attribute,
67
- 65, 3D Glasses, f, Attribute,
68
- 66, Bandana, m, Attribute,
69
- 67, Bandana, f, Attribute,
70
- 68, Beanie, m, Attribute,
71
- 69, Beanie, f, Attribute,
72
- 70, Big Beard, m, Attribute,
73
- 71, Big Shades, m, Attribute,
74
- 72, Big Shades, f, Attribute,
75
- 73, Black Lipstick, f, Attribute,
76
- 74, Blonde Bob, f, Attribute,
77
- 75, Blonde Short, f, Attribute,
78
- 76, Blue Eye Shadow, f, Attribute,
79
- 77, Buck Teeth, m, Attribute,
80
- 78, Cap, m, Attribute,
81
- 79, Cap, f, Attribute,
82
- 80, Cap Forward, m, Attribute,
83
- 81, Cap Forward, f, Attribute,
84
- 82, Chinstrap, m, Attribute,
85
- 83, Choker, f, Attribute,
86
- 84, Cigarette, m, Attribute,
87
- 85, Cigarette, f, Attribute,
88
- 86, Classic Shades, m, Attribute,
89
- 87, Classic Shades, f, Attribute,
90
- 88, Clown Eyes Blue, m, Attribute,
91
- 89, Clown Eyes Blue, f, Attribute,
92
- 90, Clown Eyes Green, m, Attribute,
93
- 91, Clown Eyes Green, f, Attribute,
94
- 92, Clown Hair Green, m, Attribute,
95
- 93, Clown Hair Green, f, Attribute,
96
- 94, Clown Nose, m, Attribute,
97
- 95, Clown Nose, f, Attribute,
98
- 96, Cowboy Hat, m, Attribute,
99
- 97, Cowboy Hat, f, Attribute,
100
- 98, Crazy Hair, m, Attribute,
101
- 99, Crazy Hair, f, Attribute,
102
- 100, Dark Hair, f, Attribute,
103
- 101, Do-rag, m, Attribute,
104
- 102, Do-rag, f, Attribute,
105
- 103, Earring, m, Attribute,
106
- 104, Earring, f, Attribute,
107
- 105, Eye Mask, m, Attribute,
108
- 106, Eye Mask, f, Attribute,
109
- 107, Eye Patch, m, Attribute,
110
- 108, Eye Patch, f, Attribute,
111
- 109, Fedora, m, Attribute,
112
- 110, Fedora, f, Attribute,
113
- 111, Front Beard, m, Attribute,
114
- 112, Front Beard Dark, m, Attribute,
115
- 113, Frown, m, Attribute,
116
- 114, Frumpy Hair, m, Attribute,
117
- 115, Frumpy Hair, f, Attribute,
118
- 116, Green Eye Shadow, f, Attribute,
119
- 117, Goat, m, Attribute,
120
- 118, Gold Chain, m, Attribute,
121
- 119, Gold Chain, f, Attribute,
122
- 120, Half Shaved, f, Attribute,
123
- 121, Handlebars, m, Attribute,
124
- 122, Headband, m, Attribute,
125
- 123, Headband, f, Attribute,
126
- 124, Hoodie, m, Attribute,
127
- 125, Hoodie, f, Attribute,
128
- 126, Horned Rim Glasses, m, Attribute,
129
- 127, Horned Rim Glasses, f, Attribute,
130
- 128, Hot Lipstick, f, Attribute,
131
- 129, Knitted Cap, m, Attribute,
132
- 130, Knitted Cap, f, Attribute,
133
- 131, Luxurious Beard, m, Attribute,
134
- 132, Medical Mask, m, Attribute,
135
- 133, Medical Mask, f, Attribute,
136
- 134, Messy Hair, m, Attribute,
137
- 135, Messy Hair, f, Attribute,
138
- 136, Mohawk, m, Attribute,
139
- 137, Mohawk, f, Attribute,
140
- 138, Mohawk Dark, m, Attribute,
141
- 139, Mohawk Dark, f, Attribute,
142
- 140, Mohawk Thin, m, Attribute,
143
- 141, Mohawk Thin, f, Attribute,
144
- 142, Mole, m, Attribute,
145
- 143, Mole, f, Attribute,
146
- 144, Mustache, m, Attribute,
147
- 145, Muttonchops, m, Attribute,
148
- 146, Nerd Glasses, m, Attribute,
149
- 147, Nerd Glasses, f, Attribute,
150
- 148, Normal Beard, m, Attribute,
151
- 149, Normal Beard Black, m, Attribute,
152
- 150, Orange Side, f, Attribute,
153
- 151, Peak Spike, m, Attribute,
154
- 152, Pigtails, f, Attribute,
155
- 153, Pilot Helmet, f, Attribute,
156
- 154, Pink with Hat, f, Attribute,
157
- 155, Pipe, m, Attribute,
158
- 156, Pipe, f, Attribute,
159
- 157, Police Cap, m, Attribute,
160
- 158, Police Cap, f, Attribute,
161
- 159, Purple Eye Shadow, f, Attribute,
162
- 160, Purple Hair, m, Attribute,
163
- 161, Purple Hair, f, Attribute,
164
- 162, Purple Lipstick, f, Attribute,
165
- 163, Red Mohawk, f, Attribute,
166
- 164, Regular Shades, m, Attribute,
167
- 165, Regular Shades, f, Attribute,
168
- 166, Rosy Cheeks, m, Attribute,
169
- 167, Rosy Cheeks, f, Attribute,
170
- 168, Shadow Beard, m, Attribute,
171
- 169, Shaved Head, m, Attribute,
172
- 170, Shaved Head, f, Attribute,
173
- 171, Silver Chain, m, Attribute,
174
- 172, Silver Chain, f, Attribute,
175
- 173, Small Shades, m, Attribute,
176
- 174, Small Shades, f, Attribute,
177
- 175, Smile, m, Attribute,
178
- 176, Spots, m, Attribute,
179
- 177, Spots, f, Attribute,
180
- 178, Straight Hair, f, Attribute,
181
- 179, Straight Hair Blonde, f, Attribute,
182
- 180, Straight Hair Dark, f, Attribute,
183
- 181, Stringy Hair, m, Attribute,
184
- 182, Stringy Hair, f, Attribute,
185
- 183, Tassle Hat, f, Attribute,
186
- 184, Tiara, f, Attribute,
187
- 185, Top Hat, m, Attribute,
188
- 186, Top Hat, f, Attribute,
189
- 187, Vampire Hair, m, Attribute,
190
- 188, Vape, m, Attribute,
191
- 189, Vape, f, Attribute,
192
- 190, VR, m, Attribute,
193
- 191, VR, f, Attribute,
194
- 192, Welding Goggles, f, Attribute,
195
- 193, Wild Blonde, f, Attribute,
196
- 194, Wild Hair, m, Attribute,
197
- 195, Wild Hair, f, Attribute,
198
- 196, Wild White Hair, f, Attribute,
199
- 197, Bear Hood, m, Attribute,
200
- 198, Bear Hood, f, Attribute,
201
- 199, Birthday Hat, m, Attribute,
202
- 200, Birthday Hat, f, Attribute,
203
- 201, Bow, f, Attribute,
204
- 202, Cigar, m, Attribute,
205
- 203, Cigar, f, Attribute,
206
- 204, Crown, m, Attribute,
207
- 205, Crown, f, Attribute,
208
- 206, Flowers, f, Attribute,
209
- 207, Frog Hood, m, Attribute,
210
- 208, Frog Hood, f, Attribute,
211
- 209, Gold Diamond Necklace, m, Attribute,
212
- 210, Gold Diamond Necklace, f, Attribute,
213
- 211, Heart Shades, m, Attribute,
214
- 212, Heart Shades, f, Attribute,
215
- 213, Jester Hat, m, Attribute,
216
- 214, Jester Hat, f, Attribute,
217
- 215, Laser Eyes, m, Attribute,
218
- 216, Laser Eyes Gold, m, Attribute,
219
- 217, Pink Lipstick, f, Attribute,
220
- 218, Red Lipstick, f, Attribute,
221
- 219, Santa Hat, m, Attribute,
222
- 220, Santa Hat, f, Attribute,
223
- 221, Silver Earring, m, Attribute,
224
- 222, Silver Earring, f, Attribute,
225
- 223, Ski Googles, m, Attribute,
226
- 224, Ski Googles, f, Attribute,
227
- 225, Sombrero, m, Attribute,
228
- 226, Sombrero, f, Attribute,
229
- 227, Sun Hat, m, Attribute,
230
- 228, Sun Hat, f, Attribute,
231
- 229, Superhero Tiara, f, Attribute,
232
- 230, Tears, m, Attribute,
233
- 231, Tears, f, Attribute,
234
- 232, Viking Helmet, m, Attribute,
235
- 233, Viking Helmet, f, Attribute,
236
- 234, Winter Hat, m, Attribute,
237
- 235, Winter Hat, f, Attribute,
Binary file