belles 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef1d1996c5a6e1b7dc13d8f4db7cf40f01436f64add9c55436345f165938f30c
4
- data.tar.gz: eea094d17ca930c9461b63388437ea614dcee3abb60e53de0c6e97433bb1bfbf
3
+ metadata.gz: 80dc6b688625b2192ee21283443c313a844786cd7d91391acc1add74b82349a4
4
+ data.tar.gz: 03dd767e7ab01af75b701ea674a430cabfdbed3c7183a9976e9499fab6e7a537
5
5
  SHA512:
6
- metadata.gz: 70bf4c94de5a2eac55f2895913afc61d1a8eb3ecdbd739916509283d372de02d95a042a8d757b98a612fbe8a3eaece1e1d063ef43e4274482ad0d7ca87c1d6f3
7
- data.tar.gz: 40525b7c7b04b61688ebd7bfa83f35ddc8cabaf60510256ee731f3aa251e5035feb93fda76a32dc9e4554f7ab166de1056d9d3702eaf0381582a399f3f998315
6
+ metadata.gz: bfd4c292e0c49043db08fdee7182a9ace831adf5e1a2e46155d753c2bba034261b02380f6ce6c65c53adb55e1c648e74b978cbc2d27e45b60f0d588ca5a76497
7
+ data.tar.gz: 8be070562f1697f347c5d9330018d1d180d8c8a31ffc07c762c1d83f5165235adbe031890c70b86822c5d895cbc799b99b6b312231c17f8b56badaf541d01fb5
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- The Do-It-Yourself (DIY) [Factory of Modern Originals (FoMO)](https://github.com/pixelartexchange/originals) Presents
1
+ The Do-It-Yourself (DIY) [Factory of Modern Originals (FoMO)](https://github.com/profilepic/originals) Presents
2
2
 
3
3
 
4
4
  # Beaux & Belles (Pixel Head Avatars)
@@ -7,8 +7,8 @@ Yes, you can! Generate your own 24×24 beau & belle (pixel) head avatars images
7
7
 
8
8
 
9
9
 
10
- * home :: [github.com/pixelartexchange/pixelart](https://github.com/pixelartexchange/pixelart)
11
- * bugs :: [github.com/pixelartexchange/pixelart/issues](https://github.com/pixelartexchange/pixelart/issues)
10
+ * home :: [github.com/profilepic/text-to-image](https://github.com/profilepic/text-to-image)
11
+ * bugs :: [github.com/profilepic/text-to-image/issues](https://github.com/profilepic/text-to-image/issues)
12
12
  * gem :: [rubygems.org/gems/belles](https://rubygems.org/gems/belles)
13
13
  * rdoc :: [rubydoc.info/gems/belles](http://rubydoc.info/gems/belles)
14
14
 
@@ -49,17 +49,17 @@ head.zoom(4).save( "head4@4x.png" )
49
49
 
50
50
  Voila!
51
51
 
52
- ![](https://github.com/pixelartexchange/pixelart/raw/master/belles/i/head1.png)
53
- ![](https://github.com/pixelartexchange/pixelart/raw/master/belles/i/head2.png)
54
- ![](https://github.com/pixelartexchange/pixelart/raw/master/belles/i/head3.png)
55
- ![](https://github.com/pixelartexchange/pixelart/raw/master/belles/i/head4.png)
52
+ ![](https://github.com/profilepic/text-to-image/raw/master/belles/i/head1.png)
53
+ ![](https://github.com/profilepic/text-to-image/raw/master/belles/i/head2.png)
54
+ ![](https://github.com/profilepic/text-to-image/raw/master/belles/i/head3.png)
55
+ ![](https://github.com/profilepic/text-to-image/raw/master/belles/i/head4.png)
56
56
 
57
57
  In 4x:
58
58
 
59
- ![](https://github.com/pixelartexchange/pixelart/raw/master/belles/i/head1@4x.png)
60
- ![](https://github.com/pixelartexchange/pixelart/raw/master/belles/i/head2@4x.png)
61
- ![](https://github.com/pixelartexchange/pixelart/raw/master/belles/i/head3@4x.png)
62
- ![](https://github.com/pixelartexchange/pixelart/raw/master/belles/i/head4@4x.png)
59
+ ![](https://github.com/profilepic/text-to-image/raw/master/belles/i/head1@4x.png)
60
+ ![](https://github.com/profilepic/text-to-image/raw/master/belles/i/head2@4x.png)
61
+ ![](https://github.com/profilepic/text-to-image/raw/master/belles/i/head3@4x.png)
62
+ ![](https://github.com/profilepic/text-to-image/raw/master/belles/i/head4@4x.png)
63
63
 
64
64
 
65
65
  And so on.
@@ -71,11 +71,11 @@ And so on.
71
71
 
72
72
  ## Appendix - All Built-In Spritesheet Attributes (24x24px)
73
73
 
74
- See the [spritesheet.csv](https://github.com/pixelartexchange/pixelart/blob/master/belles/config/spritesheet.csv) dataset for all attribute names (w/ categories).
74
+ See the [spritesheet.csv](https://github.com/profilepic/text-to-image/blob/master/belles/config/spritesheet.csv) dataset for all attribute names (w/ categories).
75
75
 
76
- ![](https://github.com/pixelartexchange/pixelart/raw/master/belles/config/spritesheet.png)
76
+ ![](https://github.com/profilepic/text-to-image/raw/master/belles/config/spritesheet.png)
77
77
 
78
- (Source: [belles/spritesheet.png](https://github.com/pixelartexchange/pixelart/blob/master/belles/config/spritesheet.png))
78
+ (Source: [belles/spritesheet.png](https://github.com/profilepic/text-to-image/blob/master/belles/config/spritesheet.png))
79
79
 
80
80
 
81
81
 
@@ -83,4 +83,5 @@ See the [spritesheet.csv](https://github.com/pixelartexchange/pixelart/blob/mast
83
83
 
84
84
  ## Questions? Comments?
85
85
 
86
- Post them on the [CryptoPunksDev reddit](https://old.reddit.com/r/CryptoPunksDev). Thanks.
86
+ Post them on the [D.I.Y. Punk (Pixel) Art reddit](https://old.reddit.com/r/DIYPunkArt). Thanks.
87
+
data/Rakefile CHANGED
@@ -11,12 +11,12 @@ end
11
11
 
12
12
  Hoe.spec 'belles' do
13
13
 
14
- self.version = Belles::VERSION
14
+ self.version = Pixelart::Module::Belles::VERSION
15
15
 
16
16
  self.summary = "belles - generate your own 24×24 beau / belle pixel head images (off chain) 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 'belles' 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,8 +1,9 @@
1
1
 
2
-
2
+ module Pixelart
3
+ module Module
3
4
  module Belles
4
- MAJOR = 0
5
- MINOR = 1
5
+ MAJOR = 1
6
+ MINOR = 0
6
7
  PATCH = 0
7
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
8
9
 
@@ -18,5 +19,7 @@ module Belles
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 Belles
22
25
 
data/lib/belles.rb CHANGED
@@ -1,32 +1,43 @@
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 'belles/version' # note: let version always go first
7
+ require_relative 'belles/version' # note: let version always go first
8
8
 
9
9
 
10
- ## forward define superclass for image
11
- module Belles
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 Belle
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::Belles.root}/config/spritesheet.png",
16
+ "#{Pixelart::Module::Belles.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
29
+
17
30
 
18
- module Belles
19
31
 
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
32
+ class Image < Pixelart::Image
33
+
34
+ def self.generator
35
+ @generator ||= Artfactory.use( Belle::Sheet.builtin,
36
+ image_class: Image )
37
+ end
26
38
 
27
39
 
28
- class Image
29
- ## before callback/patch for hats
40
+ ## before callback/patch for hats
30
41
  BEFORE_PATCH = ->(img, meta) {
31
42
  ## hack for hats & hair - clip head "overflow"
32
43
  ## quick hack for headwear
@@ -45,36 +56,27 @@ module Belles
45
56
  end
46
57
  }
47
58
 
48
- def self.generate( *values, background: nil )
49
- img = Belles.generator.generate( *values,
50
- background: background,
51
- before: BEFORE_PATCH )
52
- ## note: unwrap inner image before passing on to c'tor (requires ChunkyPNG image for now)
53
- new( 24, 24, img.image )
54
- end # method Image.generate
55
- end # class Image
56
59
 
60
+ NAMES = ['belle', 'belles',
61
+ 'bella', 'bellas',
62
+ 'beau', 'beaus',
63
+ 'beaux']
64
+ DEFAULT_ATTRIBUTES = ['Head 1',
65
+ 'Shades Large Dark', 'Earring',
66
+ 'Beanie Yellow', 'Pout 1', 'Turtleneck Rust']
57
67
 
58
- class Spritesheet
59
- ## note: for now class used for "namespace" only
60
- def self.find_by( name: ) ## return archetype/attribute image by name
61
- # note: pass along name as q (query string)
62
- Belles.generator.find( name )
63
- end
64
- end # class Spritesheet
65
- ## add convenience (alternate spelling) alias - why? why not?
66
- SpriteSheet = Spritesheet
67
- Sheet = Spritesheet
68
- Sprite = Spritesheet
69
- end # module Belles
68
+ def self.generate( *names )
69
+ generator.generate( *names, before: BEFORE_PATCH )
70
+ end # method Image.generate
71
+ end # class Image
72
+
73
+ end # module Belle
70
74
 
71
75
 
72
76
  ### add some convenience shortcuts
73
- Beaux = Belles
74
- ## add singular too -why? why not?
75
- Belle = Belles
76
- Bella = Belles
77
- Beau = Belles
77
+ Beaux = Belle
78
+ Beau = Belle
79
+ Bella = Belle
78
80
 
79
81
 
80
82
  ###
@@ -83,4 +85,4 @@ include Pixelart
83
85
 
84
86
 
85
87
 
86
- puts Belles.banner # say hello
88
+ puts Pixelart::Module::Belles.banner # say hello
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: belles
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-06-05 00:00:00.000000000 Z
11
+ date: 2022-10-09 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
@@ -77,7 +77,7 @@ files:
77
77
  - config/spritesheet.png
78
78
  - lib/belles.rb
79
79
  - lib/belles/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: {}