shibainus 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: 770d6505218c085495ce8ba842b0ecd9cf5b75d92b9557fb1b4e9978af816cef
4
- data.tar.gz: 49c8f55c903649b369ec01d9039cb2480a96b4ac8b823a288fa17aa36a77bcb8
3
+ metadata.gz: 671503dda1740a0388d7d78f018686cc91d728ad328006c58ee9296234721dc0
4
+ data.tar.gz: 19d69405f913cec35525fe2665866f0d9179e589041cfb990cde9f23fa388dea
5
5
  SHA512:
6
- metadata.gz: 39651aeda7aa240b1884494170c9b477c4f2ffcd9bc003564563a993419e8be6676a08652a03485fbf22d6709de527ffa369bd77115c744afa05cf10098d773b
7
- data.tar.gz: cf639cd9ad45826e01a69b3b3681a54032e85caad9dc415a52a6911f5233952b3362c477af158bcc9e849286a64ce1738dd0d6e8adfacf181017beab9ecb1b6b
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
- shibainus - generate your own 24×24 pixel shiba inu (pixel) doge 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 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/pixelartexchange/pixelart](https://github.com/pixelartexchange/pixelart)
7
- * bugs :: [github.com/pixelartexchange/pixelart/issues](https://github.com/pixelartexchange/pixelart/issues)
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
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/doge1.png)
42
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/doge2.png)
43
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/doge3.png)
44
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/doge4.png)
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)
45
47
 
46
48
  In 4x:
47
49
 
48
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/doge1@4x.png)
49
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/doge2@4x.png)
50
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/doge3@4x.png)
51
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/doge4@4x.png)
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)
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
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/classic.png)
81
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/crazy_hair.png)
82
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/beanie.png)
83
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/big_shades.png)
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)
84
86
 
85
87
  In 4x:
86
88
 
87
89
 
88
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/classic@4x.png)
89
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/crazy_hair@4x.png)
90
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/beanie@4x.png)
91
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/i/big_shades@4x.png)
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)
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 [**spritesheet.csv**](https://github.com/pixelartexchange/pixelart/blob/master/shibainus/config/spritesheet.csv) dataset for all attribute names (w/ categories).
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
- ![](https://github.com/pixelartexchange/pixelart/raw/master/shibainus/config/spritesheet.png)
103
+ ![](https://github.com/profilepic/text-to-image/raw/master/shibainus/config/spritesheet.png)
102
104
 
103
- (Source: [**shibainus/spritesheet.png**](https://github.com/pixelartexchange/pixelart/blob/master/shibainus/config/spritesheet.png))
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 [CryptoPunksDev reddit](https://old.reddit.com/r/CryptoPunksDev). Thanks.
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 (pixel) doge images (off chain) from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes and more"
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/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 'shibainus' do
26
26
  self.history_file = 'CHANGELOG.md'
27
27
 
28
28
  self.extra_deps = [
29
- ['pixelart', '>= 1.3.2'],
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 Shibainus
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 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 '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 'shibainus/version' # note: let version always go first
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
- ## add convenience pre-configurated generatored with build-in spritesheet (see config)
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
- class Image
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
- def self.generate( *values, background: nil )
62
+ NAMES = ['doge', 'doges',
63
+ 'shiba', 'shibas',
64
+ 'shibainu', 'shibainus']
65
+ DEFAULT_ATTRIBUTES = ['Classic']
54
66
 
55
- img = Shibainus.generator.generate( *values,
56
- background: background,
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
- ShibaInus = Shibainus
80
- ## add singular too -why? why not?
81
- ShibaInu = Shibainus
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 = Shibainus
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: 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-28 00:00:00.000000000 Z
11
+ date: 2022-10-11 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.2
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.2
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 (pixel) doge images
62
- (off chain) from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom
63
- for bigger sizes and more
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/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: shibainus - generate your own 24×24 pixel shiba inu (pixel) doge images (off
105
- chain) from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for
106
- bigger sizes and more
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: []