coolcats 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +43 -30
- data/Rakefile +4 -4
- data/lib/coolcats/version.rb +6 -4
- data/lib/coolcats.rb +38 -37
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd556dc732779a6049268108fd0fc8f713a72e8c31d37b4e03e5507652c99a32
|
4
|
+
data.tar.gz: a297760d367edcafa342f5805c7c623b5623f2b1d94e578a6105f2f016d3385b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36bc6129aa400d7c341a90b84e81a843c6b518dd5bb0f1b2ed56e1837c71917ff16bda6d12bd7344af15fd8b33c3f5dada16bc50400b1242cd8990de48dbaac7
|
7
|
+
data.tar.gz: 1c06bc2be7acfabc6304e0ebc09dc25622cee5e51c173ae162082ee638f43d5df02a5ebcbd1b5a96dd15226b5ff0a4b656d9e9195d7b6b299788a6a54cf43f8c
|
data/README.md
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
+
The Do-It-Yourself (DIY) [Factory of Modern Originals (FoMO)](https://github.com/profilepic/originals) Presents
|
2
|
+
|
1
3
|
# Coolcats (Pixel Cats)
|
2
4
|
|
3
|
-
|
5
|
+
Yes, you can! Generate your own 24×24 pixel cat images (off-blockchain) from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes and more
|
4
6
|
|
5
7
|
|
6
8
|
|
7
|
-
* home :: [github.com/
|
8
|
-
* bugs :: [github.com/
|
9
|
+
* home :: [github.com/profilepic/text-to-image](https://github.com/profilepic/text-to-image)
|
10
|
+
* bugs :: [github.com/profilepic/text-to-image/issues](https://github.com/profilepic/text-to-image/issues)
|
9
11
|
* gem :: [rubygems.org/gems/coolcats](https://rubygems.org/gems/coolcats)
|
10
12
|
* rdoc :: [rubydoc.info/gems/coolcats](http://rubydoc.info/gems/coolcats)
|
11
13
|
|
@@ -36,15 +38,15 @@ coolcat.zoom(4).save( "coolcat3@4x.png" )
|
|
36
38
|
|
37
39
|
Voila!
|
38
40
|
|
39
|
-

|
42
|
+

|
43
|
+

|
42
44
|
|
43
45
|
In 4x:
|
44
46
|
|
45
|
-

|
48
|
+

|
49
|
+

|
48
50
|
|
49
51
|
|
50
52
|
|
@@ -66,15 +68,15 @@ coolcat.zoom(4).save( "coolcat6@4x.png" )
|
|
66
68
|
|
67
69
|
Voila!
|
68
70
|
|
69
|
-

|
72
|
+

|
73
|
+

|
72
74
|
|
73
75
|
In 4x:
|
74
76
|
|
75
|
-

|
78
|
+

|
79
|
+

|
78
80
|
|
79
81
|
|
80
82
|
|
@@ -96,15 +98,15 @@ coolcat.zoom(4).save( "coolcat9@4x.png" )
|
|
96
98
|
|
97
99
|
Voila!
|
98
100
|
|
99
|
-

|
102
|
+

|
103
|
+

|
102
104
|
|
103
105
|
In 4x:
|
104
106
|
|
105
|
-

|
108
|
+

|
109
|
+

|
108
110
|
|
109
111
|
|
110
112
|
And so on.
|
@@ -133,23 +135,34 @@ overalls_blue.zoom( 4 ).save( "overalls_blue@4x.png" )
|
|
133
135
|
|
134
136
|
Voila!
|
135
137
|
|
136
|
-

|
139
|
+

|
140
|
+

|
141
|
+

|
140
142
|
|
141
143
|
In 4x:
|
142
144
|
|
143
|
-

|
146
|
+

|
147
|
+

|
148
|
+

|
147
149
|
|
148
150
|
And so on.
|
149
151
|
|
150
152
|
|
151
153
|
|
154
|
+
## Appendix - All Built-In Spritesheet Attributes (24x24px)
|
155
|
+
|
156
|
+
See the [spritesheet.csv](https://github.com/profilepic/text-to-image/blob/master/coolcats/config/spritesheet.csv) dataset for all attribute names (w/ categories).
|
157
|
+
|
158
|
+

|
159
|
+
|
160
|
+
(Source: [coolcats/spritesheet.png](https://github.com/profilepic/text-to-image/blob/master/coolcats/config/spritesheet.png))
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
152
165
|
|
153
166
|
## Questions? Comments?
|
154
167
|
|
155
|
-
Post them on the [
|
168
|
+
Post them on the [D.I.Y. Punk (Pixel) Art reddit](https://old.reddit.com/r/DIYPunkArt). Thanks.
|
data/Rakefile
CHANGED
@@ -11,12 +11,12 @@ end
|
|
11
11
|
|
12
12
|
Hoe.spec 'coolcats' do
|
13
13
|
|
14
|
-
self.version = Coolcats::VERSION
|
14
|
+
self.version = Pixelart::Module::Coolcats::VERSION
|
15
15
|
|
16
|
-
self.summary = "coolcats - generate your own 24×24 pixel cat images (off
|
16
|
+
self.summary = "coolcats - generate your own 24×24 pixel cat images (off-blockchain) from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes and more"
|
17
17
|
self.description = summary
|
18
18
|
|
19
|
-
self.urls = { home: 'https://github.com/
|
19
|
+
self.urls = { home: 'https://github.com/profilepic/text-to-image' }
|
20
20
|
|
21
21
|
self.author = 'Gerald Bauer'
|
22
22
|
self.email = 'wwwmake@googlegroups.com'
|
@@ -26,7 +26,7 @@ Hoe.spec 'coolcats' do
|
|
26
26
|
self.history_file = 'CHANGELOG.md'
|
27
27
|
|
28
28
|
self.extra_deps = [
|
29
|
-
['
|
29
|
+
['artfactory', '>= 0.2.0'],
|
30
30
|
]
|
31
31
|
|
32
32
|
self.licenses = ['Public Domain']
|
data/lib/coolcats/version.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
|
2
|
-
|
2
|
+
module Pixelart
|
3
|
+
module Module
|
3
4
|
module Coolcats
|
4
|
-
|
5
|
-
|
6
|
-
MINOR = 1
|
5
|
+
MAJOR = 1
|
6
|
+
MINOR = 0
|
7
7
|
PATCH = 0
|
8
8
|
VERSION = [MAJOR,MINOR,PATCH].join('.')
|
9
9
|
|
@@ -19,5 +19,7 @@ module Coolcats
|
|
19
19
|
File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
|
20
20
|
end
|
21
21
|
|
22
|
+
end # module Pixelart
|
23
|
+
end # module Module
|
22
24
|
end # module Coolcats
|
23
25
|
|
data/lib/coolcats.rb
CHANGED
@@ -1,59 +1,60 @@
|
|
1
|
-
## 3rd party
|
2
|
-
require '
|
1
|
+
## our own "3rd" party gems
|
2
|
+
require 'artfactory/base'
|
3
3
|
|
4
4
|
|
5
5
|
|
6
6
|
## our own code
|
7
|
-
|
7
|
+
require_relative 'coolcats/version' # note: let version always go first
|
8
8
|
|
9
9
|
|
10
|
-
## forward define superclass for image
|
11
|
-
module Coolcats
|
12
|
-
class Image < Pixelart::Image; end
|
13
|
-
end
|
14
|
-
|
15
|
-
###
|
16
|
-
## add convenience pre-configurated generatored with build-in spritesheet (see config)
|
17
|
-
|
18
|
-
module Coolcats
|
19
|
-
|
20
|
-
def self.generator
|
21
|
-
@generator ||= Pixelart::Generator.new( "#{root}/config/spritesheet.png",
|
22
|
-
"#{root}/config/spritesheet.csv",
|
23
|
-
width: 24,
|
24
|
-
height: 24 )
|
25
|
-
end
|
26
10
|
|
27
|
-
|
28
|
-
class Image
|
29
|
-
def self.generate( *values, background: nil )
|
30
|
-
## note: always auto-add base coolcat archetye by default
|
31
|
-
img = Coolcats.generator.generate( 'Base', *values, background: background )
|
32
|
-
## note: unwrap inner image before passing on to c'tor (requires ChunkyPNG image for now)
|
33
|
-
new( 24, 24, img.image )
|
34
|
-
end # method Image.generate
|
35
|
-
end # class Image
|
11
|
+
module Coolcat
|
36
12
|
|
37
13
|
|
38
14
|
class Spritesheet
|
39
|
-
|
15
|
+
def self.builtin ### check: use a different name e.g. default,standard,base or such - why? why not?
|
16
|
+
@sheet ||= Pixelart::Spritesheet.read( "#{Pixelart::Module::Coolcats.root}/config/spritesheet.png",
|
17
|
+
"#{Pixelart::Module::Coolcats.root}/config/spritesheet.csv",
|
18
|
+
width: 24,
|
19
|
+
height: 24 )
|
20
|
+
end
|
21
|
+
|
40
22
|
def self.find_by( name: ) ## return archetype/attribute image by name
|
41
|
-
|
42
|
-
Coolcats.generator.find( name )
|
23
|
+
builtin.find_by( name: name )
|
43
24
|
end
|
44
25
|
end # class Spritesheet
|
45
26
|
## add convenience (alternate spelling) alias - why? why not?
|
46
27
|
SpriteSheet = Spritesheet
|
47
28
|
Sheet = Spritesheet
|
48
29
|
Sprite = Spritesheet
|
49
|
-
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
class Image < Pixelart::Image
|
34
|
+
|
35
|
+
|
36
|
+
def self.generator
|
37
|
+
@generator ||= Artfactory.use( Coolcat::Sheet.builtin,
|
38
|
+
image_class: Image )
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
NAMES = ['coolcat', 'coolcats']
|
43
|
+
|
44
|
+
DEFAULT_ATTRIBUTES = ['Happy']
|
45
|
+
|
46
|
+
def self.generate( *names )
|
47
|
+
## note: always auto-add base coolcat archetye by default
|
48
|
+
generator.generate( 'Base', *names )
|
49
|
+
end # method Image.generate
|
50
|
+
end # class Image
|
51
|
+
|
52
|
+
end # module Coolcat
|
53
|
+
|
50
54
|
|
51
55
|
|
52
56
|
### add some convenience shortcuts
|
53
|
-
|
54
|
-
## add singular too -why? why not?
|
55
|
-
Coolcat = Coolcats
|
56
|
-
CoolCat = Coolcats
|
57
|
+
CoolCat = Coolcat
|
57
58
|
|
58
59
|
|
59
60
|
|
@@ -64,4 +65,4 @@ include Pixelart
|
|
64
65
|
|
65
66
|
|
66
67
|
|
67
|
-
puts Coolcats.banner # say hello
|
68
|
+
puts Pixelart::Module::Coolcats.banner # say hello
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coolcats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.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: 2022-
|
11
|
+
date: 2022-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: artfactory
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.2.0
|
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:
|
26
|
+
version: 0.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rdoc
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,9 +58,9 @@ dependencies:
|
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '3.23'
|
61
|
-
description: coolcats - generate your own 24×24 pixel cat images (off
|
62
|
-
text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger
|
63
|
-
and more
|
61
|
+
description: coolcats - generate your own 24×24 pixel cat images (off-blockchain)
|
62
|
+
from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger
|
63
|
+
sizes and more
|
64
64
|
email: wwwmake@googlegroups.com
|
65
65
|
executables: []
|
66
66
|
extensions: []
|
@@ -77,7 +77,7 @@ files:
|
|
77
77
|
- config/spritesheet.png
|
78
78
|
- lib/coolcats.rb
|
79
79
|
- lib/coolcats/version.rb
|
80
|
-
homepage: https://github.com/
|
80
|
+
homepage: https://github.com/profilepic/text-to-image
|
81
81
|
licenses:
|
82
82
|
- Public Domain
|
83
83
|
metadata: {}
|
@@ -101,7 +101,7 @@ requirements: []
|
|
101
101
|
rubygems_version: 3.3.7
|
102
102
|
signing_key:
|
103
103
|
specification_version: 4
|
104
|
-
summary: coolcats - generate your own 24×24 pixel cat images (off
|
105
|
-
attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes
|
106
|
-
more
|
104
|
+
summary: coolcats - generate your own 24×24 pixel cat images (off-blockchain) from
|
105
|
+
text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes
|
106
|
+
and more
|
107
107
|
test_files: []
|