diff --git a/more/3dphunks/cache/README.md b/more/3dphunks/cache/README.md
index e240301..073fdb2 100644
--- a/more/3dphunks/cache/README.md
+++ b/more/3dphunks/cache/README.md
@@ -1,5 +1,9 @@
# Layers in /3dphunks
+By image format (mime type):
+- image/png _(80)_
+
+
**0** - Alien · Ape · Female · Male · Zombie · Empty _(6)_


diff --git a/more/3dskulls/cache/README.md b/more/3dskulls/cache/README.md
index 010b446..89d0f85 100644
--- a/more/3dskulls/cache/README.md
+++ b/more/3dskulls/cache/README.md
@@ -1,5 +1,9 @@
# Layers in /3dskulls
+By image format (mime type):
+- image/png _(81)_
+
+
**0** - Brain Blast · Plaid Balaclava · Smol Nerdy · SM Mask · Undead Adams · Vitalik In 200 Years · Blank _(7)_


diff --git a/more/cherrynouns/cache/README.md b/more/cherrynouns/cache/README.md
index 95c86a7..e1d4255 100644
--- a/more/cherrynouns/cache/README.md
+++ b/more/cherrynouns/cache/README.md
@@ -1,5 +1,9 @@
# Layers in /cherrynouns
+By image format (mime type):
+- image/png _(112)_
+
+
**0** - Accessory Body Gradient Dawn · Accessory Body Gradient Checkerdisco · Accessory Bling Scissors · Accessory Bling Sparkles · Accessory Bling Rings · Accessory Bling Mask · Accessory Bling Love · Accessory Bling Gold Ingot · Accessory Bling Cheese · Accessory Bling Arrow · Accessory Bling Anchor · Accessory Bling Anvil · Accessory Bird Side · Accessory Bird Flying · Accessory Belly Chameleon · Accessory Axe · Accessory Decay Pride · Accessory Aardvark · Accessory 1 N · Accessory Cow · Accessory Decay Gray Dark · Accessory Collar Sunset · Accessory Clover · Accessory Cloud · Accessory Chicken · Accessory Checkers Magenta 80 · Accessory Checkers Blue · Accessory Checkers Black · Accessory Checkers Big Green · Accessory Checkers Big Red Cold · Accessory Checker Spaced White · Accessory Checker Vibrant · Accessory Checker Spaced Black · Accessory Checker RGB · Accessory Checker Bigwalk Rainbow · Accessory Checker Bigwalk Greylight · Accessory Checker Bigwalk Blue Prime · Accessory Chain Logo · Accessory Carrot · Accessory Body Gradient Sunset · Accessory Body Gradient Redpink · Accessory Body Gradient Pride · Accessory Body Gradient Ice · Accessory Body Gradient Glacier · Accessory Body Gradient Dusk _(45)_


diff --git a/more/chimps/cache/README.md b/more/chimps/cache/README.md
index 12b5b0d..ea32ba6 100644
--- a/more/chimps/cache/README.md
+++ b/more/chimps/cache/README.md
@@ -1,5 +1,9 @@
# Layers in /chimps
+By image format (mime type):
+- image/png _(223)_
+
+
**0** - Dumpchimp · Edgyhodgychimps · Pepechimps · Teddychimps · Chimp Dogg · Chimptacus · Blank _(7)_


diff --git a/more/death/cache/README.md b/more/death/cache/README.md
index 71f697a..8bc5916 100644
--- a/more/death/cache/README.md
+++ b/more/death/cache/README.md
@@ -1,6 +1,10 @@
# Layers in /death
-**0** - Light Brew · Flamingo Horde · Dark Brew · Curses · Quit Trippin · For The Homies · Messy Death · Float Away · Pinky Out · Prickly Pal · Unlock Life · Yo Yo Ma · Long Game · Death Metal · Dandy · Cool Prickly Pal · Your Time · Death Rider · Sherlock · Final Wish · Smokin Death · Roses Are Red · Happy Boy · Messing Around · Messing About · Pizza Party · Birds Of A Feather · Smokin Flamingo · Polly Want A Cracker · Bloody Mess · I Scream · Slow Death · Very Slow Death · Vulture Chillin · Left Handed · Right Handed · Gripped up · Who · Down Town _(39)_
+By image format (mime type):
+- image/png _(121)_
+
+
+**0** - Light Brew · Flamingo Horde · Dark Brew · Curses · Quit Trippin · For The Homies · Messy Death · Float Away · Pinky Out · Prickly Pal · Unlock Life · Yo Yo Ma · Long Game · Death Metal · Dandy · Cool Prickly Pal · Your Time · Death Rider · Sherlock · Final Wish · Smokin Death · Roses Are Red · Happy Boy · Messing Around · Messing About · Pizza Party · Birds Of A Feather · Smokin Flamingo · Polly Want A Cracker · Bloody Mess · I Scream, You Scream · Slow Death · Very Slow Death · Vulture Chillin · Left Handed · Right Handed · Gripped up · Who, Me? · Down Town _(39)_



@@ -31,14 +35,14 @@



-
+






-
+

diff --git a/more/death/cache/layers.csv b/more/death/cache/layers.csv
index c845a6b..d4009d4 100644
--- a/more/death/cache/layers.csv
+++ b/more/death/cache/layers.csv
@@ -29,14 +29,14 @@ index, name, type, hide
0/27, Smokin Flamingo, image/png, false
0/28, Polly Want A Cracker, image/png, false
0/29, Bloody Mess, image/png, false
-0/30, I Scream, You Scream, image/png, false
+0/30, "I Scream, You Scream", image/png, false
0/31, Slow Death, image/png, false
0/32, Very Slow Death, image/png, false
0/33, Vulture Chillin, image/png, false
0/34, Left Handed, image/png, false
0/35, Right Handed, image/png, false
0/36, Gripped up, image/png, false
-0/37, Who, Me?, image/png, false
+0/37, "Who, Me?", image/png, false
0/38, Down Town, image/png, false
1/0, Killer Clown, image/png, false
1/1, Flip Your Lid Skull, image/png, false
diff --git a/more/dickbutts/cache/README.md b/more/dickbutts/cache/README.md
index 5da71e6..2f94399 100644
--- a/more/dickbutts/cache/README.md
+++ b/more/dickbutts/cache/README.md
@@ -1,5 +1,9 @@
# Layers in /dickbutts
+By image format (mime type):
+- image/png _(101)_
+
+
**0** - Trident · Lollipop · Spiked Club · Gavel · Boxing Glove · None _(6)_


diff --git a/more/dosphunks/cache/README.md b/more/dosphunks/cache/README.md
index ed74b47..06c5dd9 100644
--- a/more/dosphunks/cache/README.md
+++ b/more/dosphunks/cache/README.md
@@ -1,5 +1,9 @@
# Layers in /dosphunks
+By image format (mime type):
+- image/png _(82)_
+
+
**0** - Clown Nose · None _(2)_


diff --git a/more/gatekeepers/cache/README.md b/more/gatekeepers/cache/README.md
index 65968ac..cf7425d 100644
--- a/more/gatekeepers/cache/README.md
+++ b/more/gatekeepers/cache/README.md
@@ -1,5 +1,9 @@
# Layers in /gatekeepers
+By image format (mime type):
+- image/png _(226)_
+
+
**0** - Scout · Juggernaut Omega · Juggernaut · Infantry · Spec Ops · Heavy Assault · Demolitions · APE BOT · Phunk-3PO · Skelly BOT · Phender · Light Assault · Terminator · None _(14)_


diff --git a/more/grimmers/cache/README.md b/more/grimmers/cache/README.md
index 3e0e076..34af6e9 100644
--- a/more/grimmers/cache/README.md
+++ b/more/grimmers/cache/README.md
@@ -1,5 +1,9 @@
# Layers in /grimmers
+By image format (mime type):
+- image/png _(73)_
+
+
**0** - Haha · Hidden _(2)_


diff --git a/more/kevin/cache/README.md b/more/kevin/cache/README.md
index 0a563d5..393b886 100644
--- a/more/kevin/cache/README.md
+++ b/more/kevin/cache/README.md
@@ -1,5 +1,10 @@
# Layers in /kevin
+By image format (mime type):
+- image/gif _(35)_
+- image/png _(63)_
+
+
**0** - Gold Crazy · Pink Crazy · Blue Crazy · Gold · Pink · Blue · None _(7)_


diff --git a/more/madmasks/cache/README.md b/more/madmasks/cache/README.md
index 2484691..77a5ab3 100644
--- a/more/madmasks/cache/README.md
+++ b/more/madmasks/cache/README.md
@@ -1,5 +1,9 @@
# Layers in /madmasks
+By image format (mime type):
+- image/png _(151)_
+
+
**0** - Mega Minister · Mega Masker · Mega Mage · Mega Magistrate · Mega Mapper · Mega Matchmaker · Mega Medic · Mega Machinist · Mega Member · Mega Mercenary · Mega Merchant · Mega Miner · None _(13)_


diff --git a/more/people/cache/README.md b/more/people/cache/README.md
index 66a8362..3dcbf37 100644
--- a/more/people/cache/README.md
+++ b/more/people/cache/README.md
@@ -1,5 +1,10 @@
# Layers in /people
+By image format (mime type):
+- image/gif _(17)_
+- image/png _(104)_
+
+
**0** - Banana Time · Dark Side · Junior · War Mech · The Champion · The Secretary · Village Hero · none _(8)_


diff --git a/more/pepes/cache/README.md b/more/pepes/cache/README.md
index ef23be9..2e86549 100644
--- a/more/pepes/cache/README.md
+++ b/more/pepes/cache/README.md
@@ -1,5 +1,9 @@
# Layers in /pepes
+By image format (mime type):
+- image/png _(121)_
+
+
**0** - Coffe Golden · Blood · Chia Sprouts · Drool · Rainbow · Joint · Bowtie Red · Caesar · Cigarette · Cozy · Pipe · Vape Menthol · Vape Tobacco · Wizard · Coffee Red · Coffee White · None _(17)_


diff --git a/more/pepitos/cache/README.md b/more/pepitos/cache/README.md
index a581586..1207384 100644
--- a/more/pepitos/cache/README.md
+++ b/more/pepitos/cache/README.md
@@ -1,5 +1,9 @@
# Layers in /pepitos
+By image format (mime type):
+- image/png _(71)_
+
+
**0** - Bubble Gum · No Trait 2 _(2)_


diff --git a/more/skulls/cache/README.md b/more/skulls/cache/README.md
index 4656917..be0c966 100644
--- a/more/skulls/cache/README.md
+++ b/more/skulls/cache/README.md
@@ -1,5 +1,10 @@
# Layers in /skulls
+By image format (mime type):
+- image/png _(564)_
+- image/gif _(84)_
+
+
**0** - 901d3n f24m3 · h11151d3 · 58f c493 · 574mp · 4n73nn4 · 23d 5n3k · d21nk · uf0 · f123 82347h · 8u88139um · p4c1f132 · w1173d 2053 · w15p p1nk · c248 · cupc4k3 · 9233n 5n3k · p1224 · c1942 · 20285 · h3d93h09 · 310n704d · 3427h m00n · c19423773 · 71ny d1n0 69 1337 · w15p 23d · 9m 70p · ch1ck3n · 5umm32.jp9 · 7h3 ch1p · p3n9u1n · 81805 · w15p 81u3 · d0m 2053 · 5m0k30u7 · ch0c01473 · 8100d · 71ny d1n0 1337 · 511m3 · ch3353 · n4n0 7h3 9uy 54y wh47 · kn1f3 · 241n80w · 0xm0n · w15p · 71ny d1n0 69 · 9m · ch355812dy · n4n0 7h3 9uy · 7h233 f1135 · 5p42k13 · n19h7m00n · f04m · n0n3 _(53)_


diff --git a/more/smiley/cache/README.md b/more/smiley/cache/README.md
index 11563c0..92596be 100644
--- a/more/smiley/cache/README.md
+++ b/more/smiley/cache/README.md
@@ -1,5 +1,10 @@
# Layers in /smiley
+By image format (mime type):
+- image/png _(39)_
+- image/gif _(19)_
+
+
**0** - Clown · nose nose · round · long · snub _(5)_


@@ -60,9 +65,9 @@

-**5** - · · none _(3)_
-
-
+**5** - #1 · #2 · none _(3)_
+
+

diff --git a/more/smiley/cache/layers.csv b/more/smiley/cache/layers.csv
index d8a39e7..c41c792 100644
--- a/more/smiley/cache/layers.csv
+++ b/more/smiley/cache/layers.csv
@@ -44,8 +44,8 @@ index, name, type, hide
4/4, Squish, image/png, false
4/5, stripey, image/png, false
4/6, Smiley , image/png, false
-5/0, #1, image/png, false
-5/1, #2, image/png, false
+5/0, "#1", image/png, false
+5/1, "#2", image/png, false
5/2, none, image/png, false
6/0, sun rays, image/gif, false
6/1, glitch, image/gif, false
diff --git a/more/teddies/cache/README.md b/more/teddies/cache/README.md
index 8cdf256..ed21627 100644
--- a/more/teddies/cache/README.md
+++ b/more/teddies/cache/README.md
@@ -1,5 +1,9 @@
# Layers in /teddies
+By image format (mime type):
+- image/png _(94)_
+
+
**0** - Nouns Glasses · C Form · Blue · Green · 3D Glasses · Eye Mask · VR · Small Shades · Eye Patch · Classic Shades · Regular Shades · Horn Rim Glasses · Big Shades · Nerd Glasses · Black _(15)_


diff --git a/more/women/cache/README.md b/more/women/cache/README.md
new file mode 100644
index 0000000..ffd3542
--- /dev/null
+++ b/more/women/cache/README.md
@@ -0,0 +1,197 @@
+# Layers in /women
+
+By image format (mime type):
+- image/png _(146)_
+
+
+**0** - Designer Frane #3 · Designer Frame #2 · Designer Frame #1 · Noir Frame · Simple Frame · Red Frame · pink and blue frame · Gingham frame · Four color frame _(9)_
+
+
+
+
+
+
+
+
+
+
+
+**1** - Blue puffer · Sweater over-the-shoulders · Pinstripe vest · Red scarf · None _(5)_
+
+
+
+
+
+
+
+**2** - purple and pink chain · Cross OnChainChain · Ruby OnChainChain · Purple OnchainChain · none _(5)_
+
+
+
+
+
+
+
+**3** - Designer Beret · Blue beret · Black hat · orange beanie · Red Beret · Red and Blue hat · none _(7)_
+
+
+
+
+
+
+
+
+
+**4** - red studs · black studs · Large square studs · Gold hoops · Pink flower studs · none _(6)_
+
+
+
+
+
+
+
+
+**5** - black and grey bangle · pink bangles · gold bangle · none _(4)_
+
+
+
+
+
+
+**6** - black cross bangle · pink bangle · yellow bangles · red cross bangle · black bangle · none _(6)_
+
+
+
+
+
+
+
+
+**7** - Gocci · Glitterati · puffy sleeve T · candy cane T · Floral T · Pink smiley T · Sunny T · Chenal T · Sad Heart Club T · Heart T · Space suit · Catsuit · Yellow Disco Jumpsuit · OnChain hoodie · Pride T · Designer outfit #1 · Designer outfit #2 · OnChain T · OnChain crop top · Off-the-shoulder T · checkered T · color stripes · Confetti T · Retro stripes · Rose T · Grey Daisy T · Classic White T · Pink checkers · Black designer turtleneck · GM tank · Yellow Retro · I love NY T · Red Knit T · Blue stripes _(34)_
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**8** - green and blue eyes · Green eyes · Hazel eyes · Blue eyes · Grey eyes · Dark brown eyes _(6)_
+
+
+
+
+
+
+
+
+**9** - Tongue out + pill · Tongue out · Red sad · OMG red · OMG blue · small black · yellow pout · black pout · small red · blue pout · red pout · wine pout · pink pout · small orange · small black _(15)_
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**10** - mole · nosering · freckles · red blush · pink blush · none _(6)_
+
+
+
+
+
+
+
+
+**11** - Designer VR glasses · ski glasses · red and green sunnies · Designer sunnies · big black glasses · big glasses · 3D glasses · white sunnies · none · Red Daisy Sunnies · Grey Sunnies · Black Sunnies _(12)_
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**12** - Fire hair · Space buns · Big red · Purple tips · Long grey · Blue mullet · asymmetrical haircut · Long blonde pigtails · orange pixie · Orange mid-length · Curly black · Black short bob · Long brown · blond short bob · Long blonde · Pink bob · Brown curly bob · Purple highlights _(18)_
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**13** - tan + long nose · dark + round nose · tan + round nose · fair + round nose · fair + long nose · medium + round nose · medium + long nose · fair + snub nose · dark + snub nose · tan + snub nose · dark + long nose · medium + snub nose _(12)_
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+**14** - e blue _(1)_
+
+
+
diff --git a/more/women/cache/layers.csv b/more/women/cache/layers.csv
index a7dcddc..5030000 100644
--- a/more/women/cache/layers.csv
+++ b/more/women/cache/layers.csv
@@ -1,7 +1,7 @@
index, name, type, hide
-0/0, Designer Frane #3, image/png, false
-0/1, Designer Frame #2, image/png, false
-0/2, Designer Frame #1, image/png, false
+0/0, "Designer Frane #3", image/png, false
+0/1, "Designer Frame #2", image/png, false
+0/2, "Designer Frame #1", image/png, false
0/3, Noir Frame, image/png, false
0/4, Simple Frame, image/png, false
0/5, Red Frame, image/png, false
@@ -56,8 +56,8 @@ index, name, type, hide
7/12, Yellow Disco Jumpsuit, image/png, false
7/13, OnChain hoodie, image/png, false
7/14, Pride T, image/png, false
-7/15, Designer outfit #1, image/png, false
-7/16, Designer outfit #2, image/png, false
+7/15, "Designer outfit #1", image/png, false
+7/16, "Designer outfit #2", image/png, false
7/17, OnChain T, image/png, false
7/18, OnChain crop top, image/png, false
7/19, Off-the-shoulder T, image/png, false
diff --git a/sandbox/layers.rb b/sandbox/layers.rb
index c477ddd..68cee77 100644
--- a/sandbox/layers.rb
+++ b/sandbox/layers.rb
@@ -6,75 +6,134 @@
require 'cocos'
-collections = %w[
- 3dphunks
- 3dskulls
- cherrynouns
- chimps
- death
- dickbutts
- dosphunks
- gatekeepers
- grimmers
- kevin
- madmasks
- people
- pepes
- pepitos
- skulls
- smiley
- teddies]
-
-collections.each do |collection|
- puts "==> #{collection}..."
+##
+## note: fix csv format:
+## in death/layers.csv (comma requires quotes!!)
+## - 0/30, "I Scream, You Scream", image/png, false
+## - 0/37, "Who, Me?"", image/png, false
+## in smiley/layers.csv (hash-mark requires quotes!!!)
+## - 5/0, "#1", image/png, false
+## - 5/1, "#2", image/png, false
+## in women/layers.csv
+## - 0/0, Designer Frane #3, image/png, false
+## - 0/1, Designer Frame #2, image/png, false
+## - 0/2, Designer Frame #1, image/png, false
+## - 7/15, Designer outfit #1, image/png, false
+## - 7/16, Designer outfit #2, image/png, false
+
+
+class LayersCache ## todo: find a different name - why? why not?
+
+ attr_reader :layers
+
+ def initialize( basedir )
+ @basedir = basedir
+ _read_meta
+ end
+ def _read_meta
+ recs = read_csv( "#{@basedir}/layers.csv" )
+ puts " #{recs.size} record(s) in layers"
- basedir = "more/#{collection}/cache"
- recs = read_csv( "#{basedir}/layers.csv" )
- puts " #{recs.size} record(s) in layers"
+ ## use integer-keyed hashes for now - why? why not?
+ @formats = Hash.new( 0 )
+ ## e.g. image/png
+ ## image/gif
+ ##
- ## use integer-keyed hashes for now - why? why not?
- layers = {}
+ ## todo/check - change to nested array (from nested hash) - why? why not?
+ @layers = {}
- recs.each do |rec|
+ recs.each do |rec|
name = rec['name']
+ type = rec['type']
n,m = rec['index'].split('/').map { |str| str.strip.to_i }
- layer = layers[n] ||= {}
+ extension = case type
+ when 'image/png' then 'png'
+ when 'image/gif' then 'gif'
+ ## add svg !!
+ else
+ pp rec
+ raise ArgumentError, "unsupported image type: #{type} in >#{@basedir}<"
+ end
+
+ @formats[ type ] += 1
+ layer = @layers[n] ||= {}
### quick & dirty hack - find a better way!!!
- paths = Dir.glob( "#{basedir}/#{n}_#{m}.*" )
- if paths.size != 1
- puts "!! ERRROR - image for #{n}/#{m} not found (or unique); got:"
- pp paths
+ path = "#{@basedir}/#{n}_#{m}.#{extension}"
+ unless File.exist?( path )
+ puts "!! ERRROR - image for #{n}/#{m} not found; tried >#{path}<"
exit 1
end
- puts " #{n} / #{m} - >#{name}< - #{paths[0]}"
+ puts " #{n} / #{m} - >#{name}< - #{path}"
## note: add relative path (basename+extname only)
layer[m] = { name: name,
- path: File.basename( paths[0] ) }
+ path: File.basename( path ) }
+ end
end
- pp layers
+ def build_summary( title: 'Layers')
+ buf = "# #{title}\n\n"
- buf = "# Layers in /#{collection}\n\n"
- layers.each do |n, layer|
- buf << "**#{n}** - "
- buf << layer.map {|m,rec| rec[:name] }.join( ' · ' )
- buf << " _(#{layer.size})_ "
- buf << "
\n"
- layer.each do |m,rec|
- buf << %Q
- buf <<" \n"
+ buf << "By image format (mime type):\n"
+ @formats.each do |format,count|
+ buf << "- #{format} _(#{count})_\n"
end
buf << "\n\n"
+
+
+ @layers.each do |n, layer|
+ buf << "**#{n}** - "
+ buf << layer.map {|m,rec| rec[:name] }.join( ' · ' )
+ buf << " _(#{layer.size})_ "
+ buf << "
\n"
+ layer.each do |m,rec|
+ buf << %Q
+ buf <<" \n"
+ end
+ buf << "\n\n"
+ end
+ buf
end
- buf
+end # class LayersCache
- puts buf
+
+collections = %w[
+ 3dphunks
+ 3dskulls
+ cherrynouns
+ chimps
+ death
+ dickbutts
+ dosphunks
+ gatekeepers
+ grimmers
+ kevin
+ madmasks
+ people
+ pepes
+ pepitos
+ skulls
+ smiley
+ teddies
+ women]
+
+
+
+## collections = collections[0..2]
+
+collections.each do |collection|
+ puts "==> #{collection}..."
+
+ basedir = "more/#{collection}/cache"
+ cache = LayersCache.new( basedir )
+
+ buf = cache.build_summary( title: "Layers in /#{collection}" )
write_text( "#{basedir}/README.md", buf )
end