coolcats 0.1.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86246698ce26e02b56b6b9474adc3323ccb78359e1f63547b30e9476d9dde693
4
- data.tar.gz: 147d11723068844d4d907e12ae86cc9bdc97a25eb6859be404bb4d9c4f6a3b5d
3
+ metadata.gz: cd556dc732779a6049268108fd0fc8f713a72e8c31d37b4e03e5507652c99a32
4
+ data.tar.gz: a297760d367edcafa342f5805c7c623b5623f2b1d94e578a6105f2f016d3385b
5
5
  SHA512:
6
- metadata.gz: 80ef11ec6ed05e6e357b313748a739fc90293443d038c13338ca81d14263d12b01bfc18ab629178af18d4c2198d94942685766a27aaf82e1bf49efb0d40a1a7a
7
- data.tar.gz: 7a35931c14f37da591267b5d93f8177476d6f9d6181ada6db4dbac5ceff176ebff427a56ffea671e72d9e0b10af936c219cf55c89c79805c3267004d0ebc42f0
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
- coolcats - generate your own 24×24 pixel cat images (off chain) from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes and more
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/pixelartexchange/pixelart](https://github.com/pixelartexchange/pixelart)
8
- * bugs :: [github.com/pixelartexchange/pixelart/issues](https://github.com/pixelartexchange/pixelart/issues)
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
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat1.png)
40
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat2.png)
41
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat3.png)
41
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat1.png)
42
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat2.png)
43
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat3.png)
42
44
 
43
45
  In 4x:
44
46
 
45
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat1@4x.png)
46
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat2@4x.png)
47
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat3@4x.png)
47
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat1@4x.png)
48
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat2@4x.png)
49
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat3@4x.png)
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
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat4.png)
70
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat5.png)
71
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat6.png)
71
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat4.png)
72
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat5.png)
73
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat6.png)
72
74
 
73
75
  In 4x:
74
76
 
75
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat4@4x.png)
76
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat5@4x.png)
77
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat6@4x.png)
77
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat4@4x.png)
78
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat5@4x.png)
79
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat6@4x.png)
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
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat7.png)
100
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat8.png)
101
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat9.png)
101
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat7.png)
102
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat8.png)
103
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat9.png)
102
104
 
103
105
  In 4x:
104
106
 
105
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat7@4x.png)
106
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat8@4x.png)
107
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/coolcat9@4x.png)
107
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat7@4x.png)
108
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat8@4x.png)
109
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/coolcat9@4x.png)
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
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/base.png)
137
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/beanie_orange.png)
138
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/costume_gorilla.png)
139
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/overalls_blue.png)
138
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/base.png)
139
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/beanie_orange.png)
140
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/costume_gorilla.png)
141
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/overalls_blue.png)
140
142
 
141
143
  In 4x:
142
144
 
143
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/base@4x.png)
144
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/beanie_orange@4x.png)
145
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/costume_gorilla@4x.png)
146
- ![](https://github.com/pixelartexchange/pixelart/raw/master/coolcats/i/overalls_blue@4x.png)
145
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/base@4x.png)
146
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/beanie_orange@4x.png)
147
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/costume_gorilla@4x.png)
148
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/i/overalls_blue@4x.png)
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
+ ![](https://github.com/profilepic/text-to-image/raw/master/coolcats/config/spritesheet.png)
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 [CryptoPunksDev reddit](https://old.reddit.com/r/CryptoPunksDev). Thanks.
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 chain) from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes and more"
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/pixelartexchange/pixelart' }
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
- ['pixelart', '>= 1.3.1'],
29
+ ['artfactory', '>= 0.2.0'],
30
30
  ]
31
31
 
32
32
  self.licenses = ['Public Domain']
@@ -1,9 +1,9 @@
1
1
 
2
-
2
+ module Pixelart
3
+ module Module
3
4
  module Coolcats
4
-
5
- MAJOR = 0
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 'pixelart/base'
1
+ ## our own "3rd" party gems
2
+ require 'artfactory/base'
3
3
 
4
4
 
5
5
 
6
6
  ## our own code
7
- require 'coolcats/version' # note: let version always go first
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
- ## note: for now class used for "namespace" only
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
- # note: pass along name as q (query string)
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
- end # module Coolcats
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
- CoolCats = Coolcats
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: 0.1.0
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-05-19 00:00:00.000000000 Z
11
+ date: 2022-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: pixelart
14
+ name: artfactory
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.3.1
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: 1.3.1
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 chain) from
62
- text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes
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/pixelartexchange/pixelart
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 chain) from text
105
- attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes and
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: []