shibainus 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 +25 -23
- data/Rakefile +4 -4
- data/lib/shibainus/version.rb +6 -4
- data/lib/shibainus.rb +39 -45
- 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: 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,10 +1,12 @@
|
|
1
|
+
The Do-It-Yourself (DIY) [Factory of Modern Originals (FoMO)](https://github.com/profilepic/originals) Presents
|
2
|
+
|
1
3
|
# Shiba Inus (Pixel Doge)
|
2
4
|
|
3
|
-
|
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
|
4
6
|
|
5
7
|
|
6
|
-
* home :: [github.com/
|
7
|
-
* 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)
|
8
10
|
* gem :: [rubygems.org/gems/shibainus](https://rubygems.org/gems/shibainus)
|
9
11
|
* rdoc :: [rubydoc.info/gems/shibainus](http://rubydoc.info/gems/shibainus)
|
10
12
|
|
@@ -38,17 +40,17 @@ doge.zoom(4).save( "doge4@4x.png" )
|
|
38
40
|
|
39
41
|
Voila!
|
40
42
|
|
41
|
-

|
44
|
+

|
45
|
+

|
46
|
+

|
45
47
|
|
46
48
|
In 4x:
|
47
49
|
|
48
|
-

|
51
|
+

|
52
|
+

|
53
|
+

|
52
54
|
|
53
55
|
|
54
56
|
And so on.
|
@@ -77,18 +79,18 @@ big_shades.zoom( 4 ).save( "big_shades@4x.png" )
|
|
77
79
|
|
78
80
|
Voila!
|
79
81
|
|
80
|
-

|
83
|
+

|
84
|
+

|
85
|
+

|
84
86
|
|
85
87
|
In 4x:
|
86
88
|
|
87
89
|
|
88
|
-

|
91
|
+

|
92
|
+

|
93
|
+

|
92
94
|
|
93
95
|
And so on.
|
94
96
|
|
@@ -96,11 +98,11 @@ And so on.
|
|
96
98
|
|
97
99
|
## Appendix - All Built-In Spritesheet Attributes (24x24px)
|
98
100
|
|
99
|
-
See the [
|
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).
|
100
102
|
|
101
|
-

|
102
104
|
|
103
|
-
(Source: [
|
105
|
+
(Source: [shibainus/spritesheet.png](https://github.com/profilepic/text-to-image/blob/master/shibainus/config/spritesheet.png))
|
104
106
|
|
105
107
|
|
106
108
|
|
@@ -108,4 +110,4 @@ See the [**spritesheet.csv**](https://github.com/pixelartexchange/pixelart/blob/
|
|
108
110
|
|
109
111
|
## Questions? Comments?
|
110
112
|
|
111
|
-
Post them on the [
|
113
|
+
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 '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
|
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,9 @@
|
|
1
1
|
|
2
|
-
|
2
|
+
module Pixelart
|
3
|
+
module Module
|
3
4
|
module Shibainus
|
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 Shibainus
|
|
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 Shibainus
|
23
25
|
|
data/lib/shibainus.rb
CHANGED
@@ -1,33 +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
|
-
## forward define superclass for image
|
11
|
-
module Shibainus
|
12
|
-
class Image < Pixelart::Image; end
|
13
|
-
end
|
14
10
|
|
15
|
-
|
16
|
-
|
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
|
17
29
|
|
18
|
-
module Shibainus
|
19
30
|
|
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
31
|
|
32
|
+
class Image < Pixelart::Image
|
27
33
|
|
34
|
+
def self.generator
|
35
|
+
@generator ||= Artfactory.use( Shibainu::Sheet.builtin,
|
36
|
+
image_class: Image )
|
37
|
+
end
|
28
38
|
|
29
|
-
|
30
|
-
## before callback/patch for hats
|
39
|
+
## before callback/patch for hats
|
31
40
|
BEFORE_PATCH = ->(img, meta) {
|
32
41
|
## hack for doge hats - cut off / clean top (ears)
|
33
42
|
if ['beanie',
|
@@ -50,41 +59,26 @@ module Shibainus
|
|
50
59
|
}
|
51
60
|
|
52
61
|
|
53
|
-
|
62
|
+
NAMES = ['doge', 'doges',
|
63
|
+
'shiba', 'shibas',
|
64
|
+
'shibainu', 'shibainus']
|
65
|
+
DEFAULT_ATTRIBUTES = ['Classic']
|
54
66
|
|
55
|
-
|
56
|
-
|
57
|
-
before: BEFORE_PATCH )
|
58
|
-
## note: unwrap inner image before passing on to c'tor (requires ChunkyPNG image for now)
|
59
|
-
new( 24, 24, img.image )
|
67
|
+
def self.generate( *names )
|
68
|
+
generator.generate( *names, before: BEFORE_PATCH )
|
60
69
|
end # method Image.generate
|
61
70
|
end # class Image
|
71
|
+
end # module Shibainu
|
62
72
|
|
63
73
|
|
64
|
-
class Spritesheet
|
65
|
-
## note: for now class used for "namespace" only
|
66
|
-
def self.find_by( name: ) ## return archetype/attribute image by name
|
67
|
-
# note: pass along name as q (query string)
|
68
|
-
Shibainus.generator.find( name )
|
69
|
-
end
|
70
|
-
end # class Spritesheet
|
71
|
-
## add convenience (alternate spelling) alias - why? why not?
|
72
|
-
SpriteSheet = Spritesheet
|
73
|
-
Sheet = Spritesheet
|
74
|
-
Sprite = Spritesheet
|
75
|
-
end # module Coolcats
|
76
|
-
|
77
74
|
|
78
75
|
### add some convenience shortcuts
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
Shibainu = Shibainus
|
83
|
-
Shiba = Shibainus
|
84
|
-
Shib = Shibainus
|
76
|
+
ShibaInu = Shibainu
|
77
|
+
Shiba = Shibainu
|
78
|
+
Shib = Shibainu
|
85
79
|
|
86
80
|
## add doge alias/shortcut too - why? why not?
|
87
|
-
Doge =
|
81
|
+
Doge = Shibainu
|
88
82
|
|
89
83
|
|
90
84
|
###
|
@@ -93,4 +87,4 @@ include Pixelart
|
|
93
87
|
|
94
88
|
|
95
89
|
|
96
|
-
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:
|
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
|
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
|
105
|
-
|
106
|
-
|
104
|
+
summary: shibainus - generate your own 24×24 pixel shiba inu doge images (off-blockchain)
|
105
|
+
from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger
|
106
|
+
sizes and more
|
107
107
|
test_files: []
|