Build Your Own All-In-One Page Cheat Sheet with All 128 MoonCat Designs (0-127) In Original Pixel Size And 3X; Tagged With Pose / Face / Fur / Facing Attributes
Let's build an all-in-one page cheat sheet that lists all 128 MoonCat designs (0 to 127) in original pixel size approaching 24×24¹ and 3x zoom; tagged with the pose (4), face (4), fur (4), facing (2) attributes.
¹: Standing (21×17), sleeping (20×14), pouncing (17×22), stalking (20×21)
Let's loop from 0 to 127 and generate the two image series in a single run. Naming the original series images design-000.png
,
design-001.png
, design-002.png
, and so on
and the 3x series design-000x3.png
,
design-001x3.png
, design-002x3.png
, and so on:
require 'mooncats'
(0..127).each do |design|
name = 'design-%03d' % design
cat = Mooncats::Image.new( design: design )
cat.save( "i/#{name}.png" )
cat = Mooncats::Image.new( design: design, zoom: 3 )
cat.save( "i/#{name}x3.png" )
end
Resulting in two 128 image series. Original size:
And with 3x zoom factor:
Let's start the page with a header and little intro:
buf =<<TXT
# MoonCat Designs (128)
In original pixel size¹ and 3x zoom;
tagged with pose (4), face (4), fur (4), facing (2) attributes.
¹: Standing (21×17), sleeping (20×14), pouncing (17×22), stalking (20×21)
TXT
And let's group the design images in blocks / slices of four each (that is, Standing / Sleeping / Pouncing / Stalking) and let's number (0 to 127) and tag all designs with the pose (4), face (4), fur (4), and facing (2) attributes.
Note: The script writes out structured text and "ASCII" table using the markdown (.md) formatting conventions:
buf << "| Standing | Sleeping | Pouncing | Stalking |\n"
buf << "|----------|----------|----------|----------|\n"
(0..127).each_slice(4) do |slice|
buf << "| "
slice.each do |design|
design_meta = Mooncats::Metadata::Design.new( design )
name = "design-%03d" % design
buf << " ![](i/#{name}.png)"
buf << " ![](i/#{name}x3.png)"
buf << " <br> #{design} "
buf << "#{design_meta.pose}·"
buf << "#{design_meta.face}·"
buf << "#{design_meta.fur}·"
buf << "#{design_meta.facing} "
buf << "|"
end
buf << "\n"
end
puts buf
Resulting in (rendered "inline" in HTML):
In original pixel size¹ and 3x zoom; tagged with pose (4), face (4), fur (4), facing (2) attributes.
¹: Standing (21×17), sleeping (20×14), pouncing (17×22), stalking (20×21)
And to wrap up let's save the page to DESIGNS.md.
File.open( './DESIGNS.md', 'w:utf-8') { |f| f.write( buf ) }