shibainus 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -23
- data/Rakefile +4 -4
- data/lib/shibainus/version.rb +7 -4
- data/lib/shibainus.rb +36 -38
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 671503dda1740a0388d7d78f018686cc91d728ad328006c58ee9296234721dc0
|
4
|
+
data.tar.gz: 19d69405f913cec35525fe2665866f0d9179e589041cfb990cde9f23fa388dea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3de204013a820251a1a9181d514364d4667564954c807554438fd4f030bb999fd68e87930db5483ed149432bb92f5dde973dc22ab953acbd3fbff357f8d72459
|
7
|
+
data.tar.gz: 853338c8ff5dfe9bd0932b5e6bfc2959330898a70f2a259646613a11e72f7c8eacba056761f29d7ab90ced8bf93290d6f67d385309e5bae43889e2f319fa231b
|
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
The Do-It-Yourself (DIY) [Factory of Modern Originals (FoMO)](https://github.com/
|
1
|
+
The Do-It-Yourself (DIY) [Factory of Modern Originals (FoMO)](https://github.com/profilepic/originals) Presents
|
2
2
|
|
3
3
|
# Shiba Inus (Pixel Doge)
|
4
4
|
|
5
|
-
Yes, you can! Generate your own 24×24 pixel shiba inu doge images (off
|
5
|
+
Yes, you can! Generate your own 24×24 pixel shiba inu doge images (off-blockchain) from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes and more
|
6
6
|
|
7
7
|
|
8
|
-
* home :: [github.com/
|
9
|
-
* bugs :: [github.com/
|
8
|
+
* home :: [github.com/profilepic/text-to-image](https://github.com/profilepic/text-to-image)
|
9
|
+
* bugs :: [github.com/profilepic/text-to-image/issues](https://github.com/profilepic/text-to-image/issues)
|
10
10
|
* gem :: [rubygems.org/gems/shibainus](https://rubygems.org/gems/shibainus)
|
11
11
|
* rdoc :: [rubydoc.info/gems/shibainus](http://rubydoc.info/gems/shibainus)
|
12
12
|
|
@@ -40,17 +40,17 @@ doge.zoom(4).save( "doge4@4x.png" )
|
|
40
40
|
|
41
41
|
Voila!
|
42
42
|
|
43
|
-
![](https://github.com/
|
44
|
-
![](https://github.com/
|
45
|
-
![](https://github.com/
|
46
|
-
![](https://github.com/
|
43
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/doge1.png)
|
44
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/doge2.png)
|
45
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/doge3.png)
|
46
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/doge4.png)
|
47
47
|
|
48
48
|
In 4x:
|
49
49
|
|
50
|
-
![](https://github.com/
|
51
|
-
![](https://github.com/
|
52
|
-
![](https://github.com/
|
53
|
-
![](https://github.com/
|
50
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/doge1@4x.png)
|
51
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/doge2@4x.png)
|
52
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/doge3@4x.png)
|
53
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/doge4@4x.png)
|
54
54
|
|
55
55
|
|
56
56
|
And so on.
|
@@ -79,18 +79,18 @@ big_shades.zoom( 4 ).save( "big_shades@4x.png" )
|
|
79
79
|
|
80
80
|
Voila!
|
81
81
|
|
82
|
-
![](https://github.com/
|
83
|
-
![](https://github.com/
|
84
|
-
![](https://github.com/
|
85
|
-
![](https://github.com/
|
82
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/classic.png)
|
83
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/crazy_hair.png)
|
84
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/beanie.png)
|
85
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/big_shades.png)
|
86
86
|
|
87
87
|
In 4x:
|
88
88
|
|
89
89
|
|
90
|
-
![](https://github.com/
|
91
|
-
![](https://github.com/
|
92
|
-
![](https://github.com/
|
93
|
-
![](https://github.com/
|
90
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/classic@4x.png)
|
91
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/crazy_hair@4x.png)
|
92
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/beanie@4x.png)
|
93
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/i/big_shades@4x.png)
|
94
94
|
|
95
95
|
And so on.
|
96
96
|
|
@@ -98,11 +98,11 @@ And so on.
|
|
98
98
|
|
99
99
|
## Appendix - All Built-In Spritesheet Attributes (24x24px)
|
100
100
|
|
101
|
-
See the [spritesheet.csv](https://github.com/
|
101
|
+
See the [spritesheet.csv](https://github.com/profilepic/text-to-image/blob/master/shibainus/config/spritesheet.csv) dataset for all attribute names (w/ categories).
|
102
102
|
|
103
|
-
![](https://github.com/
|
103
|
+
![](https://github.com/profilepic/text-to-image/raw/master/shibainus/config/spritesheet.png)
|
104
104
|
|
105
|
-
(Source: [shibainus/spritesheet.png](https://github.com/
|
105
|
+
(Source: [shibainus/spritesheet.png](https://github.com/profilepic/text-to-image/blob/master/shibainus/config/spritesheet.png))
|
106
106
|
|
107
107
|
|
108
108
|
|
data/Rakefile
CHANGED
@@ -11,12 +11,12 @@ end
|
|
11
11
|
|
12
12
|
Hoe.spec 'shibainus' do
|
13
13
|
|
14
|
-
self.version = Shibainus::VERSION
|
14
|
+
self.version = Pixelart::Module::Shibainus::VERSION
|
15
15
|
|
16
|
-
self.summary = "shibainus - generate your own 24×24 pixel shiba inu doge images (off
|
16
|
+
self.summary = "shibainus - generate your own 24×24 pixel shiba inu doge 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 'shibainus' 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/shibainus/version.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
|
2
|
-
|
2
|
+
module Pixelart
|
3
|
+
module Module
|
3
4
|
module Shibainus
|
4
|
-
MAJOR =
|
5
|
-
MINOR =
|
6
|
-
PATCH =
|
5
|
+
MAJOR = 1
|
6
|
+
MINOR = 0
|
7
|
+
PATCH = 0
|
7
8
|
VERSION = [MAJOR,MINOR,PATCH].join('.')
|
8
9
|
|
9
10
|
def self.version
|
@@ -18,5 +19,7 @@ module Shibainus
|
|
18
19
|
File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
|
19
20
|
end
|
20
21
|
|
22
|
+
end # module Pixelart
|
23
|
+
end # module Module
|
21
24
|
end # module Shibainus
|
22
25
|
|
data/lib/shibainus.rb
CHANGED
@@ -1,25 +1,42 @@
|
|
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 'shibainus/version' # note: let version always go first
|
8
8
|
|
9
9
|
|
10
|
-
module Shibainus
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
module Shibainu
|
12
|
+
|
13
|
+
class Spritesheet
|
14
|
+
def self.builtin ### check: use a different name e.g. default,standard,base or such - why? why not?
|
15
|
+
@sheet ||= Pixelart::Spritesheet.read( "#{Pixelart::Module::Shibainus.root}/config/spritesheet.png",
|
16
|
+
"#{Pixelart::Module::Shibainus.root}/config/spritesheet.csv",
|
17
|
+
width: 24,
|
18
|
+
height: 24 )
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.find_by( name: ) ## return archetype/attribute image by name
|
22
|
+
builtin.find_by( name: name )
|
23
|
+
end
|
24
|
+
end # class Spritesheet
|
25
|
+
## add convenience (alternate spelling) alias - why? why not?
|
26
|
+
SpriteSheet = Spritesheet
|
27
|
+
Sheet = Spritesheet
|
28
|
+
Sprite = Spritesheet
|
18
29
|
|
19
30
|
|
20
31
|
|
21
32
|
class Image < Pixelart::Image
|
22
|
-
|
33
|
+
|
34
|
+
def self.generator
|
35
|
+
@generator ||= Artfactory.use( Shibainu::Sheet.builtin,
|
36
|
+
image_class: Image )
|
37
|
+
end
|
38
|
+
|
39
|
+
## before callback/patch for hats
|
23
40
|
BEFORE_PATCH = ->(img, meta) {
|
24
41
|
## hack for doge hats - cut off / clean top (ears)
|
25
42
|
if ['beanie',
|
@@ -47,40 +64,21 @@ module Shibainus
|
|
47
64
|
'shibainu', 'shibainus']
|
48
65
|
DEFAULT_ATTRIBUTES = ['Classic']
|
49
66
|
|
50
|
-
def self.generate( *
|
51
|
-
|
52
|
-
img = Shibainus.generator.generate( *values,
|
53
|
-
before: BEFORE_PATCH )
|
54
|
-
## note: unwrap inner image before passing on to c'tor (requires ChunkyPNG image for now)
|
55
|
-
new( 24, 24, img.image )
|
67
|
+
def self.generate( *names )
|
68
|
+
generator.generate( *names, before: BEFORE_PATCH )
|
56
69
|
end # method Image.generate
|
57
70
|
end # class Image
|
71
|
+
end # module Shibainu
|
58
72
|
|
59
73
|
|
60
|
-
class Spritesheet
|
61
|
-
## note: for now class used for "namespace" only
|
62
|
-
def self.find_by( name: ) ## return archetype/attribute image by name
|
63
|
-
# note: pass along name as q (query string)
|
64
|
-
Shibainus.generator.find( name )
|
65
|
-
end
|
66
|
-
end # class Spritesheet
|
67
|
-
## add convenience (alternate spelling) alias - why? why not?
|
68
|
-
SpriteSheet = Spritesheet
|
69
|
-
Sheet = Spritesheet
|
70
|
-
Sprite = Spritesheet
|
71
|
-
end # module Coolcats
|
72
|
-
|
73
74
|
|
74
75
|
### add some convenience shortcuts
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
Shibainu = Shibainus
|
79
|
-
Shiba = Shibainus
|
80
|
-
Shib = Shibainus
|
76
|
+
ShibaInu = Shibainu
|
77
|
+
Shiba = Shibainu
|
78
|
+
Shib = Shibainu
|
81
79
|
|
82
80
|
## add doge alias/shortcut too - why? why not?
|
83
|
-
Doge =
|
81
|
+
Doge = Shibainu
|
84
82
|
|
85
83
|
|
86
84
|
###
|
@@ -89,4 +87,4 @@ include Pixelart
|
|
89
87
|
|
90
88
|
|
91
89
|
|
92
|
-
puts Shibainus.banner # say hello
|
90
|
+
puts Pixelart::Module::Shibainus.banner # say hello
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shibainus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 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-
|
11
|
+
date: 2022-10-11 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: shibainus - generate your own 24×24 pixel shiba inu doge images (off
|
62
|
-
|
63
|
-
|
61
|
+
description: shibainus - generate your own 24×24 pixel shiba inu doge 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/shibainus.rb
|
79
79
|
- lib/shibainus/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: shibainus - generate your own 24×24 pixel shiba inu doge images (off
|
104
|
+
summary: shibainus - generate your own 24×24 pixel shiba inu doge images (off-blockchain)
|
105
105
|
from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger
|
106
106
|
sizes and more
|
107
107
|
test_files: []
|