belles 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: da844972b81280cd8ba3b095121c3db2272a7e8341bf32b75f4a060e7edf7e78
4
+ data.tar.gz: 4d69a8a2ac09a142ac600bf2ae2318a8f3e2ac2cd8f74edfcf3edbabe59f7125
5
+ SHA512:
6
+ metadata.gz: 6ea5ae9bba7aaa18e28851909627720155d6cc9ed4474349463f796602c3bfc12afbe683b9da878844b69f346793779bfc6b98e1789110d287f767fbaa08ad71
7
+ data.tar.gz: 65f5608fe23ee0faf64928a416a3a22c8eb7436770bff4671b828dbd8549409fc9758fed474f11dc961de85f47d85bb8e3791fb772384dfeed76507420b6427e
data/CHANGELOG.md ADDED
@@ -0,0 +1,3 @@
1
+ ### 0.0.1 / 2021-06-04
2
+
3
+ * Everything is new. First release
data/Manifest.txt ADDED
@@ -0,0 +1,6 @@
1
+ CHANGELOG.md
2
+ Manifest.txt
3
+ README.md
4
+ Rakefile
5
+ lib/belles.rb
6
+ lib/belles/version.rb
data/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # Beaux & Belles (Pixel Head Avatars)
2
+
3
+ belles - generate your own 24×24 beau & belle (pixel) head avatars images (off chain) from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger sizes and more
4
+
5
+
6
+
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
+ * gem :: [rubygems.org/gems/belles](https://rubygems.org/gems/belles)
10
+ * rdoc :: [rubydoc.info/gems/belles](http://rubydoc.info/gems/belles)
11
+
12
+
13
+
14
+
15
+ ## Usage
16
+
17
+ Let's generate some super-rare never-before-seen
18
+ beau & belle (pixel head avatars)...
19
+
20
+
21
+
22
+
23
+
24
+ ## Questions? Comments?
25
+
26
+ Post them on the [CryptoPunksDev reddit](https://old.reddit.com/r/CryptoPunksDev). Thanks.
data/Rakefile ADDED
@@ -0,0 +1,38 @@
1
+ require 'hoe'
2
+ require './lib/belles/version.rb'
3
+
4
+ ###
5
+ # hack/ quick fix for broken intuit_values - overwrite with dummy
6
+ class Hoe
7
+ def intuit_values( input ); end
8
+ end
9
+
10
+
11
+
12
+ Hoe.spec 'belles' do
13
+
14
+ self.version = Belles::VERSION
15
+
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
+ self.description = summary
18
+
19
+ self.urls = { home: 'https://github.com/pixelartexchange/pixelart' }
20
+
21
+ self.author = 'Gerald Bauer'
22
+ self.email = 'wwwmake@googlegroups.com'
23
+
24
+ # switch extension to .markdown for gihub formatting
25
+ self.readme_file = 'README.md'
26
+ self.history_file = 'CHANGELOG.md'
27
+
28
+ self.extra_deps = [
29
+ ['pixelart', '>= 1.3.1'],
30
+ ]
31
+
32
+ self.licenses = ['Public Domain']
33
+
34
+ self.spec_extras = {
35
+ required_ruby_version: '>= 2.3'
36
+ }
37
+
38
+ end
@@ -0,0 +1,23 @@
1
+
2
+
3
+ module Belles
4
+
5
+ MAJOR = 0
6
+ MINOR = 0
7
+ PATCH = 1
8
+ VERSION = [MAJOR,MINOR,PATCH].join('.')
9
+
10
+ def self.version
11
+ VERSION
12
+ end
13
+
14
+ def self.banner
15
+ "belles/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}] in (#{root})"
16
+ end
17
+
18
+ def self.root
19
+ File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )
20
+ end
21
+
22
+ end # module Belles
23
+
data/lib/belles.rb ADDED
@@ -0,0 +1,65 @@
1
+ ## 3rd party
2
+ require 'pixelart/base'
3
+
4
+
5
+
6
+ ## our own code
7
+ require 'belles/version' # note: let version always go first
8
+
9
+
10
+ ## forward define superclass for image
11
+ module Belles
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 Belles
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
+
27
+
28
+ class Image
29
+ def self.generate( *values, background: nil )
30
+ img = Belles.generator.generate( *values, background: background )
31
+ ## note: unwrap inner image before passing on to c'tor (requires ChunkyPNG image for now)
32
+ new( 24, 24, img.image )
33
+ end # method Image.generate
34
+ end # class Image
35
+
36
+
37
+ class Spritesheet
38
+ ## note: for now class used for "namespace" only
39
+ def self.find_by( name: ) ## return archetype/attribute image by name
40
+ # note: pass along name as q (query string)
41
+ Belles.generator.find( name )
42
+ end
43
+ end # class Spritesheet
44
+ ## add convenience (alternate spelling) alias - why? why not?
45
+ SpriteSheet = Spritesheet
46
+ Sheet = Spritesheet
47
+ Sprite = Spritesheet
48
+ end # module Belles
49
+
50
+
51
+ ### add some convenience shortcuts
52
+ Beaux = Belles
53
+ ## add singular too -why? why not?
54
+ Belle = Belles
55
+ Bella = Belles
56
+ Beau = Belles
57
+
58
+
59
+ ###
60
+ # note: for convenience auto include Pixelart namespace!!! - why? why not?
61
+ include Pixelart
62
+
63
+
64
+
65
+ puts Belles.banner # say hello
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: belles
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Gerald Bauer
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-06-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pixelart
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 1.3.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 1.3.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: rdoc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '4.0'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '7'
37
+ type: :development
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '4.0'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '7'
47
+ - !ruby/object:Gem::Dependency
48
+ name: hoe
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.23'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.23'
61
+ description: belles - generate your own 24×24 beau / belle pixel head images (off
62
+ chain) from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for
63
+ bigger sizes and more
64
+ email: wwwmake@googlegroups.com
65
+ executables: []
66
+ extensions: []
67
+ extra_rdoc_files:
68
+ - CHANGELOG.md
69
+ - Manifest.txt
70
+ - README.md
71
+ files:
72
+ - CHANGELOG.md
73
+ - Manifest.txt
74
+ - README.md
75
+ - Rakefile
76
+ - lib/belles.rb
77
+ - lib/belles/version.rb
78
+ homepage: https://github.com/pixelartexchange/pixelart
79
+ licenses:
80
+ - Public Domain
81
+ metadata: {}
82
+ post_install_message:
83
+ rdoc_options:
84
+ - "--main"
85
+ - README.md
86
+ require_paths:
87
+ - lib
88
+ required_ruby_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '2.3'
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ requirements: []
99
+ rubygems_version: 3.3.7
100
+ signing_key:
101
+ specification_version: 4
102
+ summary: belles - generate your own 24×24 beau / belle pixel head images (off chain)
103
+ from text attributes (via built-in spritesheet); incl. 2x/4x/8x zoom for bigger
104
+ sizes and more
105
+ test_files: []