originals 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Manifest.txt +3 -0
- data/README.md +236 -2
- data/Rakefile +1 -0
- data/bin/fab +17 -0
- data/bin/fabricate +17 -0
- data/lib/originals/tool.rb +74 -0
- data/lib/originals/version.rb +2 -2
- data/lib/originals.rb +158 -0
- metadata +22 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3867e1b818cebd7b9c563808bff7318af27fd681cefde7d52ed39af67ff43ff
|
4
|
+
data.tar.gz: e70ff427357f892df830dc343398c34db7640f57eede9951aaf4c8f6bfefc798
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f34ca1a5baa49c374bb4022d8d2c83ee8e2ea78543bca1c050f1fb9252804fed021983427310de65b9dff288a1824aec8ed985f6c4ccaaa6ade0bcda687a2ce
|
7
|
+
data.tar.gz: 1be3dd507e1b33b36f1b7b597892f1cd9638038aeeb8a5af69247ae3156a6cf1fef3467b560f4ad8ca1e853001052cbd186b5dfc1ff43358e0478ec7443e5739
|
data/Manifest.txt
CHANGED
data/README.md
CHANGED
@@ -1,18 +1,252 @@
|
|
1
|
-
# Factory of Modern Originals (FOMO)
|
1
|
+
# Factory of Modern Originals (FOMO)
|
2
2
|
|
3
|
-
|
3
|
+
originals - do-it-yourself (DIY) - yes, you can! - fab(criate) your own unique (pixel) artworks w/ text attributes (via built-in spritesheets) incl. 2x/4x/8x zoom for bigger sizes and more
|
4
4
|
|
5
5
|
|
6
|
+
* home :: [github.com/pixelartexchange/originals](https://github.com/pixelartexchange/originals)
|
7
|
+
* bugs :: [github.com/pixelartexchange/originals/issues](https://github.com/pixelartexchange/originals/issues)
|
8
|
+
* gem :: [rubygems.org/gems/originals](https://rubygems.org/gems/originals)
|
9
|
+
* rdoc :: [rubydoc.info/gems/originals](http://rubydoc.info/gems/originals)
|
6
10
|
|
7
11
|
|
8
12
|
|
9
13
|
|
14
|
+
## Command-Line Usage
|
10
15
|
|
11
16
|
|
17
|
+
Use the `fab` (or `fabricate`) command line tool. Try:
|
12
18
|
|
19
|
+
```
|
20
|
+
$ fab -h
|
21
|
+
```
|
13
22
|
|
23
|
+
resulting in:
|
14
24
|
|
25
|
+
```
|
26
|
+
Usage: fab [options] name [attribute] ...
|
27
|
+
-z, --zoom NUM Zoom factor x2, x4, x8, etc. (default: 1)
|
28
|
+
-b, --background, --bg STRING Background (default: transparent)
|
29
|
+
-i, --id NUM Unique identifier (default: none)
|
15
30
|
|
31
|
+
-h, --help Prints this help
|
32
|
+
```
|
16
33
|
|
17
34
|
|
18
35
|
|
36
|
+
### Punks (24x24)
|
37
|
+
|
38
|
+
_Fabricate punk character pixel art originals from text attributes (from scratch / zero) via builtin spritesheet_
|
39
|
+
|
40
|
+
|
41
|
+
Let's try:
|
42
|
+
|
43
|
+
```
|
44
|
+
$ fab punk alien headband
|
45
|
+
```
|
46
|
+
|
47
|
+
resulting in:
|
48
|
+
|
49
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk0.png)
|
50
|
+
|
51
|
+
Let's try the `-z/--zoom` factor 2x, 4x, 8x, etc.:
|
52
|
+
|
53
|
+
```
|
54
|
+
$ fab --zoom=4 punk alien headband
|
55
|
+
# -or-
|
56
|
+
$ fab -z4 punk alien headband
|
57
|
+
```
|
58
|
+
|
59
|
+
resulting in:
|
60
|
+
|
61
|
+
4x ![](https://github.com/pixelartexchange/originals/raw/master/i/punk0@4x.png)
|
62
|
+
|
63
|
+
|
64
|
+
Let's try some more:
|
65
|
+
|
66
|
+
```
|
67
|
+
$ fab punk male3 peak_spike goat horned_rim_glasses
|
68
|
+
$ fab punk demon heart_shades
|
69
|
+
```
|
70
|
+
|
71
|
+
resulting in:
|
72
|
+
|
73
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk1.png)
|
74
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk2.png)
|
75
|
+
|
76
|
+
4x (using the `--zoom=4`/`-z4` option)
|
77
|
+
|
78
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk1@4x.png)
|
79
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk2@4x.png)
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
Let's try the `-b/--background` option with two solid colors
|
84
|
+
(e.g. `#638596` and `#ffbf00`) and with the built-in ukraine and pride (rainbow) flag:
|
85
|
+
|
86
|
+
|
87
|
+
```
|
88
|
+
$ fab --background=638596 punk male3 peak_spike goat horned_rim_glasses
|
89
|
+
# -or-
|
90
|
+
$ fab -b638596 punk male3 peak_spike goat horned_rim_glasses
|
91
|
+
|
92
|
+
$ fab --background=ffbf00 punk male3 peak_spike goat horned_rim_glasses
|
93
|
+
$ fab --background=ukraine punk male3 peak_spike goat horned_rim_glasses
|
94
|
+
$ fab --background=pride punk male3 peak_spike goat horned_rim_glasses
|
95
|
+
```
|
96
|
+
|
97
|
+
resulting in:
|
98
|
+
|
99
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk1.1.png)
|
100
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk1.2.png)
|
101
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk1.3.png)
|
102
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk1.4.png)
|
103
|
+
|
104
|
+
4x (using the `--zoom=4`/`-z4` option)
|
105
|
+
|
106
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk1.1@4x.png)
|
107
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk1.2@4x.png)
|
108
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk1.3@4x.png)
|
109
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/punk1.4@4x.png)
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
### Phunks (24x24)
|
114
|
+
|
115
|
+
Let's try some left-looking punks also known as Phunks - "hand-phlipped" by Philip the Intern
|
116
|
+
|
117
|
+
```
|
118
|
+
$ fab phunk male2 spots hoodie
|
119
|
+
```
|
120
|
+
|
121
|
+
resulting in:
|
122
|
+
|
123
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/phunk0.png)
|
124
|
+
|
125
|
+
4x (using the `--zoom=4`/`-z4` option)
|
126
|
+
|
127
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/phunk0@4x.png)
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
### Philips (24x24)
|
132
|
+
|
133
|
+
Let's try some left-looking philips (pre-configured phunk
|
134
|
+
with the built-in attributes: Male 3):
|
135
|
+
|
136
|
+
```
|
137
|
+
$ fab philip
|
138
|
+
$ fab philip jester_hat smile
|
139
|
+
```
|
140
|
+
|
141
|
+
resulting in:
|
142
|
+
|
143
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/philip0.png)
|
144
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/philip1.png)
|
145
|
+
|
146
|
+
4x (using the `--zoom=4`/`-z4` option)
|
147
|
+
|
148
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/philip0@4x.png)
|
149
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/philip1@4x.png)
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
### Marilyns (24x24)
|
154
|
+
|
155
|
+
Let's try some left-looking marilyns (pre-configured phunk
|
156
|
+
with the built-in attributes: Female 3, Wild Blonde, Mole, Blue Eye Shadow):
|
157
|
+
|
158
|
+
```
|
159
|
+
$ fab marilyn
|
160
|
+
$ fab marilyn 3d_glasses
|
161
|
+
$ fab marilyn flowers earring smile
|
162
|
+
$ fab marilyn hot_lipstick big_shades
|
163
|
+
|
164
|
+
# or with some backgrounds
|
165
|
+
$ fab --background=638596 marilyn hot_lipstick big_shades
|
166
|
+
$ fab --background=ffbf00 marilyn hot_lipstick big_shades
|
167
|
+
$ fab --background=ukraine marilyn hot_lipstick big_shades
|
168
|
+
$ fab --background=pride marilyn hot_lipstick big_shades
|
169
|
+
```
|
170
|
+
|
171
|
+
resulting in:
|
172
|
+
|
173
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn0.png)
|
174
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn1.png)
|
175
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn3.png)
|
176
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn2.png)
|
177
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn2.1.png)
|
178
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn2.2.png)
|
179
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn2.3.png)
|
180
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn2.4.png)
|
181
|
+
|
182
|
+
4x (using the `--zoom=4`/`-z4` option)
|
183
|
+
|
184
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn0@4x.png)
|
185
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn1@4x.png)
|
186
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn3@4x.png)
|
187
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn2.1@4x.png)
|
188
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn2.2@4x.png)
|
189
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn2.3@4x.png)
|
190
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/marilyn2.4@4x.png)
|
191
|
+
|
192
|
+
|
193
|
+
### Shiba Inu Doge (24x24)
|
194
|
+
|
195
|
+
|
196
|
+
Let's try some shiba inu doge - much wow:
|
197
|
+
|
198
|
+
|
199
|
+
```
|
200
|
+
$ fab doge alien headband
|
201
|
+
$ fab doge dark tiara big_shades
|
202
|
+
|
203
|
+
# -or- with some backgrounds
|
204
|
+
$ fab --background=638596 doge dark tiara big_shades
|
205
|
+
$ fab --background=ffbf00 doge dark tiara big_shades
|
206
|
+
$ fab --background=ukraine doge dark tiara big_shades
|
207
|
+
$ fab --background=pride doge dark tiara big_shades
|
208
|
+
```
|
209
|
+
|
210
|
+
resulting in:
|
211
|
+
|
212
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/doge0.png)
|
213
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/doge1.png)
|
214
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/doge1.1.png)
|
215
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/doge1.2.png)
|
216
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/doge1.3.png)
|
217
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/doge1.4.png)
|
218
|
+
|
219
|
+
4x (using the `--zoom=4`/`-z4` option)
|
220
|
+
|
221
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/doge0@4x.png)
|
222
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/doge1@4x.png)
|
223
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/doge1.1@4x.png)
|
224
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/doge1.2@4x.png)
|
225
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/doge1.3@4x.png)
|
226
|
+
![](https://github.com/pixelartexchange/originals/raw/master/i/doge1.4@4x.png)
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
And so on. Stay tuned for more original artwork series!
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
## Install
|
236
|
+
|
237
|
+
Just install the gem:
|
238
|
+
|
239
|
+
$ gem install originals
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
## License
|
244
|
+
|
245
|
+
The scripts are dedicated to the public domain.
|
246
|
+
Use it as you please with no restrictions whatsoever.
|
247
|
+
|
248
|
+
|
249
|
+
## Questions? Comments?
|
250
|
+
|
251
|
+
Post them on the [CryptoPunksDev reddit](https://old.reddit.com/r/CryptoPunksDev). Thanks.
|
252
|
+
|
data/Rakefile
CHANGED
data/bin/fab
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
###################
|
4
|
+
# == DEV TIPS:
|
5
|
+
#
|
6
|
+
# For local testing run like:
|
7
|
+
#
|
8
|
+
# ruby -Ilib bin/fab
|
9
|
+
#
|
10
|
+
# Set the executable bit in Linux. Example:
|
11
|
+
#
|
12
|
+
# % chmod a+x bin/fab
|
13
|
+
#
|
14
|
+
|
15
|
+
require 'originals'
|
16
|
+
|
17
|
+
Originals::Tool.main
|
data/bin/fabricate
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
###################
|
4
|
+
# == DEV TIPS:
|
5
|
+
#
|
6
|
+
# For local testing run like:
|
7
|
+
#
|
8
|
+
# ruby -Ilib bin/fabricate
|
9
|
+
#
|
10
|
+
# Set the executable bit in Linux. Example:
|
11
|
+
#
|
12
|
+
# % chmod a+x bin/fabricate
|
13
|
+
#
|
14
|
+
|
15
|
+
require 'originals'
|
16
|
+
|
17
|
+
Originals::Tool.main
|
@@ -0,0 +1,74 @@
|
|
1
|
+
module Originals
|
2
|
+
class Tool
|
3
|
+
|
4
|
+
def self.main( args=ARGV )
|
5
|
+
puts "==> welcome to the fab(ricate) tool with args:"
|
6
|
+
pp args
|
7
|
+
|
8
|
+
options = { }
|
9
|
+
parser = OptionParser.new do |opts|
|
10
|
+
|
11
|
+
opts.on("--zoom NUM", "-z", Integer,
|
12
|
+
"Zoom factor x2, x4, x8, etc. (default: 1)") do |num|
|
13
|
+
options[ :zoom] = num
|
14
|
+
end
|
15
|
+
|
16
|
+
opts.on("--background STRING", "--bg STRING", "-b", String,
|
17
|
+
"Background (default: transparent)") do |str|
|
18
|
+
options[ :background] = str
|
19
|
+
end
|
20
|
+
|
21
|
+
opts.on("--id NUM", "-i", Integer,
|
22
|
+
"Unique identifier (default: none)") do |str|
|
23
|
+
options[ :id] = str
|
24
|
+
end
|
25
|
+
|
26
|
+
opts.on("-h", "--help", "Prints this help") do
|
27
|
+
puts opts
|
28
|
+
exit
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
parser.parse!( args )
|
33
|
+
puts "options:"
|
34
|
+
pp options
|
35
|
+
|
36
|
+
puts "args:"
|
37
|
+
pp args
|
38
|
+
|
39
|
+
if args.size < 1
|
40
|
+
puts "!! ERROR - no art series name found - use <name> <attribute>..."
|
41
|
+
puts ""
|
42
|
+
exit
|
43
|
+
end
|
44
|
+
|
45
|
+
name = args[0] ## todo/check - use collection_name/slug or such?
|
46
|
+
attributes = args[1..-1]
|
47
|
+
|
48
|
+
## normalize name of series
|
49
|
+
## e.g. Shiba Inu => shibainu etc.
|
50
|
+
key = name.downcase.gsub( '[ ()_-]', '' )
|
51
|
+
|
52
|
+
img = Original::Image.fabricate( key, *attributes,
|
53
|
+
background: options[ :background] )
|
54
|
+
|
55
|
+
|
56
|
+
basename = "#{key}#{options[:id]}"
|
57
|
+
|
58
|
+
path = if options[:zoom]
|
59
|
+
img = img.zoom( options[:zoom] )
|
60
|
+
"./#{basename}@#{options[:zoom]}x.png"
|
61
|
+
else
|
62
|
+
"./#{basename}.png"
|
63
|
+
end
|
64
|
+
|
65
|
+
puts " saving original #{name} (#{img.width}x#{img.height}) to >#{path}<..."
|
66
|
+
img.save( path )
|
67
|
+
|
68
|
+
puts "bye"
|
69
|
+
end
|
70
|
+
end # class Tool
|
71
|
+
|
72
|
+
end # module Originals
|
73
|
+
|
74
|
+
|
data/lib/originals/version.rb
CHANGED
data/lib/originals.rb
CHANGED
@@ -1,8 +1,166 @@
|
|
1
1
|
## 3rd party libs
|
2
|
+
require 'cryptopunks'
|
3
|
+
require 'shibainus'
|
4
|
+
|
5
|
+
|
2
6
|
|
3
7
|
## our own code
|
4
8
|
require 'originals/version' # note: let version always go first
|
5
9
|
|
6
10
|
|
11
|
+
## forward define superclass for image
|
12
|
+
module Originals
|
13
|
+
class Image < Pixelart::Image; end
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
module Originals
|
18
|
+
|
19
|
+
def self.factory ## "shared" single (default) instance
|
20
|
+
@factory ||= Factory.new
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
##
|
26
|
+
# "wrap" fabricate inside Image - why? why not?
|
27
|
+
class Image
|
28
|
+
def self.fabricate( name, *attributes, background: nil ) ## add fac alias - why? why not?
|
29
|
+
## normalize name of series
|
30
|
+
## e.g. Shiba Inu => shibainu etc.
|
31
|
+
key = name.downcase.gsub( '[ ()_-]', '' )
|
32
|
+
|
33
|
+
img = if ['punk', 'punks',
|
34
|
+
'cryptopunk', 'cryptopunks'].include?( key )
|
35
|
+
Originals.factory.punk( *attributes, background: background )
|
36
|
+
elsif ['phunk', 'phunks',
|
37
|
+
'cryptophunk', 'cryptophunks'].include?( key )
|
38
|
+
Originals.factory.phunk( *attributes, background: background )
|
39
|
+
elsif ['marilyn', 'marilyns' ].include?( key )
|
40
|
+
Originals.factory.marilyn( *attributes, background: background )
|
41
|
+
elsif ['philip', 'philips',
|
42
|
+
'philipp', 'philipps' ].include?( key )
|
43
|
+
Originals.factory.philip( *attributes, background: background )
|
44
|
+
elsif ['doge', 'doges',
|
45
|
+
'shiba', 'shibas',
|
46
|
+
'shibainu', 'shibainus'].include?( key )
|
47
|
+
Originals.factory.shiba( *attributes, background: background )
|
48
|
+
else
|
49
|
+
puts "!! ERROR; don't know how to fabricate >#{name}<; sorry"
|
50
|
+
exit 1
|
51
|
+
end
|
52
|
+
img
|
53
|
+
end
|
54
|
+
class << self
|
55
|
+
alias_method :fab, :fabricate
|
56
|
+
end
|
57
|
+
end # class Image
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
class Factory ## add Fabricator/Artist/Artfactory/? alias or such - why? why not?
|
64
|
+
|
65
|
+
def punk( *attributes, mirror: false, background: nil )
|
66
|
+
## note: if no attributes passed in
|
67
|
+
## default to ['Male 2']
|
68
|
+
attributes = ['Male 2'] if attributes.size == 0
|
69
|
+
|
70
|
+
_generate_punk( *attributes,
|
71
|
+
mirror: mirror,
|
72
|
+
background: background )
|
73
|
+
end
|
74
|
+
|
75
|
+
def phunk( *attributes, background: nil )
|
76
|
+
punk( *attributes,
|
77
|
+
mirror: true,
|
78
|
+
background: background )
|
79
|
+
end
|
80
|
+
|
81
|
+
|
82
|
+
MARILYN_ATTRIBUTES = ['Female 3', 'Wild Blonde', 'Mole',
|
83
|
+
'Blue Eye Shadow']
|
84
|
+
|
85
|
+
def marilyn( *attributes, background: nil )
|
86
|
+
_generate_punk( *MARILYN_ATTRIBUTES,
|
87
|
+
*attributes,
|
88
|
+
mirror: true,
|
89
|
+
background: background )
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
PHILIP_ATTRIBUTES = ['Male 3']
|
94
|
+
def philip( *attributes, background: nil )
|
95
|
+
_generate_punk( *PHILIP_ATTRIBUTES,
|
96
|
+
*attributes,
|
97
|
+
mirror: true,
|
98
|
+
background: background )
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
def shiba( *attributes, background: nil )
|
104
|
+
## note: if no attributes passed in
|
105
|
+
## default to ['Classic']
|
106
|
+
attributes = ['Classic'] if attributes.size == 0
|
107
|
+
|
108
|
+
doge = Shiba::Image.generate( *attributes )
|
109
|
+
doge = _background( doge, background ) if background
|
110
|
+
doge
|
111
|
+
end
|
112
|
+
|
113
|
+
|
114
|
+
###
|
115
|
+
# helpers
|
116
|
+
|
117
|
+
def _generate_punk( *attributes,
|
118
|
+
mirror: false,
|
119
|
+
background: nil )
|
120
|
+
punk = Cryptopunks::Image.generate( *attributes )
|
121
|
+
|
122
|
+
punk = punk.mirror if mirror
|
123
|
+
## note: add background as LAST step (after mirror operation)
|
124
|
+
## that is, if mirror=true background will NOT get mirrored
|
125
|
+
punk = _background( punk, background ) if background
|
126
|
+
punk
|
127
|
+
end
|
128
|
+
|
129
|
+
|
130
|
+
def _background( base, background )
|
131
|
+
width, height = base.width, base.height
|
132
|
+
|
133
|
+
img = if background.is_a?( String ) && ['ua', 'ukraine'].include?( background.downcase )
|
134
|
+
Image.new( width, height ).ukraine
|
135
|
+
elsif background.is_a?( String ) && ['rainbow', 'pride'].include?( background.downcase )
|
136
|
+
Image.new( width, height ).pride
|
137
|
+
else
|
138
|
+
Image.new( width, width, background )
|
139
|
+
end
|
140
|
+
|
141
|
+
img2 = Image.new( width, width )
|
142
|
+
img2.compose!( img )
|
143
|
+
img2.compose!( base )
|
144
|
+
img2
|
145
|
+
end
|
146
|
+
|
147
|
+
end # class Factory
|
148
|
+
|
149
|
+
|
150
|
+
end # module Originals
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
require 'originals/tool'
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
####
|
160
|
+
# convenience aliases / shortcuts / alternate spellings
|
161
|
+
Original = Originals
|
162
|
+
|
163
|
+
|
164
|
+
|
7
165
|
|
8
166
|
puts Originals.banner # say hello
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: originals
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.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: 2022-05-
|
11
|
+
date: 2022-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cryptopunks
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: shibainus
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rdoc
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,7 +76,9 @@ description: originals - Do-It-Yourself (DIY) Yes, You Can! - Factory of Modern
|
|
62
76
|
(FOMO) - Fab(criate) Your Own Unique (Pixel) Artworks w/ Text Attributes (Via Built-In
|
63
77
|
Spritesheets) Incl. 2X/4X/8X Zoom for Bigger Sizes And More
|
64
78
|
email: wwwmake@googlegroups.com
|
65
|
-
executables:
|
79
|
+
executables:
|
80
|
+
- fab
|
81
|
+
- fabricate
|
66
82
|
extensions: []
|
67
83
|
extra_rdoc_files:
|
68
84
|
- CHANGELOG.md
|
@@ -75,7 +91,10 @@ files:
|
|
75
91
|
- Manifest.txt
|
76
92
|
- README.md
|
77
93
|
- Rakefile
|
94
|
+
- bin/fab
|
95
|
+
- bin/fabricate
|
78
96
|
- lib/originals.rb
|
97
|
+
- lib/originals/tool.rb
|
79
98
|
- lib/originals/version.rb
|
80
99
|
homepage: https://github.com/pixelartexchange/originals
|
81
100
|
licenses:
|