profilepic 0.1.2 → 0.1.3

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: b4cb3b184f5c14e2e509c873de59631a56687492ea6dc3a20c33c9dd261ca9c1
4
- data.tar.gz: 85204077ae0502dd27e3ccaa15fa94f2afe539c2bad6e0f23f8602b053be6732
3
+ metadata.gz: 2ffc9a8e667f60136de35f02afcf76ffe1726b987630b06e5476f8319fc1389c
4
+ data.tar.gz: 35358297cc5182a6af8a7b83d1abdbfa9826e16f2dd5a20937e4162f1961042e
5
5
  SHA512:
6
- metadata.gz: 85dacbe04ffc88a2e0b72197d48c4f33c4019926ae76eddaa523ca898b86442bdb0d7ba3d96ae18f43a57792b1a4132614fb0518fa91d051c5074b124b370b4d
7
- data.tar.gz: 0a0f9eefccd51a8d367482a26dd1fc335c1041d1a073aafb14c71e0262fd570f68188f734d00755c2579806a6c30b18d3fe8b871227a9d23200facab299f124b
6
+ metadata.gz: 35f8b682f2fe4985c47a5e34d3f1b711b4657e137bc324635b79e16e7fb7a63381dfc6f352f24ecf5236f821aedf0457357bf47a8fc1719f30d2359e563062d5
7
+ data.tar.gz: 36f6275b5c5fee241f489dc7f19206d786fe4204611a0bea83ff77c232ef77fc8cce0b9913b1e9799a3f96df4f041e338636f0e777bdd493397803ec08e3c2dd
data/Manifest.txt CHANGED
@@ -14,3 +14,4 @@ lib/profilepic/views/layout.erb
14
14
  lib/profilepic/views/marcs.erb
15
15
  lib/profilepic/views/shared/_more_options.erb
16
16
  lib/profilepic/views/shared/_version.erb
17
+ lib/profilepic/views/yeoldepunks.erb
@@ -83,6 +83,48 @@ class ImageReq ## (Generate) Image Request
83
83
  end
84
84
 
85
85
 
86
+ def self.build_yeoldepunk( params )
87
+ puts "==> image request params:"
88
+ pp params
89
+
90
+ name = 'yeoldepunk'
91
+ archetype = _norm_key( params[:t] || 'male 3' )
92
+
93
+ hair = _norm_key( params[:hair] || 'none' )
94
+ beard = _norm_key( params[:beard] || 'none' )
95
+ eyes = _norm_key( params[:eyes] || 'none' )
96
+ eyewear = _norm_key( params[:eyewear] || 'none' )
97
+ blemish = _norm_key( params[:blemish] || 'none' )
98
+ nose = _norm_key( params[:nose] || 'none' )
99
+ mouth = _norm_key( params[:mouth] || 'none' )
100
+ mouthprop = _norm_key( params[:mouthprop] || 'none' )
101
+ earring = _norm_key( params[:earring] || 'none' )
102
+ headwear = _norm_key( params[:headwear] || 'none' )
103
+ neck = _norm_key( params[:neck] || 'none' )
104
+
105
+ zoom = _parse_zoom( params[:z] || '1' )
106
+ background = _norm_key( params[:bg] || 'none' )
107
+
108
+ attributes = [archetype]
109
+ attributes << hair if hair != 'none'
110
+ attributes << blemish if blemish != 'none'
111
+ attributes << beard if beard != 'none'
112
+ attributes << eyes if eyes != 'none'
113
+ attributes << eyewear if eyewear != 'none'
114
+ attributes << nose if nose != 'none'
115
+ attributes << mouth if mouth != 'none'
116
+ attributes << mouthprop if mouthprop != 'none'
117
+ attributes << earring if earring != 'none'
118
+ attributes << headwear if headwear != 'none'
119
+ attributes << neck if neck != 'none'
120
+
121
+ new( name: name,
122
+ attributes: attributes,
123
+ zoom: zoom,
124
+ background: background )
125
+ end
126
+
127
+
86
128
 
87
129
  attr_reader :name,
88
130
  :attributes,
@@ -15,6 +15,7 @@ TXT
15
15
  options.each_with_index do |option,i|
16
16
 
17
17
  value = option.downcase
18
+ value = value.sub( '(m)', '' ).sub( '(f)', '' ).sub( '(m/f)', '' ).sub( '¹', '' )
18
19
  label = option
19
20
 
20
21
  buf += <<TXT
@@ -31,6 +32,148 @@ buf
31
32
  end
32
33
 
33
34
 
35
+ YEOLDEPUNK_ARCHETYPE = [
36
+ 'Male 1',
37
+ 'Male 2',
38
+ 'Male 3',
39
+ 'Male 4',
40
+ 'Female 1',
41
+ 'Female 2',
42
+ 'Female 3',
43
+ 'Female 4',
44
+ 'Zombie',
45
+ 'Ape',
46
+ 'Alien',
47
+ ]
48
+
49
+
50
+ YEOLDEPUNK_HAIR = [
51
+ 'Shaved Head (m)',
52
+ 'Peak Spike (m)',
53
+ 'Vampire Hair (m)',
54
+ 'Purple Hair (m)',
55
+
56
+ 'Mohawk (m/f)',
57
+ 'Mohawk Dark (m/f)',
58
+ 'Mohawk Thin (m/f)',
59
+ 'Wild Hair (m/f)',
60
+ 'Crazy Hair (m/f)',
61
+ 'Messy Hair (m/f)',
62
+ 'Frumpy Hair (m/f)',
63
+ 'Stringy Hair (m/f)',
64
+ 'Clown Hair Green (m/f)',
65
+
66
+ 'Straight Hair (f)',
67
+ 'Straight Hair Dark (f)',
68
+ 'Straight Hair Blonde (f)',
69
+ 'Blonde Short (f)',
70
+ 'Blonde Bob (f)',
71
+ 'Wild Blonde (f)',
72
+ 'Wild White Hair (f)',
73
+ 'Orange Side (f)',
74
+ 'Dark Hair (f)',
75
+ 'Pigtails (f)',
76
+ 'Pink With Hat¹ (f)',
77
+ 'Half Shaved (f)',
78
+ 'Red Mohawk (f)',
79
+ ]
80
+
81
+ YEOLDEPUNK_BEARD = [
82
+ 'Shadow Beard (m)',
83
+ 'Normal Beard (m)',
84
+ 'Normal Beard Black (m)',
85
+ 'Big Beard (m)',
86
+ 'Luxurious Beard (m)',
87
+ 'Mustache (m)',
88
+ 'Goat (m)',
89
+ 'Handlebars (m)',
90
+ 'Front Beard (m)',
91
+ 'Front Beard Dark (m)',
92
+ 'Chinstrap (m)',
93
+ 'Muttonchops (m)',
94
+ ]
95
+
96
+ YEOLDEPUNK_EYEWEAR = [
97
+ 'Small Shades (m)',
98
+ 'Regular Shades (m/f)',
99
+ 'Classic Shades (m/f)',
100
+ 'Big Shades (m/f)',
101
+ 'Nerd Glasses (m/f)',
102
+ 'Horned Rim Glasses (m/f)',
103
+ '3D Glasses (m/f)',
104
+ 'VR (m/f)',
105
+ 'Eye Mask (m/f)',
106
+ 'Eye Patch (m/f)',
107
+ 'Welding Goggles (f)',
108
+ ]
109
+
110
+ YEOLDEPUNK_EARRING = [
111
+ 'Earring (m/f)'
112
+ ]
113
+
114
+
115
+ YEOLDEPUNK_HEADWEAR = [
116
+ 'Cowboy Hat (m)',
117
+ 'Fedora (m)',
118
+ 'Hoodie (m)',
119
+ 'Beanie (m)',
120
+ 'Top Hat (m)',
121
+ 'Do-rag (m)',
122
+ 'Police Cap (m)',
123
+ 'Cap Forward (m)',
124
+ 'Cap (m/f)',
125
+ 'Knitted Cap (m/f)',
126
+ 'Bandana (m/f)',
127
+ 'Headband¹ (m/f)',
128
+ 'Pilot Helmet (f)',
129
+ 'Tassle Hat (f)',
130
+ 'Tiara (f)',
131
+ ]
132
+
133
+ YEOLDEPUNK_EYES = [
134
+ 'Clown Eyes Green (m/f)',
135
+ 'Clown Eyes Blue (m/f)',
136
+ 'Green Eye Shadow (f)',
137
+ 'Blue Eye Shadow (f)',
138
+ 'Purple Eye Shadow (f)',
139
+ ]
140
+
141
+ YEOLDEPUNK_MOUTH = [
142
+ 'Smile (m)',
143
+ 'Frown (m)',
144
+ 'Buck Teeth (m)',
145
+ 'Hot Lipstick (f)',
146
+ 'Black Lipstick (f)',
147
+ 'Purple Lipstick (f)',
148
+ ]
149
+
150
+
151
+ YEOLDEPUNK_MOUTH_PROP = [
152
+ 'Cigarette (m/f)',
153
+ 'Vape (m/f)',
154
+ 'Pipe (m/f)',
155
+ 'Medical Mask (m/f)',
156
+ ]
157
+
158
+ YEOLDEPUNK_NECK = [
159
+ 'Silver Chain (m/f)',
160
+ 'Gold Chain (m/f)',
161
+ 'Choker (f)',
162
+ ]
163
+
164
+ YEOLDEPUNK_BLEMISH = [
165
+ 'Mole (m/f)',
166
+ 'Spots (m/f)',
167
+ 'Rosy Cheeks (m/f)',
168
+ ]
169
+
170
+ YEOLDEPUNK_NOSE = [
171
+ 'Clown Nose (m/f)',
172
+ ]
173
+
174
+
175
+
176
+
34
177
  DOGE_ARCHETYPE = [
35
178
  'Classic',
36
179
  'Dark',
@@ -227,6 +370,12 @@ HTML
227
370
  erb :doge
228
371
  end
229
372
 
373
+ get '/yeoldepunks' do
374
+ erb :yeoldepunks
375
+ end
376
+
377
+
378
+
230
379
 
231
380
  get '/generate_marcs' do
232
381
 
@@ -239,6 +388,17 @@ HTML
239
388
  redirect "/#{r.image_key}.png"
240
389
  end
241
390
 
391
+ get '/generate_yeoldepunks' do
392
+
393
+ r = ImageReq.build_yeoldepunk( params )
394
+
395
+ img = r.image
396
+
397
+ blob = img.image.to_blob
398
+ IMAGES[ r.image_key ] = blob
399
+ redirect "/#{r.image_key}.png"
400
+ end
401
+
242
402
 
243
403
  get '/generate_doge' do
244
404
 
@@ -3,7 +3,7 @@
3
3
  module Profilepic
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- PATCH = 2
6
+ PATCH = 3
7
7
  VERSION = [MAJOR,MINOR,PATCH].join('.')
8
8
 
9
9
  def self.version
@@ -51,6 +51,8 @@ own 100% forever.
51
51
  <div>
52
52
  <input type="radio" id="t6" name="t" value="yeoldepunk">
53
53
  <label for="t6">Matt &amp; John's® Ye Olde' Punk V1/V2 (Anno 2017) (24×24)</label>
54
+ ... or try the <b><a href="/yeoldepunks">Matt &amp; John's® Ye Olde' Punk V1/V2 (Anno 2017) Wizard »</a></b>
55
+
54
56
  </div>
55
57
 
56
58
 
@@ -0,0 +1,91 @@
1
+ <p style="font-size: 80%;">
2
+ <a href="/">« Profile Pic(ture) As A Service</a>
3
+ </p>
4
+
5
+
6
+
7
+ <h1>Design Your Own Matt &amp; John's® Ye Olde' Punk (Anno 2017) (24×24) Wizard</h1>
8
+
9
+ <p>Yes, you can!
10
+ Generate your own originals that you
11
+ own 100% forever.
12
+ </p>
13
+
14
+
15
+
16
+ <form action="/generate_yeoldepunks" method="get" id="form1">
17
+
18
+
19
+ <%= radio_options( YEOLDEPUNK_ARCHETYPE,
20
+ name: 't',
21
+ legend: "Select a ye olde' punk base (archetype)" ) %>
22
+
23
+ Options:
24
+
25
+ <%= radio_options( ['None']+YEOLDEPUNK_HAIR,
26
+ name: 'hair',
27
+ legend: 'Select hair' ) %>
28
+
29
+ ¹: Note: Pink With Hat is a hair+headwear combo.
30
+
31
+ <%= radio_options( ['None']+YEOLDEPUNK_BEARD,
32
+ name: 'beard',
33
+ legend: 'Select beard' ) %>
34
+
35
+ <%= radio_options( ['None']+YEOLDEPUNK_EYES,
36
+ name: 'eyes',
37
+ legend: 'Select eyes (make-up)' ) %>
38
+
39
+
40
+
41
+ <%= radio_options( ['None']+YEOLDEPUNK_EYEWEAR,
42
+ name: 'eyewear',
43
+ legend: 'Select eyewear' ) %>
44
+
45
+
46
+ <%= radio_options( ['None']+YEOLDEPUNK_NOSE,
47
+ name: 'nose',
48
+ legend: 'Select nose accessory' ) %>
49
+
50
+ <%= radio_options( ['None']+YEOLDEPUNK_BLEMISH,
51
+ name: 'blemish',
52
+ legend: 'Select blemish' ) %>
53
+
54
+
55
+ <%= radio_options( ['None']+YEOLDEPUNK_MOUTH,
56
+ name: 'mouth',
57
+ legend: 'Select mouth expression / lipstick make-up' ) %>
58
+
59
+
60
+ <%= radio_options( ['None']+YEOLDEPUNK_MOUTH_PROP,
61
+ name: 'mouthprop',
62
+ legend: 'Select mouth prop' ) %>
63
+
64
+
65
+ <%= radio_options( ['None']+YEOLDEPUNK_EARRING,
66
+ name: 'earring',
67
+ legend: 'Select earring' ) %>
68
+
69
+
70
+ <%= radio_options( ['None']+YEOLDEPUNK_HEADWEAR,
71
+ name: 'headwear',
72
+ legend: 'Select headwear' ) %>
73
+
74
+ ¹: Note: Headband (f) is a (black) hair+headwear combo.
75
+
76
+
77
+ <%= radio_options( ['None']+YEOLDEPUNK_NECK,
78
+ name: 'neck',
79
+ legend: 'Select neck accessory' ) %>
80
+
81
+
82
+ <div>
83
+ <button type="submit" form="form1" value="Submit"
84
+ style="font-size: 400%; color: white; background-color: blue;">Generate Profile Pic(ture) in .PNG Format</button>
85
+ </div>
86
+
87
+
88
+
89
+ <%= erb :'shared/_more_options' %>
90
+
91
+ </form>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: profilepic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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-08-05 00:00:00.000000000 Z
11
+ date: 2022-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: originals
@@ -112,6 +112,7 @@ files:
112
112
  - lib/profilepic/views/marcs.erb
113
113
  - lib/profilepic/views/shared/_more_options.erb
114
114
  - lib/profilepic/views/shared/_version.erb
115
+ - lib/profilepic/views/yeoldepunks.erb
115
116
  homepage: https://github.com/profilepic/profilepic
116
117
  licenses:
117
118
  - Public Domain