text:
  DIY Extraord Punks Previewer

  Directions: click on the map below to preview your DIY Extraord Punk.
  Press clear to start over.

  When you're happy, use the attribute list generated.

 BEWARE!  It's not you (or your eyes).
         Yes, this spritesheet is broken and BLURRY!
      the important lesson is:

   Remember: If a (generative) spritesheet is inscribed on bitcoin & co. -
      do NOT assume that it is working - garbage in / garbage out -
      always quality check before (e.g. zoom in 10x / 1000% in your image program of choice) - any kid clueless about pixel art or "loss-less" graphic formats
        can do and WILL do inscriptions
        (and save as ... .jpeg).  Tip: For pixel art use the "loss-less" .png format.

  <canvas id="canvas" width="240" height="240"></canvas>

   <button id="clear">Clear</button>

  DIY Extraord Punks is a project by the ORC-721 community.
  Learn more on the Ordinal Punks discord (in the #generative-orc-721 channel)
  and the generative-orc-721 github
  This previewer adopted from a fiddle written by Jokie


text:
  DIY (Recursive) Martians - Aliens Vol. 2 Previewer

  Directions: click on the map below to preview your DIY (Recursive) Martian.
  Press clear to start over.

  When you're happy, use the attribute list generated.

  <canvas id="canvas" width="240" height="240"></canvas>

   <button id="clear">Clear</button>

DIY (Recursive) Martians - Aliens Vol. 2 is a project by the ORC-721 community.
  Learn more on the Ordinal Punks discord (in the #generative-orc-721 channel)
  and the generative-orc-721 github
  This previewer adopted from a fiddle written by Jokie

repo_language: Ruby

mime_type: text/plain


text:
   The D.I.Y. Rocks (Incl. Punks & Maxi Biz) moved to its new home here ->
    https://github.com/orc721/rocks.starter.
    Please, update your link.


text:
  DIY (Recursive) Apes Previewer

  Directions: click on the map below to preview your DIY (Recursive) Ape.
  Press clear to start over.

  When you're happy, use the attribute list generated.

  <canvas id="canvas" width="240" height="240"></canvas>

   <button id="clear">Clear</button>

DIY (Recursive) Apes is a project by the ORC-721 community.
  Learn more on the Ordinal Punks discord (in the #generative-orc-721 channel)
  and the generative-orc-721 github
  This previewer adopted from a fiddle written by Jokie


text:
   The Words on Bitcoin (btcwords) Image Previewer moved to its new home here ->
    https://zimmerallday.github.io/btcwords.
    Please, update your link.


text:
  D.I.Y. Maxi Biz (Punks) Previewer

  Directions: click on the map below to preview your DIY Maxi Biz (Punk).
  Press clear to start over.

  When you're happy, use the og standard mint text generated.

  <canvas id="canvas" width="240" height="240"></canvas>

   <button id="clear">Clear</button>

DIY Maxi Biz (Punks)  is a project by the ordgen / ORC-721 community.
  Learn more on the Ordinal Punks discord (in the #generative-orc-721 channel)
  and the generative-orc-721 github
  This previewer adopted from a fiddle written by Jokie


text:
  D.I.Y. Phunks Previewer

      New to 100 D.I.Y. (Left-Looking) Phunks?
       Read more (in Ordinal Phunks discord - #random / General channel) »

PHREE THE PHUNKS!

  Directions: click on the map below to preview your DIY (Left-Looking) Phunk.
  Press clear to start over.

  When you're happy, use the og standard mint text generated.

  <canvas id="canvas" width="240" height="240"></canvas>

   <button id="clear">Clear</button>

DIY Phunks is a project by the Ordinal Phunks community.
  Learn more on the Ordinal Phunks discord (in the #random / General channel)
  and the generative-orc-721 github
  This previewer adopted from a fiddle written by Jokie


text:
  The D.I.Y. Lost Files moved to its new home here ->
   https://github.com/orc721/lostfiles.starter.
   Please, update your link.


text:
  DIY Cool Cats Previewer

  Directions: click on the map below to preview your DIY Cool Cat.
  Press clear to start over.

  When you're happy, use the attribute list generated.

  <canvas id="canvas" width="240" height="240"></canvas>

   <button id="clear">Clear</button>

  DIY Cool Cats is a project by the ORC-721 community..
  Learn more on the Ordinal Punks discord (in the #generative-orc-721 channel)
  and the generative-orc-721 github
  This previewer adopted from a fiddle written by Jokie


text:
  DIY Birdies Previewer

  Directions: click on the map below to preview your DIY Birdie.
  Press clear to start over.

  When you're happy, use the attribute list generated.

  <canvas id="canvas" width="240" height="240"></canvas>

   <button id="clear">Clear</button>

  DIY Birdies is a project by the ORC-721 community.
  Learn more on the Ordinal Punks discord (in the #generative-orc-721 channel)
  and the generative-orc-721 github
  This previewer adopted from a fiddle written by Jokie


text:
  The D.I.Y. Monkes moved to its new home here ->
   https://github.com/orc721/monkes.starter.
   Please, update your link.


text:
  D.I.Y. Genesis Punks Previewer

      New to 10 000 D.I.Y. Genesis Punks?
       See the 10 000 D.I.Y. Genesis Punks README »

  Directions: click on the map below to preview your DIY Genesis Punk.
  Press clear to start over.

  When you're happy, use the og standard mint text generated.

  <canvas id="canvas" width="240" height="240"></canvas>

   <button id="clear">Clear</button>

DIY Genesis Punks is a project by the ORC-721 community.
  Learn more
  in the Ordinal Punks discord
   (in the #generative-orc-721 channel) or
  in the Ordinal Phunks discord
   (in the #random / General channel)
  and the generative-orc-721 github
  This previewer adopted from a fiddle written by Jokie


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>ORC-721 Previewer</title>

  <meta name="viewport" content="width=device-width, initial-scale=1">

Generative ORC-721 Previewer

    Click on the sprite image to construct your mint inscription

    Press clear to start over.
    When you're happy, use the json generated.

Note: This tool is provided as is. No guarantees. Use at your own risk.

    <canvas id="canvas" width="240" height="240"></canvas>

    <button id="clear">Clear Canvas</button>

    Check your json.

  <textarea id="jsonInput" rows="7" cols="50" placeholder='Example: {"p":"orc-721", "op":"mint", "s":"diymycollection", "g":[5,24]}'></textarea>

  <button onclick="validateBtnClick()">Check JSON and Preview on Canvas</button>

    Create a Previewer for your own Gen ORC-721

    Fill in the form below to generate a link to a page like this for your own collection.

Tool only supports square sprites. For rectangular sprites, pls contact the project for enhancement.

  <form id="shareForm">
    Url to your Sprite Image:
    <input type="text" id="sprite_url_input" name="sprite_url" placeholder="Example: https://example.com/spritesheet.png">

    Slug:
    <input type="text" id="slug_input" name="slug" placeholder="Example: diyapes">

    Number of Sprites in each row on your Spritesheet (defaults to 10):
    <input type="number" id="cols_input" name="cols" placeholder="Example: 10">

    <input type="submit" value="Generate Shareable Link">
  </form>

    DIY Punks is a project by the Ordinal Punks community.

    Learn more on the Ordinal Punks discord (in the #generative-orc-721 channel)
    and the generative-orc-721 github


text:
$LOAD_PATH.unshift( "../ordbase/ordinals/lib" )
$LOAD_PATH.unshift( "../ordbase/ordlite/lib" )
require 'ordlite'

require_relative 'config'

OrdDb.open( './ord.db' )

diypunks = Factory.find( 'diypunks' )
puts "  inscribe no. #{diypunks.inscribe.num} - #{diypunks.inscribe.date}"
#=> inscribe no. 9947030 - 2023-05-29 16:38:27 UTC

punk = diypunks.generate( 0,15,31,44,54 )

punk.save( "./tmpv2/punk.png" )
punk.zoom(4).save( "./tmpv2/punk@4x.png" )

__END__

recs = Factory.joins(:inscribe).order('num desc').to_a
recs.each_with_index do |rec,i|

  puts "==> #{i+1}  #{rec.id} >#{rec.name}< max. #{rec.max} - #{rec.dim}"

  puts "   #{rec.layers.count} layer(s):"

  generator = rec.generator
  puts "      #{generator.count} tile(s)"

  ## double check counts
  slug = rec.id
  deploy = DEPLOYS[ slug ]
  pp deploy
  if deploy['g'] != generator.count
    puts "!! ERROR - tile count (max g number) mismatch; got #{generator.count} - expected #{deploy['g']}"
    exit 1
  end

  g = [0]
  sample = rec.generate( *g )
  sample.save( "./tmp/#{slug}-#{g.join('-')}.png" )
end

puts "bye"


text:
####
# to run use:
#   $ ruby pipeline/sync.rb

$LOAD_PATH.unshift( "../ordbase/ordinals/lib" )
$LOAD_PATH.unshift( "../ordbase/ordlite/lib" )
require 'ordlite'

cache = Ordinals::Cache.new( '../ordinals.cache/inscription' )
cache.add_dir( './inbox' )

OrdDb.open( './ord.db' )
cache.import_all

puts
puts "  #{Inscribe.count} inscribe(s)"
puts "  #{Blob.count} blob(s)"

puts "bye"


text:
######################
#  to run use
#   $  ruby  pipeline/prepare.rb

$LOAD_PATH.unshift( "../ordbase/ordinals/lib" )
require 'ordinals'

cache = Ordinals::Cache.new( '../ordinals.cache/inscription' )
cache.add_dir( './inbox' )

puts "bye"


text:
###
#  to run use
#     ruby pipeline/test_og.rb

require 'minitest/autorun'

require_relative 'og'

class TestOg < MiniTest::Test

def test_parse_deploy
txt =<<TXT
og deploy diyphunks
name: D.I.Y. Phunks
max: 100
dim: 24x24
dd91c8b33dd19ccd8410e54c2099bfd50d4f777a186ee974fe4c15420c42ea0fi0
TXT

  data = {
    'p'   => 'orc-721',
    'op'  =>'deploy',
    'slug'=>'diyphunks',
    'name'=>'D.I.Y. Phunks',
    'max' =>100,
    'dim' =>'24x24',
    'generative'=>[
        'dd91c8b33dd19ccd8410e54c2099bfd50d4f777a186ee974fe4c15420c42ea0fi0'
     ]}

  assert_equal  data, OG.parse_deploy( txt )

txt =<<TXT
og deploy diymaxibiz
name: D.I.Y. Maxi Biz (Punks)
max: 100
dim: 24x24
ad56d4f242677ac334844002f1c27b9b636ba71f68590cdc0cc5a2cbce080990i0
TXT

data = {
  'p'   => 'orc-721',
  'op'  =>'deploy',
  'slug'=>'diymaxibiz',
  'name'=>'D.I.Y. Maxi Biz (Punks)',
  'max' =>100,
  'dim' =>'24x24',
  'generative'=>[
      'ad56d4f242677ac334844002f1c27b9b636ba71f68590cdc0cc5a2cbce080990i0'
   ]}

  assert_equal  data, OG.parse_deploy( txt )
end

def test_parse_mint
  txt = 'og mint diyphunks 0 49 28'

  data = {
      'p'   => 'orc-721',
      'op'  =>'mint',
      's'=>'diyphunks',
      'g' => [0,49,28],
    }

    assert_equal  data, OG.parse_mint( txt )
end

end # class TestOg


text:
####
# to run use:
#   $ ruby pipeline/deploys.rb

$LOAD_PATH.unshift( "../ordbase/ordinals/lib" )
$LOAD_PATH.unshift( "../ordbase/ordlite/lib" )
require 'ordlite'

require_relative 'config'   ## pull-in known deploys???
require_relative 'og'

OrdDb.open( './ord.db' )

puts
puts "  #{Inscribe.count} inscribe(s)"
puts "  #{Blob.count} blob(s)"
puts "  #{Collection.count} collections(s)"
puts "  #{Factory.count} factories"
puts "  #{Generative.count} generative(s)"

## note: for now delete all factories
## actory.delete_all
## puts "  #{Factory.count} factories"

####################
## query for deploy candidates

deploys = Inscribe.deploys
puts "   #{deploys.size} deploy candidate(s)"

slugs = []

deploys.each_with_index do |rec,i|
    puts "==> deploy #{i} - num #{rec.num} - #{rec.bytes} bytes - #{rec.date}"
    puts rec.content

    ## try to auto-fill / add collections
    text = rec.content.strip

    data = nil  ## first see if valid json
    ## check if text or json format
    if OG.is_deploy?( text )
      data = OG.parse_deploy( text )
    else  ## assume json
      begin
        data = JSON.parse( text )
      rescue JSON::ParserError => ex
        ## keep going
        puts "!! WARN - skip deploy - json parse error"
        next
      end
    end

    ## note: auto-exclude / skip for now
    next if [
               14935406  ### broken first diymaxibiz deploy
            ].include?( rec.num )

      ## only add if first deploy
      slug = data['slug']
      if slugs.include?( slug )
         puts "!! WARN - skip deploy >#{slug}< - duplicate; first-come/first-serve"
         next
      end
      slugs << slug

      ## check if present
      fac = Factory.find_by( id: slug )
      if fac
        # skip - already in database
      else
        ## insert new factory (& generatives!)
        name = data['name']
        max = data['max']
        dim = data['dim']
        generative = data['generative']
        generative = [generative]  if generative.is_a?( String )
        puts "  #{generative.size} layer(s):"
        pp generative

        fac = Factory.create( id: slug,
                                 inscribe_id: rec.id,
                                 name: name,
                                 max: max,
                                 dim: dim )
        generative.each_with_index do |id,i|
            inscribe = Inscribe.find( id )
            fac.inscriberefs.create( pos: i,
                                  inscribe_id: inscribe.id )
       end
     end
end

puts "bye"


text:
module Og

  OG_MINT_RX = /\A
     og
     [ ]+
     mint
     [ ]+
     /x

  OG_DEPLOY_RX = /\A
     og
     [ ]+
     deploy
     [ ]+
     /x

  def self.is_mint?( txt )  OG_MINT_RX.match( txt ) != nil; end
  def self.is_deploy?( txt )  OG_DEPLOY_RX.match( txt ) != nil; end

  class << self
    alias_method :mint?, :is_mint?
    alias_method :deploy?, :is_deploy?
  end

## single-line for now
OG_MINT_SLUG_NUMS_RX = /\A
            og
           [ ]+
            mint
           [ ]+
             (?<slug>[a-z][a-z0-9]*)
           [ ]+
            (?<nums>[0-9]+
                 ([ ]+[0-9]+)*
             )
          \z/x

def self.parse_mint( txt )
  data = {}
  lines = _lines( txt )

  ## try to convert to json
  m=OG_MINT_SLUG_NUMS_RX.match( lines[0] )

  ### FIX: report/ log error
  ###   raise parse error - why? why not?
  if m.nil?
     puts "!! ERROR NO MATCH OG_MINT_SLUG_NUMS:"
     pp lines
     exit 1
  end

  data['p'] = 'orc-721'
  data['op'] = 'mint'
  data['s']  = m[:slug]
  data['g']  = m[:nums].split( /[ ]+/).map {|num| num.to_i(10) }

  data
end

 HEADER_RX = /\A(?<key>[a-z]+)
                 [ ]*:
                 [ ]*
               (?<value>.+?)    ## non-greedy
              \z
             /x

def self.parse_deploy( txt )
## for now convert to orc-721 format (json-like) - why? why not

  data = {}
  lines = _lines( txt )

  values = lines[0].split( /[ ]+/ )

  ## note: change og to orc-721
  data['p']  = values[0] == 'og' ? 'orc-721' : values[0]
  data['op'] = values[1]
  data['slug'] = values[2]

  process_headers = true
  lines[1..-1].each do |line|
     m = nil
     if process_headers && (m=HEADER_RX.match(line))
        key   = m[:key]
        value = m[:value]

        ## auto-convert known (integer number) keys to integenr number
        value = value.to_i(10)  if ['max'].include?( key )
        data[key] = value
     else
       ## assume generatives for the rest
       data['generative'] ||= []
       data['generative'] << line
       process_headers = false
     end
  end
  data
end

def self._lines( txt )
  ## note: chomp will remove trailing newline (\n)
  lines = txt.lines( chomp: true )
  ## strip (remove leading and trailing spaces too)
  lines = lines.map {|line| line.strip }
  ## remove empties  (e.g. "")
  lines = lines.reject {|line| line.empty? }
  lines
end

end  # module Og

## add alias - why? why not?
OG = Og


text:
####
# to run use:
#   $ ruby pipeline/mints.rb

$LOAD_PATH.unshift( "../ordbase/ordinals/lib" )
$LOAD_PATH.unshift( "../ordbase/ordlite/lib" )
require 'ordlite'

require_relative 'config'
require_relative 'validate'
require_relative 'og'

OrdDb.open( './ord.db' )

puts
puts "  #{Inscribe.count} inscribe(s)"
puts "  #{Blob.count} blob(s)"
puts "  #{Collection.count} collections(s)"
puts "  #{Factory.count} factories"
puts "  #{Generative.count} generative(s)"

#######################
## query for mint candidates

mints = Inscribe.mints
puts "   #{mints.size} mint candidate(s)"

mints.each_with_index do |rec,i|
    ## puts "==> mint #{i} - num #{rec.num} - #{rec.bytes} bytes - #{rec.date}"
    ## puts rec.content

    ## skip processing if alreay in db
    gen = Generative.find_by( id: rec.id )
    if gen
      print '.'
      next
    end

    ## try to auto-fill / add collections
    text = rec.content.strip

    ## todo/fix:
    ##   must follow format (deploy classic (json)? or standard (txt)?)

    data = nil  ## first see if valid json
    ## check if text or json format
    if OG.is_mint?( text )
      data = OG.parse_mint( text )
    else  ## assume json
      begin
        data = JSON.parse( text )
      rescue JSON::ParserError => ex
        ## keep going
        ## puts "!! WARN - skip mint - json parse error"
        next
      end
    end

    ## note skip if not og mint
    next if data['p']   != 'orc-721' &&
            data['op']  != 'mint'

    slug = data['s']

    fac = Factory.find_by( id: slug )
    if fac && DEPLOYS[slug]
        ## todo/fix:
        ##  double check inscribe num in collection and deploys  MATCH!!!

        ## try validate
        errors = validate_mint( rec.num, data, deploys: DEPLOYS )

        if errors.size == 0
          puts
          puts "==> mint #{i} - num #{rec.num} - #{rec.bytes} bytes - #{rec.date}"
          puts rec.content

          gen = Generative.create( id: rec.id,
                                   factory_id: fac.id,
                                   g:  data['g'].join( ' ' ) )
          pp gen
        else
           ## report broken mint errrors here
        end
    else
       puts "!! WARN - factory >#{slug}< not found:"
       pp rec
       puts rec.content
       exit 1
    end
end

puts
puts
puts "  #{Inscribe.count} inscribe(s)"
puts "  #{Blob.count} blob(s)"
puts "  #{Collection.count} collection(s)"
puts "  #{Factory.count} factories"
puts "  #{Generative.count} generative(s)"

puts "bye"


text:
require 'json'   ## json module required

require_relative 'validate'

mint_inscribes = [
  [105,  %Q<{"p":"orc-721","op":"mint","s":"diypunks","g":[0]}>], #' OK'
  [5, %Q<{"p":"orc-721","op":"mint","s":"diypunks","g":[0]}>],   ## ERROR - mint ord num LOWER (<) deploy ord num
  [106, %Q<{"p":"orc-721","op":"mint","s":"diypunks","g":[]}>],  ## ERROR - g empty
  [107,  %Q<{"p":"orc-721","op":"mint","s":"diypunks","g":[0,59]}>],  ## OK
  [108,  %Q<{"p":"orc-721","op":"mint","s":"diypunks","g":[0,3,59,99]}>], ## ERROR - g out-of-range num
  [109,  %Q<{"p":"orc-721",}>],  ## ERROR -  json parse error / invalid - single-line - failed multi-line inscribe
  [110,  %Q<{"p":"orc-721"}>],  ## ERROR -  json parse error / invalid - single-line - failed multi-line inscribe
  [111,  %Q<{"p":"orc-721","op":"mint","s":"diypunks","g":[3.4.59]}>],  ## ERROR - numbers with dots
  [112,  %Q<{"p":"orc-721","op":"mint","s":"diypunks","g":[0,59]}>],  ## ERROR
  [113,  %Q<{"p":"orc-721","op":" mint","s":"diypunks","g":[0,59]}>],  ## ERROR
  [114,  %Q<{"p":"orc-721","op":"MINT","s":"diypunks","g":[0,59]}>],  ## ERROR
  [115,  %Q<{"p":" orc-721","op":"mint","s":"diypunks","g":[0,59]}>],  ## ERROR
  [116,  %Q<{"p":"ORC-721","op":"mint","s":"diypunks","g":[0,59]}>],  ## ERROR
  [117,  %Q<{"p":"ORC721","op":"mint","s":"diypunks","g":[0,59]}>],  ## ERROR
  [118,  %Q<{"p":"orc721","op":"mint","s":"diypunks","g":[0,59]}>],  ## ERROR
  [118,  %Q<{"p":"orc-721","op":"mint","s":"diyypunks","g":[0,59]}>],  ## ERROR
  [118,  %Q<{"p":"orc-721","op":"mint","s":"","g":[0,59]}>],  ## ERROR
  [118,  %Q<{"p":"orc-721","op":"mint","s":"_","g":[0,59]}>],  ## ERROR
  [118,  %Q<{"p":"orc-721","op":"mint","s":"DIY","g":[0,59]}>],  ## ERROR
]

## more
##   check for json - key duplicates accepted in json parse e.g
###           "p": "orc-721", "p": "orc-721", ...

deploys ={
  'diypunks' => { 'num' => 10,  ## deploy inscribe num
                  'g'   => 60     ##  max g range e.g. 0-59 (60)
                },
}

mint_inscribes.each do |num, content|

  ###  1) check for valid json
  data = nil
  errors = nil
  begin
    data = JSON.parse( content )
    errors = validate_mint( num, data, deploys: deploys )
    ## puts "   OK - json parse"
  rescue JSON::ParserError => ex
    errors = ["json parse -- #{ex.message}"]
  end

  if errors.size == 0
     puts "OK       - #{num}"
  else
     puts
     puts "!! ERROR - #{num}"
     puts content
     errors.each do |msg|
       puts "   #{msg}"
     end
     puts
  end
end

puts "bye"


text:
DEPLOYS = {
#################
## format = 'json'

  'diypunks' => { 'num' => 9947030,  ## deploy inscribe num
                  'g'   => 60     ##  max g range e.g. 0-59 (60)
                },
  'diypunks-v2'  => { 'num' => 10282958,
                      'g'   => 60
                    },
  'diyordibots' => {  'num' => 10339670,
                      'g'   => 30
                    },
  'diyordibots-v2' => {  'num' => 10347807,
                         'g'   => 30
                      },
  'diycoolcats' => { 'num' => 10509482,
                    'g'   =>  70
                  },
  'btcwords'  => { 'num' => 11066199,
                  'g'   =>  162   ## 27x6=162
                 },
  'diybirdies' => {  'num' => 11326228,
                     'g' => 220   ## 20x11=220
                  },
   'diyapes'  => { 'num' => 11803822,
                    'g'   =>  26   ## 0-25 (26) inscribe ids
                 },
   'diyaliens'  => { 'num' => 11834519,
                    'g'   =>  26   ## 0-25 (26) inscribe ids
                   },
   'diymartians' => {  'num' => 12799513,
                       'g'   =>  50   ## 0-49 (50) inscribe ids
                    },
   'orangepixels' => {  'num' => 13070955,
                       'g'   =>  576   ## 0-575 (576 - 24*24)
                       },

#####################
## format = 'text'

    'diyphunks' => { 'num' => 13418851,
                     'g'   => 60,     ##  max g range e.g. 0-59 (60)
                   },
    'diymaxibiz' => { 'num' => 14999762,
                   'g'   => 90,     ##  max g range e.g. 0-89 (90)
                 },
    'diyorditroops' => { 'num' => 15567938,
                   'g'   => 58,     ##  max g range e.g. 0-57 (58)
                 },
}


text:
####
# to run use:
#   $ ruby pipeline/dump_deploys.rb

$LOAD_PATH.unshift( "../ordbase/ordinals/lib" )
$LOAD_PATH.unshift( "../ordbase/ordlite/lib" )
require 'ordlite'

OrdDb.open( './ord.db' )

puts
puts "  #{Inscribe.count} inscribe(s)"
puts "  #{Blob.count} blob(s)"
puts "  #{Collection.count} collections(s)"
puts "  #{Factory.count} factories"
puts "  #{Generative.count} generative(s)"

### quick (double)check for deploy config/settings
require_relative 'config'

puts "  #{DEPLOYS.size} deploys"
DEPLOYS.each_with_index do |(id, h), i|
    fac = Factory.find( id )
    if fac.inscribe.num != h['num']
        puts "!! ERROR - inscribe no not matching; #{fac.inscribe.num} <=> #{h['num']}"
        exit 1
    end
end

Factory.all.each_with_index do |fac,i|
   puts "==> #{i+1} @ #{fac.inscribe.num}  #{fac.id} max. #{fac.max}, dim. #{fac.dim} - #{fac.inscribe.date}..."
   puts "    #{fac.name}"
end

puts "bye"


text:
###
## todo/check:
##    make all string values case-insensitive - why? why not?
##       orc-721 == ORC-721
##        mint   == MINT == Mint == mInT
##       diypunks == DiyPunks  etc.

## todo/fix:
##   do NOT allow -_ at end of name in slug!!!!

def validate_mint( num, data, deploys: {} )
  errors = []

    ###  2) check for protocol required keys  - p,op,s,g
    ##          todo: allow (long-form) alternative for s e.g. slug
    ##          todo: allow (long-form) alternative for g e.g. generative?
    ['p','op','s','g'].each do |key|
       if data.has_key?( key )
          ## continue
       else
          msg = "protocol format -- required key '#{key}' not found in inscribe text"
          errors << msg
          ## puts "   !! ERROR - #{msg}"
       end
    end

    ## 3) check for protocol values
    if errors.size == 0
      value = data['p']
      if value != 'orc-721'
        msg = "protocol format -- expected value 'orc-721' for key 'p'; got '#{value}'"
        errors << msg
      end
    end

    if errors.size == 0
      value = data['op']
      if value != 'mint'
        msg = "protocol format -- expected value 'mint' for key 'op'; got '#{value}'"
        errors << msg
      end
    end

    if errors.size == 0
      slug = value = data['s']

       ## slug must use this regex (texp pattern) format
       ##  note: MUST start with a-z (NOT numbers or _-)
       ##  - todo/check - limt the length of slug at 64, 128 or such???
       ##     - check .com domain names - what is max length?
       ##
       ##  - todo/check - allow more special chars e.g. - dot(.) - why? why not?
       ##                                               - at(@)
       ##                                               - plus(+)
       ##   - again check / try to use format for .com domain names
       slug_re = /[a-z][a-z0-9_-]*/

       if slug_re.match( value ).nil?
        msg = "protocol format -- invalid slug '#{value}'; must use the format /[a-z][a-z0-9_-]*/"
        errors << msg
       else
        deploy = deploys[value]

        if deploy.nil?
          msg = "protocol -- no deploy found for slug '#{value}'"
          errors << msg
        else
         ###  check for mint ord num GREATER deploy ord num.
         ## pp deploy
         deploy_num = deploy['num']
         ## pp deploy_num
         if deploy_num > num
             msg = "protocol -- '#{slug}' mint inscribe no. #{num} lower than deploy inscribe no #{deploy_num}"
             errors << msg
         else
            ## check for g
            g = values =  data['g']
            if values.size == 0   ## empty array
              msg = "protocol format -- empty g"
              errors << msg
            end
            if errors.size == 0
              ## check for g in range of deploy
              ##   note: for now allow to repeat numbers e.g. [0,0,0] is ok
              ##          or [0,1,1,2,1,2]
              deploy_g = deploy['g']
               values.each do |value|
                    ##
                    ## check for value - MUST be a integer number
                    if value.is_a?( Integer )
                      if value >= deploy_g
                        msg = "protocol --  g no. #{value} out-of-range 0-#{deploy_g-1} (#{deploy_g}) in '#{slug}' mint"
                        errors << msg
                      end
                    else
                       msg = "protocol format -- g no. #{value} not an integer number; got type #{value.class.name}"
                       errors << msg
                    end
               end
            end
         end
        end
     end
    end

  errors
end


text:
$LOAD_PATH.unshift( "../ordbase/ordinals/lib" )
$LOAD_PATH.unshift( "../ordbase/ordlite/lib" )
require 'ordlite'

OrdDb.open( './ord.db' )

puts
puts "  #{Inscribe.count} inscribe(s)"
puts "  #{Blob.count} blob(s)"
puts "  #{Collection.count} collection(s)"
puts "  #{Factory.count} factories"
puts "  #{Generative.count} generative(s)"


text:
#####
#  generate collection page
#
#  to run use:
#    $ ruby pages/diycoolcats.rb

require_relative 'helper'
require_relative 'collection'     ## use/pull-in (shared) code

page = generate_collection(
    slug: 'diycoolcats',
    name: 'D.I.Y. Cool Cat',
   )

write_text( "./tmp/orc721/diycoolcats/README.md",
              page )

puts 'bye'


text:
#####
#  generate collection page
#
#  to run use:
#    $ ruby pages/diybirdies.rb

require_relative 'helper'
require_relative 'collection'     ## use/pull-in (shared) code

page = generate_collection(
    slug: 'diybirdies',
    name: 'D.I.Y. Birdie',
   )

write_text( "./tmp/orc721/diybirdies/README.md",
              page )

puts 'bye'


text:
####
#  generate a feed / page with the last hundred mints
#
#  to run use:
#   $ ruby pages/mints.rb

require_relative 'helper'

##
## fix - remove broken mint
## ==> mint 50 - num 15131911 - 151 bytes - 2023-07-07 09:12:39 UTC
## og mint diymaxibiz 85 6 69 21
## og mint diymaxibiz 80 69 30
## og mint diymaxibiz 84 0 25 34
## og mint diymaxibiz 20 0 26 28 29 30
## og mint diymaxibiz 16 78 30
Generative.delete( Inscribe.find_by( num: 15131911 ).id )

#######################
## query for (latest) mint via generatives

max = 100
mints = Generative.joins( :inscribe ).order( 'num desc' ).limit( max )
puts "   #{mints.size} mint(s)"

mints.each_with_index do |generative,i|
    rec = generative.inscribe
    puts "==> mint #{i} - num #{rec.num} - #{rec.bytes} bytes - #{rec.date}"
    puts rec.content
end

buf =<<TXT
New to Generative ORC-721?  See the [Getting Started Guide & Documentation »](https://github.com/ordbase/generative-orc-721)

## Mints

TXT

mints.each_with_index do |generative,i|
    rec = generative.inscribe
    puts "==> mint #{i} - num #{rec.num} - #{rec.bytes} bytes - #{rec.date}"
    puts rec.content

  buf << "\n"
  buf << "[№ #{rec.num}](https://ordinals.com/inscription/#{rec.id}) - #{rec.date}"
  buf << "
\n"

  ## add images
  if generative.factory.id == 'diyorditroops'
    buf << %Q[]
    buf << "
\n"
  else
    buf << "![](https://ordbase.github.io/num/#{rec.num}.png) "
    buf << "4x ![](https://ordbase.github.io/num/#{rec.num}@4x.png)"
    buf << "
\n"
  end

  buf << "```\n"
  buf << rec.content
  buf << "\n"
  buf << "```\n"
end

buf += <<TXT

---

Page Generated with [Ordlite - Ordinal Inscription (SQL) Database - Scripts](https://github.com/ordbase/ordbase/tree/master/ordlite).
TXT

## puts buf
write_text( "./tmp/orc721/README.md", buf )

puts "bye"


text:
#####
#  generate collection page
#
#  to run use:
#    $ ruby pages/btcwords.rb

require_relative 'helper'
require_relative 'collection'     ## use/pull-in (shared) code

page = generate_collection(
    slug: 'btcwords',
    name: 'Word on Bitcoin',
   )

write_text( "./tmp/orc721/btcwords/README.md",
              page )

puts 'bye'


text:
#####
#  generate collection page
#
#  to run use:
#    $ ruby pages/diyapes.rb

require_relative 'helper'
require_relative 'collection'     ## use/pull-in (shared) code

page = generate_collection(
    slug: 'diyapes',
    name: 'D.I.Y. Ape',
   )

write_text( "./tmp/orc721/diyapes/README.md",
              page )

puts 'bye'


text:
####
#  generate a feed / page with the last collections (deploys)
#
# to run use:
#   $ ruby pages/collections.rb

require_relative 'helper'

recs = Factory.joins(:inscribe).order('num desc').to_a
recs.each_with_index do |rec,i|
  puts "==> #{i+1}  #{rec.id} >#{rec.name}< max. #{rec.max}"
  puts "   #{rec.layers.count} layer(s):"
  rec.layers.each_with_index do |layer,i|
     puts "   [#{i}]  #{layer.num} - #{layer.id}"
  end
  puts
end

# Generative! Your Numbers, Your Image! -  Ordgen / ORC-721

buf =<<TXT
## Collections

TXT

recs.each_with_index do |rec,i|
    puts "==> deploy #{i} - num #{rec.inscribe.num} - #{rec.inscribe.bytes} bytes - #{rec.inscribe.date}"
    puts rec.inscribe.content

  buf << "\n"
  buf << "**#{rec.name}** (#{rec.id}) max. #{rec.max} "
  buf << "- [№ #{rec.inscribe.num}](https://ordinals.com/inscription/#{rec.inscribe.id}) - #{rec.inscribe.date}"
  buf << "
\n"
  buf << "#{rec.layers.count} layer(s)"
  buf << "
\n"
  # buf << "![](https://ordbase.github.io/num/#{rec.num}.png) "
  # buf << "4x ![](https://ordbase.github.io/num/#{rec.num}@4x.png)"

  rec.layers.each_with_index do |layer,pos|
    # buf << "[№ #{layer.num}](https://ordinals.com/inscription/#{layer.id}) "
    # buf << "![](../num/#{layer.num}.png)"
    # buf << "\n"

    buf << %Q[]
    buf << %Q[]
    buf << "\n"

=begin
    if layer.blob.nil?
      content = Ordinals.content( layer.id )
      pp content
      #=> #<Ordinals::Api::Content:0x000001a1352df938
      #      @data="RIFF\xF8\v\x00\x00WEBPVP8 \xEC\v\x00\x00...",
      #      @length=3072,
      #      @type="image/png"

      Blob.create( id: layer.id, content: content.data )
      layer = Inscribe.find( layer.id )  ## refresh
      sleep( 0.5 )
    end
=end

    ## note: assume png for now always
    write_blob( "./tmp/orc721/num/#{layer.num}.png", layer.content )
  end
  buf << "\n"
end

buf += <<TXT

---

Page Generated with [Ordlite - Ordinal Inscription (SQL) Database - Scripts](https://github.com/ordbase/ordbase/tree/master/ordlite).
TXT

## puts buf
write_text( "./tmp/orc721/collections/README.md", buf )

puts "bye"


text:
def generate_collection( slug:, name:,
                                offset: 0 )

   rec = Factory.find( slug )

   puts "==> #{rec.id} >#{rec.name}< max. #{rec.max} - #{rec.dim} - inscribe no. #{rec.inscribe.num} - #{rec.inscribe.date}"

   puts "   #{rec.layers.count} layer(s):"

   generator = rec.generator
   puts "      #{generator.count} tile(s)"

   puts "  #{rec.generatives.count} generative(s)"
   generatives = rec.generatives.joins(:inscribe)
                    .order('num').limit( rec.max )  ## cut-off "cursed" overflow "negatives" if any

  buf = <<TXT
## #{rec.name} (#{rec.id}) max. #{rec.max}

TXT

  generatives.each_with_index do |gen,i|

    num = gen.inscribe.num
    id  = gen.inscribe.id

    tooltip = "#{name} ##{i+offset} - № #{num}"

    buf << %Q[]
    buf << %Q[]
    buf << "\n"
  end

buf += <<TXT

---

Page Generated with [Ordlite - Ordinal Inscription (SQL) Database - Scripts](https://github.com/ordbase/ordbase/tree/master/ordlite).
TXT

  buf
end


text:
!! ERROR(S) in  10366662 / 5f8c94b102d05f534876b34ed5e35dbc36c1945bf3c61fcfcb7e848269b3d0dfi0:
{“p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,8]}

   - json parse -- 859: unexpected token at '{“p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,8]}'

!! ERROR(S) in  10366818 / c1f55837e23e95f8334c069ef62bedce125bb0c86ad1f9bc51e0bc9ffe11d15di0:
{“p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,9]}

   - json parse -- 859: unexpected token at '{“p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,9]}'

!! ERROR(S) in  10367118 / 8883d8afc4993e67beb41b4709b00bbad7437fccf837691287175a920d2b2c22i0:
{“p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,12]}

   - json parse -- 859: unexpected token at '{“p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,12]}'

!! ERROR(S) in  10367135 / a41a406696fcd01c2df7b91431d7c16b55361eae9eb11aee5deb09a36f00532di0:
{“p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,10]}

   - json parse -- 859: unexpected token at '{“p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,10]}'

!! ERROR(S) in  10367254 / 529c2f2ff037deaffec1a45c70bc3befedfc7e78c7edb5bef79907cc17e7afedi0:
{“p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,11]}

   - json parse -- 859: unexpected token at '{“p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,11]}'

!! ERROR(S) in  10367376 / 68493946a1f21762c4b5977069548dff0b65b40860067ffbe9e53c8aa3f4a63di0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[]}

   - protocol format -- empty g

!! ERROR(S) in  10367425 / 3cffbee189f6a20796f4a0b66e480c0401b2372fdea096a312bda101ff8429d9i0:
example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}

   - json parse -- 859: unexpected token at 'example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}'

!! ERROR(S) in  10367426 / 27ed2783fb0c9643c090585b3ff22a52c7b4d19163a15c8a096d1f811fc5c000i0:
example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}

   - json parse -- 859: unexpected token at 'example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}'

!! ERROR(S) in  10367427 / c7aa85bc7f4051918d380a8b9a80211c97d08414786131e896ee1c69b603c41fi0:
example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}

   - json parse -- 859: unexpected token at 'example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}'

!! ERROR(S) in  10367430 / a4ac9ddd8280bd85e371f0732fcbe36bbd79177b58064876ff7f4bcf37782e38i0:
example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}

   - json parse -- 859: unexpected token at 'example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}'

!! ERROR(S) in  10367434 / 97b81a674c9c60a1130bcef6912e9f35aa33ef3af24f04884f9f680d6138e051i0:
example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}

   - json parse -- 859: unexpected token at 'example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}'

!! ERROR(S) in  10367435 / 8cab2cf2f7a9f292a49a7698948078c95c8b3288f59c53d6ac50d482fd1f696ei0:
example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}

   - json parse -- 859: unexpected token at 'example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}'

!! ERROR(S) in  10367436 / 44169c9b60e368caf9428fc0a17a24d82efc4c45bd74ce0541ac63054aaec773i0:
example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}

   - json parse -- 859: unexpected token at 'example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}'

!! ERROR(S) in  10367438 / 44b9fa99a4d3a25939920ff0f3be570466d80cc8590ce5dad45a703873497a7bi0:
example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}

   - json parse -- 859: unexpected token at 'example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}'

!! ERROR(S) in  10367440 / ab05130aeab2261a6357353c9a5c8a1f73db58431939b6bbeb29cb861b2929aci0:
example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}

   - json parse -- 859: unexpected token at 'example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}'

!! ERROR(S) in  10367441 / 7647748c2b57ee9aa63a30f763fb04b24220456cee718211c2aefac0a7b094b3i0:
example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}

   - json parse -- 859: unexpected token at 'example:{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,22,24,7]}'

!! ERROR(S) in  10367470 / ecec7b344bee93a91ff5af0283d6474bbb513f1bd9de3efdafa98cfc28478ba3i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[3，4，8，19，24]}

   - json parse -- 451: unexpected token at '，4，8，19，24]}'

!! ERROR(S) in  10367825 / 95221ddc98b39411b463ed82b1485b27385e2ab0d6c22d39b3e08117ffb394b2i0:
{"p": "orc-721","op":"mint","s":"diyordibots-v2"}

   - protocol format -- required key 'g' not found in inscribe text

!! ERROR(S) in  10368070 / f205cc0320ef4d69d68942bc8e38792983571ca32cb00e0b17d04258ec0cc540i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[2,4,14,23,7]}{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[2,4,14,23,9]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[2,4,14,23,9]}'

!! ERROR(S) in  10368073 / fea43ff33ae82757810c9ac8e7dd0bd87dee9e5e958d370be45fc8f4283edbd8i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[3,6,21,23,8]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[3,6,21,23,8]}'

!! ERROR(S) in  10368074 / 7bc033eb405a0b3998aa2061ba08e8216586643e9f43f1297e473375785be41ei0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[3,6,21,25,8]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[3,6,21,25,8]}'

!! ERROR(S) in  10368075 / 0654bd404efa5f4b0c74498c7a35910082801141b2a06efd3accd75c5f080749i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[2,6,21,25,8]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[2,6,21,25,8]}'

!! ERROR(S) in  10368076 / ef7352ad8af1bccb639ab7199d1f4f328dd0dcfb206c9c7f8303b002f4eb4f6ei0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[0,6,21,25,8]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[0,6,21,25,8]}'

!! ERROR(S) in  10368077 / b387d14707ed0538a6222de81f00e60243c1d4dc784b46eeeda920fcc606eb99i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[1,6,21,25,8]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[1,6,21,25,8]}'

!! ERROR(S) in  10368078 / 4fd755dd562b143b047ff18b3737f183976bcf7eade13ba795028f91f4228ea2i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[0,6,21,25,8]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[0,6,21,25,8]}'

!! ERROR(S) in  10368079 / 81bd2fa7cfc0dbf539a9a9b849b3601cdb62ae63683d0a14cf8570820d9ce2c9i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[3,6,21,24,8]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[3,6,21,24,8]}'

!! ERROR(S) in  10368080 / dcade2086f84f4b56e5600ac0618d2bae60d44084216f3cbf437382aee9b96dbi0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[1,6,21,24,8]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[1,6,21,24,8]}'

!! ERROR(S) in  10368081 / b327d2c72a1649b0b28182ba1c622e7112711617b25d42a992c1d1a8cff230efi0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[1,6,21,23,8]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[1,6,21,23,8]}'

!! ERROR(S) in  10368082 / ba49631b71a414d8968fc518bc72b1678649cb6be5005fb48aa62c7713f74ef1i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[0,6,21,24,8]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[0,6,21,24,8]}'

!! ERROR(S) in  10368107 / 8d7532b4e38be48d0096824cb3b28e3cfb2705e8918ace17cc467edbea10a485i0:
"p":"orc-721","op":"mint","s":"diyordibots-v2","g": [1,6,17,25,8]

   - json parse -- 859: unexpected token at ':"orc-721","op":"mint","s":"diyordibots-v2","g": [1,6,17,25,8]'

!! ERROR(S) in  10368166 / 64e4b5df792a07e4bc71e191ed3b5beaa000cca88253ce535fd198b564d1b205i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,20,23,3]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,20,23,3]'

!! ERROR(S) in  10368167 / 951b81aa7ab3b7f3afd746c8fc24142857333e4fed2312a5403afc9e431ee74ai0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,20,13,3]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,20,13,3]'

!! ERROR(S) in  10368170 / b4775020539d7b866ef836c15e91a124875c4a888697b747aaf39d2faf76e28ci0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,20,13,3]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[0,5,20,13,3]'

!! ERROR(S) in  10368378 / 8225e0d24b16fd1bb93f413d09c6726e62d98f7033f9359756224affe92745d6i0:
"p":"orc-721","op":"mint","s":"diyordibots-v2","g": [1,6,17,23,13]

   - json parse -- 859: unexpected token at ':"orc-721","op":"mint","s":"diyordibots-v2","g": [1,6,17,23,13]'

!! ERROR(S) in  10368385 / 59eb78d9ca06e50f772e0f44f4d858577741daae9bab4f8d7127c250b64b9767i0:
"p":"orc-721","op":"mint","s":"diyordibots-v2","g": [1,6,17,23,8]

   - json parse -- 859: unexpected token at ':"orc-721","op":"mint","s":"diyordibots-v2","g": [1,6,17,23,8]'

!! ERROR(S) in  10368449 / 39cb27247d06689fb4d19c7afc753ac775ca6ce0cc7b21dce95a51242e88ffaai0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,14,21,11]}
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,8,14,22,11]}
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,14,24,18]}
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,14,23,14]}
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,11,24,11]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,8,14,22,11]}
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,14,24,18]}
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,14,23,14]}
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,11,24,11]}'

!! ERROR(S) in  10368793 / 3ae554bda69c01886c44b52a5d8df8ca1ee1817989b0df1a4fbb9f7693a5f98ai0:
"p":"orc-721","op":"mint","s":"diyordibots-v2","g": [1,6,17,25,7]

   - json parse -- 859: unexpected token at ':"orc-721","op":"mint","s":"diyordibots-v2","g": [1,6,17,25,7]'

!! ERROR(S) in  10368852 / 5fc386206e55c62127bb57812d73dfe7b9996249a2214673794cabbb77dc6926i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,11]}
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,11]}
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,11]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,11]}
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,5,15,24,11]}'

!! ERROR(S) in  10368917 / d180a77d97fba9b724be9e5427156f3b7899be44dc29bdacccd1fd7eb0913823i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,6,17,23,2]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,6,17,23,2]'

!! ERROR(S) in  10368980 / e5db40c6c3f95778a8f42afc179087875b248c516e21053d193f61686bbd0647i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[3，7，8，19，24]}

   - json parse -- 451: unexpected token at '，7，8，19，24]}'

!! ERROR(S) in  10369301 / c459e7d26fdf79e871a41157f671601e70958186a8f8fab7f5b9545dfa3d0675i0:
"p":"orc-721","op":"mint","s":"diyordibots-v2","g": [1,6,17,23,7]

   - json parse -- 859: unexpected token at ':"orc-721","op":"mint","s":"diyordibots-v2","g": [1,6,17,23,7]'

!! ERROR(S) in  10369586 / f6c52d2ea4a414576d6e499094b744399d95ad1e2e8d9d80e37f015210ed52cdi0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,3,17,23,7]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,3,17,23,7]'

!! ERROR(S) in  10369587 / 296d6ae1008dde293f6f136d43722de1f7ab02dbecdf87c24294c046495e9574i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,2,17,23,7]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,2,17,23,7]'

!! ERROR(S) in  10369588 / 11dc7ef2c9298849667b8b7d3dadec9fc9c9691d1dcfc6b1e3b96dccf3b5ac9ai0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,1,17,23,7]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,1,17,23,7]'

!! ERROR(S) in  10369673 / baad8086fd532a5179de3ef9f0ab57d8a6721c5045decdf3d27a09cad6cbda96i0:
{"p": "orc-721","op": "mint',"s": "diyordibots-v2","g": "[3,5,16,24,7]"}

   - json parse -- 859: unexpected token at '{"p": "orc-721","op": "mint',"s": "diyordibots-v2","g": "[3,5,16,24,7]"}'

!! ERROR(S) in  10369701 / b4d79a5024cca856bc1fd1b7a247dea9b9735e5c575ef7e7a01571636c4482a3i0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots-v2",
   "g":[59,0,38]
}

   - protocol --  g no. 59 out-of-range 0-29 (30) in 'diyordibots-v2' mint
   - protocol --  g no. 38 out-of-range 0-29 (30) in 'diyordibots-v2' mint

!! ERROR(S) in  10369723 / b53815a3f7db08a821b72bf57c0a8d3c0c60db054814569d37d5d58df0a3b547i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[2,8,12,21,26]}{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[2,8,12,22,26]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[2,8,12,22,26]}'

!! ERROR(S) in  10369736 / 1e9d625100e5ae4a882d21a1b6ade4345820098295c2257121f853323f621d3ai0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,6,21,45,11]}

   - protocol --  g no. 45 out-of-range 0-29 (30) in 'diyordibots-v2' mint

!! ERROR(S) in  10369797 / bdf94fdcf60d745975a7b0d74aa95ad096ec745dab65f126b13d529cb4e810fci0:
diyordibots-v2{"p":"orc-721","op":"mint","s":"diyordibots","g": [1,5,18,25,8]}

   - json parse -- 859: unexpected token at 'diyordibots-v2{"p":"orc-721","op":"mint","s":"diyordibots","g": [1,5,18,25,8]}'

!! ERROR(S) in  10370235 / 34c5b04ad43299b98da492cb5f35e7acab7c660ac02b16c2d8eb0e70eb915e6ai0:
diyordibots-v2{"p":"orc-721","op":"mint","s":"diyordibots","g": [1,5,16,25,6]}

   - json parse -- 859: unexpected token at 'diyordibots-v2{"p":"orc-721","op":"mint","s":"diyordibots","g": [1,5,16,25,6]}'

!! ERROR(S) in  10370239 / f379546a47267073a73dc1563f8a0de19953f1e4c5dd82f74a2f2bba9e9c4585i0:
diyordibots-v2{"p":"orc-721","op":"mint","s":"diyordibots","g": [1,6,18,25,8]}

   - json parse -- 859: unexpected token at 'diyordibots-v2{"p":"orc-721","op":"mint","s":"diyordibots","g": [1,6,18,25,8]}'

!! ERROR(S) in  10370433 / 6defb65ba396d71731aa7a33f0f00374ff02e5c181f7318ddc776f417a4c5b91i0:
diyordibots-v2{"p":"orc-721","op":"mint","s":"diyordibots","g": [1,6,16,25,8]}

   - json parse -- 859: unexpected token at 'diyordibots-v2{"p":"orc-721","op":"mint","s":"diyordibots","g": [1,6,16,25,8]}'

!! ERROR(S) in  10370581 / 1d8976bf7fa759fad5a3b990c83426616dd0f9d32a7e7143b49e674f9cac93f0i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g": []}

   - protocol format -- empty g

!! ERROR(S) in  10370702 / 6b709e6b125b4210a086a7b63ec1612f235cc01d8cc2bdeb95626168a58888d6i0:
diyordibots-v2{"p":"orc-721","op":"mint","s":"diyordibots","g": [1,5,18,21,8]}

   - json parse -- 859: unexpected token at 'diyordibots-v2{"p":"orc-721","op":"mint","s":"diyordibots","g": [1,5,18,21,8]}'

!! ERROR(S) in  10371129 / 52878cb81d5217e113e729dd147f8fb793fdaa4f83be50998393edc1e822d226i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,6,17,23,3]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,6,17,23,3]'

!! ERROR(S) in  10371415 / 021c92066e45adb1de4fc4f7f60df160da28085135037331d461e74e11832362i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,6,17,23,4]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,6,17,23,4]'

!! ERROR(S) in  10371474 / e33b5adcbd37c3aad7127ffbc9d7e79835bfc9c075c1b4a986201d0611f678c9i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,6,17,23,6]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,6,17,23,6]'

!! ERROR(S) in  10371492 / 7ac66b2bb3db216399287584993984046c881f6b00864f2461d1c72c67de65f0i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,6,17,23,5]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2","g":[1,6,17,23,5]'

!! ERROR(S) in  10372243 / 65b85db77b44a4e1646de59a411bab9e14bbbeaa9e25cc67ff1ccdbc2525b11ei0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[3,6,21,21,8]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2""g":[3,6,21,21,8]}'

!! ERROR(S) in  10389843 / cc2c3627a1ff929e1e4a99088d358ac20361b861bda2f8a140dddc549d3af0f2i0:
{"p":"orc-721","op":"mint","s":"diyordibots-v2”,”g”:[1,6,23,9]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots-v2”,”g”:[1,6,23,9]}'


text:
####
#  to run use
#    $ ruby generate/diyapes.rb

require 'ordgen'

## note: change outdir (root for /num & /diypunks)
##          to where you want to save the generated images
outdir = '../ordbase.github.io'
# outdir = './tmp'

## step 1 - read (local) spritesheet.png ("art layers")
diyaliens    = Ordgen.read( './docs/diyaliens/spritesheet.png',
                                        width: 24,
                                        height: 24 )

## step 2 - read mint records
recs = read_csv( "./diyaliens/mint.csv" )
puts "   #{recs.size} record(s)"

# cut-down to max. limit
# recs = recs[0, 100]
# puts "   #{recs.size} record(s)"

## step 3 - auto-generate public images
recs.each_with_index do |rec,i|
  num = rec['num']
  g   = diyaliens._parse( rec['g'] )

  puts "==> aliens no. #{i} @ #{num} - g: #{g.inspect}"

  img = diyaliens.generate( *g )

  img.save( "#{outdir}/num/#{num}.png" )
  img.zoom(4).save( "#{outdir}/num/#{num}@4x.png" )

  ## img.save( "#{outdir}/diyaliens/#{g.join('_')}.png" )
  ## img.zoom(4).save( "#{outdir}/diyaliens/#{g.join('_')}@4x.png" )
end

puts "bye"


text:
####
#  to run use
#    $ ruby generate/diycoolcats.rb

require 'ordgen'

## note: change outdir (root for /num & /diycoolcats)
##          to where you want to save the generated images
outdir = '../ordbase.github.io'
## outdir = './tmp'

## step 1 - read (local) spritesheet.png ("art layers")
diycoolcats    = Ordgen.read( './diycoolcats/spritesheet.png',
                                          width: 24,
                                          height: 24 )

## step 2 - read mint records
recs = read_csv( "./diycoolcats/mint.csv" )
puts "   #{recs.size} record(s)"

# cut-down to max. limit
# recs = recs[0, 100]
# puts "   #{recs.size} record(s)"

## step 3 - auto-generate public images
recs.each_with_index do |rec,i|
  num = rec['num']
  g   = diycoolcats._parse( rec['g'] )

  puts "==> cat no. #{i} @ #{num} - g: #{g.inspect}"

  img = diycoolcats.generate( *g )

  img.save( "#{outdir}/num/#{num}.png" )
  img.zoom(4).save( "#{outdir}/num/#{num}@4x.png" )

  img.save( "#{outdir}/diycoolcats/#{g.join('_')}.png" )
  img.zoom(4).save( "#{outdir}/diycoolcats/#{g.join('_')}@4x.png" )
end

puts "bye"


text:
####
#  to run use
#    $ ruby generate/diybirdies.rb

require 'ordgen'

## note: change outdir (root for /num & /diybirdies)
##          to where you want to save the generated images
outdir = '../ordbase.github.io'
# outdir = './tmp'

## step 1 - read (local) spritesheet.png ("art layers")
diybirdies    = Ordgen.read( './diybirdies/spritesheet.png',
                                        width: 24,
                                        height: 24 )

## step 2 - read mint records
recs = read_csv( "./diybirdies/mint.csv" )
puts "   #{recs.size} record(s)"

# cut-down to max. limit
# recs = recs[0, 100]
# puts "   #{recs.size} record(s)"

## step 3 - auto-generate public images
recs.each_with_index do |rec,i|
  num = rec['num']
  g   = diybirdies._parse( rec['g'] )

  puts "==> bird no. #{i} @ #{num} - g: #{g.inspect}"

  img = diybirdies.generate( *g )

  img.save( "#{outdir}/num/#{num}.png" )
  img.zoom(4).save( "#{outdir}/num/#{num}@4x.png" )

  ## img.save( "#{outdir}/diybirdies/#{g.join('_')}.png" )
  ## img.zoom(4).save( "#{outdir}/diybirdies/#{g.join('_')}@4x.png" )
end

puts "bye"


text:
####
#  to run use
#    $ ruby generate/diypunks.rb

require 'ordgen'

## note: change outdir (root for /num & /diypunks)
##          to where you want to save the generated images
# outdir = '../ordbase.github.io'
outdir = './tmp'

## step 1 - read (local) spritesheet.png ("art layers")
diypunks    = Ordgen.read( './diypunks/spritesheet.png',
                                        width: 24,
                                        height: 24 )

## step 2 - read mint records
recs = read_csv( "./diypunks/mint.csv" )
puts "   #{recs.size} record(s)"

# cut-down to max. limit
# recs = recs[0, 100]
# puts "   #{recs.size} record(s)"

## step 3 - auto-generate public images
recs.each_with_index do |rec,i|
  num = rec['num']
  g   = diypunks._parse( rec['g'] )

  puts "==> punk no. #{i} @ #{num} - g: #{g.inspect}"

  img = diypunks.generate( *g )

  img.save( "#{outdir}/num/#{num}.png" )
  img.zoom(4).save( "#{outdir}/num/#{num}@4x.png" )

  img.save( "#{outdir}/diypunks/#{g.join('_')}.png" )
  img.zoom(4).save( "#{outdir}/diypunks/#{g.join('_')}@4x.png" )
end

puts "bye"


text:
####
#  to run use
#    $ ruby generate/diymartians.rb

require 'ordgen'

## note: change outdir (root for /num & /diypunks)
##          to where you want to save the generated images
outdir = '../ordbase.github.io'
# outdir = './tmp'

## step 1 - read (local) spritesheet.png ("art layers")
diymartians    = Ordgen.read( './docs/diymartians/spritesheet.png',
                                        width: 24,
                                        height: 24 )

## step 2 - read mint records
recs = read_csv( "./diymartians/mint.csv" )
puts "   #{recs.size} record(s)"

# cut-down to max. limit
# recs = recs[0, 100]
# puts "   #{recs.size} record(s)"

## step 3 - auto-generate public images
recs.each_with_index do |rec,i|
  num = rec['num']
  g   = diymartians._parse( rec['g'] )

  puts "==> martian no. #{i} @ #{num} - g: #{g.inspect}"

  img = diymartians.generate( *g )

  img.save( "#{outdir}/num/#{num}.png" )
  img.zoom(4).save( "#{outdir}/num/#{num}@4x.png" )

  ## img.save( "#{outdir}/diyaliens/#{g.join('_')}.png" )
  ## img.zoom(4).save( "#{outdir}/diyaliens/#{g.join('_')}@4x.png" )
end

puts "bye"


text:
####
#  to run use
#    $ ruby generate/diyordibots.rb

require 'ordgen'

## note: change outdir (root for /num & /diyordibots)
##          to where you want to save the generated images
# outdir = '../ordbase.github.io'
outdir = './tmp'

## step 1 - read (local) spritesheet.png ("art layers")
diyordibots   = Ordgen.read( './diyordibots/spritesheet.png',
                                          width: 32,
                                          height: 32 )

## step 2 - read mint records
recs = read_csv( "./diyordibots/mint.csv" )
puts "   #{recs.size} record(s)"

# cut-down to max. limit
# recs = recs[0, 100]
# puts "   #{recs.size} record(s)"

## step 3 - auto-generate public images
recs.each_with_index do |rec,i|
  num = rec['num']
  g   = diyordibots._parse( rec['g'] )

  puts "==> bot no. #{i} @ #{num} - g: #{g.inspect}"

  img = diyordibots.generate( *g )

  img.save( "#{outdir}/num/#{num}.png" )
  img.zoom(4).save( "#{outdir}/num/#{num}@4x.png" )

  img.save( "#{outdir}/diyordibots/#{g.join('_')}.png" )
  img.zoom(4).save( "#{outdir}/diyordibots/#{g.join('_')}@4x.png" )
end

puts "bye"


text:
####
#  to run use
#    $ ruby generate/btcwords.rb

require 'ordgen'

## note: change outdir (root for /num & /btcwords)
##          to where you want to save the generated images
# outdir = '../ordbase.github.io'
outdir = './tmp'

## step 1 - read (local) spritesheet.png ("art layers")
btcwords   = Ordgen.read( './btcwords/spritesheet.png',
                                          width: 102,
                                          height: 32 )

## step 2 - read mint records
recs = read_csv( "./btcwords/mint.csv" )
puts "   #{recs.size} record(s)"

## step 3 - auto-generate public images
recs.each_with_index do |rec,i|
  num = rec['num']
  g   = btcwords._parse( rec['g'] )

  puts "==> word no. #{i} @ #{num} - g: #{g.inspect}"

  img = btcwords.generate( *g )

  img.save( "#{outdir}/num/#{num}.png" )
  img.zoom(4).save( "#{outdir}/num/#{num}@4x.png" )

  img.save( "#{outdir}/btcwords/#{g.join('_')}.png" )
  img.zoom(4).save( "#{outdir}/btcwords/#{g.join('_')}@4x.png" )
end

puts "bye"


text:
####
#  to run use
#    $ ruby generate/diyapes.rb

require 'ordgen'

## note: change outdir (root for /num & /diypunks)
##          to where you want to save the generated images
outdir = '../ordbase.github.io'
# outdir = './tmp'

## step 1 - read (local) spritesheet.png ("art layers")
diyapes    = Ordgen.read( './docs/diyapes/spritesheet.png',
                                        width: 24,
                                        height: 24 )

## step 2 - read mint records
recs = read_csv( "./diyapes/mint.csv" )
puts "   #{recs.size} record(s)"

# cut-down to max. limit
# recs = recs[0, 100]
# puts "   #{recs.size} record(s)"

## step 3 - auto-generate public images
recs.each_with_index do |rec,i|
  num = rec['num']
  g   = diyapes._parse( rec['g'] )

  puts "==> apes no. #{i} @ #{num} - g: #{g.inspect}"

  img = diyapes.generate( *g )

  img.save( "#{outdir}/num/#{num}.png" )
  img.zoom(4).save( "#{outdir}/num/#{num}@4x.png" )

  ## img.save( "#{outdir}/diyapes/#{g.join('_')}.png" )
  ## img.zoom(4).save( "#{outdir}/diyapes/#{g.join('_')}@4x.png" )
end

puts "bye"


text:
####
#  to run use
#    $ ruby generate/diymaxibiz.rb

require 'ordgen'

## note: change outdir (root for /num & /diyphunks)
##          to where you want to save the generated images
outdir = '../ordbase.github.io'
# outdir = './tmp'

## step 1 - read (local) spritesheet.png ("art layers")
diymaxibiz    = Ordgen.read( './diymaxibiz/spritesheet.png',
                                        width: 24,
                                        height: 24 )

## step 2 - read mint records
recs = read_csv( "./diymaxibiz/mint.csv" )
puts "   #{recs.size} record(s)"

# cut-down to max. limit
# recs = recs[0, 100]
# puts "   #{recs.size} record(s)"

## step 3 - auto-generate public images
recs.each_with_index do |rec,i|
  num = rec['num']
  g   = diymaxibiz._parse( rec['g'] )

  puts "==> maxibiz no. #{i} @ #{num} - g: #{g.inspect}"

  img = diymaxibiz.generate( *g )

  img.save( "#{outdir}/num/#{num}.png" )
  img.zoom(4).save( "#{outdir}/num/#{num}@4x.png" )
end

puts "bye"


text:
####
#  to run use
#    $ ruby generate/diyphunks.rb

require 'ordgen'

## note: change outdir (root for /num & /diyphunks)
##          to where you want to save the generated images
outdir = '../ordbase.github.io'
# outdir = './tmp'

## step 1 - read (local) spritesheet.png ("art layers")
diyphunks    = Ordgen.read( './diyphunks/spritesheet.png',
                                        width: 24,
                                        height: 24 )

## step 2 - read mint records
recs = read_csv( "./diyphunks/mint.csv" )
puts "   #{recs.size} record(s)"

# cut-down to max. limit
# recs = recs[0, 100]
# puts "   #{recs.size} record(s)"

## step 3 - auto-generate public images
recs.each_with_index do |rec,i|
  num = rec['num']
  g   = diyphunks._parse( rec['g'] )

  puts "==> phunk no. #{i} @ #{num} - g: #{g.inspect}"

  img = diyphunks.generate( *g )

  img.save( "#{outdir}/num/#{num}.png" )
  img.zoom(4).save( "#{outdir}/num/#{num}@4x.png" )

  ## img.save( "#{outdir}/diyphunks/#{g.join('_')}.png" )
  ## img.zoom(4).save( "#{outdir}/diyphunks/#{g.join('_')}@4x.png" )
end

puts "bye"


text:
####
#  to run use
#    $ ruby generate/orangepixels.rb

require 'ordgen'

## note: change outdir (root for /num & /btcwords)
##          to where you want to save the generated images
outdir = '../ordbase.github.io'
# outdir = './tmp/orangepixels'

## step 1 - read (local) spritesheet.png ("art layers")
orangepixels   = Ordgen.read( './orangepixels/spritesheet.png',
                                          width: 24,
                                          height: 24 )

## step 2 - read mint records
recs = read_csv( "./orangepixels/mint.csv" )
puts "   #{recs.size} record(s)"

## step 3 - auto-generate public images
recs.each_with_index do |rec,i|
  num = rec['num']
  g   = orangepixels._parse( rec['g'] )

  puts "==> pixel no. #{i} @ #{num} - g: #{g.inspect}"

  img = orangepixels.generate( *g )

  img.save( "#{outdir}/num/#{num}.png" )
  img.zoom(4).save( "#{outdir}/num/#{num}@4x.png" )

  # img.save( "#{outdir}/orangepixels/#{g.join('_')}.png" )
  # img.zoom(4).save( "#{outdir}/orangepixels/#{g.join('_')}@4x.png" )
end

puts "bye"


text:
####
#  to run use
#    $ ruby generate/diypunks-v2.rb

require 'ordgen'

## note: change outdir (root for /num & /diypunks)
##          to where you want to save the generated images
# outdir = '../ordbase.github.io'
outdir = './tmp'

## step 1 - read (local) spritesheet.png ("art layers")
diypunks    = Ordgen.read( './diypunks/spritesheet.png',
                                        width: 24,
                                        height: 24 )

## step 2 - read mint records
recs = read_csv( "./diypunks-v2/mint.csv" )
puts "   #{recs.size} record(s)"

## cut-down to max. limit for now; sorry
## recs = recs[0, 721]
## puts "   #{recs.size} record(s)"

## step 3 - auto-generate public images
recs.each_with_index do |rec,i|
  num = rec['num']
  g   = diypunks._parse( rec['g'] )

  puts "==> punk no. #{i} @ #{num} - g: #{g.inspect}"

  img = diypunks.generate( *g )

  img.save( "#{outdir}/num/#{num}.png" )
  img.zoom(4).save( "#{outdir}/num/#{num}@4x.png" )

  img.save( "#{outdir}/diypunks/#{g.join('_')}.png" )
  img.zoom(4).save( "#{outdir}/diypunks/#{g.join('_')}@4x.png" )
end

puts "bye"


text:
!! ERROR(S) in  9999004 / 2a1a35600460a561e49b3118e7a48fa94005064b6189652a56ff3fc0af4db9fbi0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g":[2,8,10,23,26]
}

   - protocol -- 'diyordibots' mint inscribe no. 9999004 lower than deploy inscribe no 10339670

!! ERROR(S) in  10324736 / 63f7e903829e8ef69908f33870c0d8aaf10c119b044c13141d8474256dbeb03bi0:
{"p":"orc-721","op":"mint","s":"diyordibots","g":[58,7,26,12,38,39,44,53,55]}

   - protocol -- 'diyordibots' mint inscribe no. 10324736 lower than deploy inscribe no 10339670

!! ERROR(S) in  10325073 / cba81ba3b77dbb51c9279b8be2b1e7794d2f0ffbcb9fb4e5c36e534c466adc22i0:
{"p":"orc-721","op":"mint","s":"diyordibots","g":[58,7, 26,12,19]}

   - protocol -- 'diyordibots' mint inscribe no. 10325073 lower than deploy inscribe no 10339670

!! ERROR(S) in  10340398 / f900d0f3df683eefaef19916ad3f53786bd5df6b86351ed070ba3d034afb0e12i0:
"p": "orc-721",
  "op": "mint",
  "s": "diyordibots",
  "g": [
    0,
    4,
    14,
    25,
    8
  ]
}

   - json parse -- 859: unexpected token at ': "orc-721",
  "op": "mint",
  "s": "diyordibots",
  "g": [
    0,
    4,
    14,
    25,
    8
  ]
}'

!! ERROR(S) in  10344334 / d7796cc93377b48218700c39cde9f08033f0ae2b08753b4bf404273ad9df305ai0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [4,7,18,24,10]
}’

   - json parse -- 859: unexpected token at '’'

!! ERROR(S) in  10344375 / 477ea2bb98528ac15b11689c41c393eb03dd36b98502ae397919637a5b5c9cdei0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [3,6,19,25,10]
}’

   - json parse -- 859: unexpected token at '’'

!! ERROR(S) in  10344534 / 061bd972aaf3f9df267b4690ac8995f83985a229d3c7be395772d517e0a3f8dbi0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344535 / 35f6c2fa5cbb16a3deb9c8808d842818fcacd738eed50f996461ae7e9a8a2a0ci0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344536 / 52642216a5407078747053e34bdea25e47dbc675c87dc0e3d39bd55e9c4d4e12i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344537 / b6e0aa1f97cd20a0777fb0497c8d0f86883ea465dcce9782914a58579a2dbf24i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344538 / b53e376d05133fc1bb395355a173efc7461d85e56bd7bdcc5b55232be61c5b43i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344539 / b38e66d4d82bf713d84b7bb4d19a8bccb3faf2f02c23129f14143a0a8537f956i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344540 / 26699f1581c778377a3af6e33c37d72c3a2fa2ac95831b0ec329478427818d71i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344541 / 788323f847b055c90213bc3f1031294b32f4a2f0a727137bf04cf25c7c3ef680i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344542 / 5217dff6fc636b3cf0fb27c7690e35021f029a8146becff843ae60fe1b3aea8fi0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344543 / 0c0b40155b1958154c0012ce66c8fb00f6482d5dae0bdb459de24b02750efca4i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344544 / c7ed2fed654c44f081c2b8ddeb6314cb83a1dac35b3cace48e4f5e77e898a9b8i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344545 / a02eb2d6060d2d56bb94ecb25dc39cdc367c568c3758d7f73911fea9db2f35c3i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344546 / b257be97fba19d2c14d6c95d56d5a2c6896054386d9991cd187dabcff2344fc6i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344547 / c54e1b0707234a4c1f124952275c782340d4d39e8e10f4667849b9dce9d66bd5i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344548 / 509aa030a4049e83cad59e9369d538c205a5cb4304c11f36d058130235dbdfdai0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 3, 7, 16, 2, 8 ]'

!! ERROR(S) in  10344551 / 5c831e54e756cf4f0f454c5942ca58da84a7eaf277667d9177f411c5e620287ei0:
{"p": "orc-721",
  "op": "mint",
  "s": "diyordibots",
  "g": [
    1,
    6,
    11,
    18,
    24
  ]

   - json parse -- 859: unexpected token at '{"p": "orc-721",
  "op": "mint",
  "s": "diyordibots",
  "g": [
    1,
    6,
    11,
    18,
    24
  ]'

!! ERROR(S) in  10344553 / 3c04f086e1e483c62037dc95ce6070625f7e4b701b0b5dc787fac192b2d9c5c2i0:
{p": "orc-721",
  "op": "mint",
  "s": "diyordibots",
  "g": [
    1,
    3,
    16,
    23,
    7
  ]
}

   - json parse -- 859: unexpected token at '{p": "orc-721",
  "op": "mint",
  "s": "diyordibots",
  "g": [
    1,
    3,
    16,
    23,
    7
  ]
}'

!! ERROR(S) in  10344670 / ee902b4b4fb4a72f2d92540e6764fa10600f82560b6dc767cb7d5e5ee79c3fe2i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 2, 5, 3, 6, 3 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 2, 5, 3, 6, 3 ]'

!! ERROR(S) in  10344921 / 2cfa0391eaa50b470e425db85263b67ec284159a7c13014165ec6b9c89308225i0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [0,5,16,23,38]
}

   - protocol --  g no. 38 out-of-range 0-29 (30) in 'diyordibots' mint

!! ERROR(S) in  10344948 / 7a3ee0746e1c9c25f571f7162c49c8895c21541f504769fb83e48e5369760f2bi0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 0, 6, 11, 20, 13 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 0, 6, 11, 20, 13 ]'

!! ERROR(S) in  10344959 / ea1399d68886f09a82f0b85bbae0f48b76feb763221616ed8071cbaf8d469960i0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [59,38,23,8]
}

   - protocol --  g no. 59 out-of-range 0-29 (30) in 'diyordibots' mint
   - protocol --  g no. 38 out-of-range 0-29 (30) in 'diyordibots' mint

!! ERROR(S) in  10344963 / 03fd6af64cb9f2d16a01ecc9c4a8fad9a1501a3b75321b411f47c44b43649080i0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [0,4,23,9,38]
}

   - protocol --  g no. 38 out-of-range 0-29 (30) in 'diyordibots' mint

!! ERROR(S) in  10344974 / 8ba9f7543f0ab69326d692a8c818783af42a4cdb5b2512c62157da139d6140bdi0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 1, 5, 18, 23, 11 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 1, 5, 18, 23, 11 ]'

!! ERROR(S) in  10344978 / cd55a7fa5bdebc08d9d798b02401305bfe96f16cad598eb59430195b4a93d6d4i0:
{ "p":"orc-721", "op":"mint", "s":"diyordibots", "g": [1,6,21,25,9] }’

   - json parse -- 859: unexpected token at '’'

!! ERROR(S) in  10345018 / 1d7c4e7a3f4cbec62c83e4c4c5afaaa4366a3d6106cc27fac078349934d12b99i0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [0,59,16,38,8]
}

   - protocol --  g no. 59 out-of-range 0-29 (30) in 'diyordibots' mint
   - protocol --  g no. 38 out-of-range 0-29 (30) in 'diyordibots' mint

!! ERROR(S) in  10345019 / 56251feb8649839c41933724e8a18d717a75b3ecb0b8b7c47b7397338b9a1118i0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [2,5,19,24,11]
}’

   - json parse -- 859: unexpected token at '’'

!! ERROR(S) in  10345020 / 023bf8fe3ce70a3b28514b52645461c8c9aad47ae72e49ff956b1349801a0ecfi0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [0,5,15,24,7]
}’

   - json parse -- 859: unexpected token at '’'

!! ERROR(S) in  10345073 / a3ce9aeb31d5f79ef54d8f7d4bda32c5b6b9ec5b35c4ad09eea1aae0d2931270i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 1, 3, 6, 2, 6 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 1, 3, 6, 2, 6 ]'

!! ERROR(S) in  10345074 / ad559e4740a36a515492fb460b50cf6bffdebf27754e73e6101996b32f06e3a1i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 2, 3, 5, 3, 6 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 2, 3, 5, 3, 6 ]'

!! ERROR(S) in  10345075 / acfd3995fa67efbd59b219c96738e725a11f26bde246ec9e3b4598fca34798b2i0:
{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 2, 5, 6, 2, 5 ]

   - json parse -- 859: unexpected token at '{"p":"orc-721","op": "mint", "s": "diyordibots", "g": [ 2, 5, 6, 2, 5 ]'

!! ERROR(S) in  10345097 / 807382c27a2aeb2f1c8a796d918c68faad7f65ec65064e851915310768679fd3i0:
{
    "p": "orc-721",
    "op": "deploy",
    "slug": "diyordibots",
    "name": "D.I.Y. Ordibots",
    "max": 1000,
    "dim": "32x32",
    "generative": "<spritesheet/art layers inscription id here>"
}
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [2,4,15,23,9]
}
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [0,5,13,20,8]
}

   - json parse -- 859: unexpected token at '{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [2,4,15,23,9]
}
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [0,5,13,20,8]
}'

!! ERROR(S) in  10345100 / d88d6f441b7dd150bd61b5bdea7f10d2ac104eb54a1480f979581e4c8282371bi0:
{"p":"orc-721","op":"mint","s":"diyordibots","g": [2,5,16,23,9]}
{"p":"orc-721","op":"mint","s":"diyordibots","g": [0,4,16,23,8]}

   - json parse -- 859: unexpected token at '{"p":"orc-721","op":"mint","s":"diyordibots","g": [0,4,16,23,8]}'

!! ERROR(S) in  10345107 / 9ffc1b2fd5d97683447d490e81d0045abf6a1de0b1dbfe38d30468ec7cfc6691i0:
"p": "orc-721",
  "op": "mint",
  "s": "diyordibots",
  "g": [
    0,
    5,
    16,
    23,
    9
  ]
}

   - json parse -- 859: unexpected token at ': "orc-721",
  "op": "mint",
  "s": "diyordibots",
  "g": [
    0,
    5,
    16,
    23,
    9
  ]
}'

!! ERROR(S) in  10345305 / d752f61730fec7439043e065f56c4f719c5e550d6bb2d4dfebd546b9690a8898i0:
p": "orc-721", "op": "mint", "s": "diyordibots", "g": [ 0, 5, 21, 23, 8 ] }

   - json parse -- 859: unexpected token at 'p": "orc-721", "op": "mint", "s": "diyordibots", "g": [ 0, 5, 21, 23, 8 ] }'

!! ERROR(S) in  10345657 / 3701e1dad201376b7408b8b959fef9469bf29f5f42666f74e993b969f8ae14c9i0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [1,1,06,13,4]
}

   - json parse -- 451: unexpected token at '06,13,4]
}'

!! ERROR(S) in  10345764 / 8468e844b9c46580c916862944ce5dbeb51fbc6d9a00818073391982b438c200i0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyordibots",
   "g": [3,4,07,13,9]
}

   - json parse -- 451: unexpected token at '07,13,9]
}'


text:
####
#  to run use
#    $ ruby preview_v2/diypunks.rb

$LOAD_PATH.unshift( "../ordbase/ordinals/lib" )
$LOAD_PATH.unshift( "../ordbase/ordlite/lib" )
require 'ordlite'

OrdDb.open( './ord.db' )

## step 1 - read database "factory" record, that is, ordgen / ORC-721 deploy inscribe
rec = Factory.find( 'diypunks' )

puts "==> #{rec.id} >#{rec.name}< max. #{rec.max} - #{rec.dim} - inscribe no. #{rec.inscribe.num} - #{rec.inscribe.date}"

puts "   #{rec.layers.count} layer(s):"

generator = rec.generator
puts "      #{generator.count} tile(s)"

specs = [
  [0],
  [0,23,44],
  [0,38],
  [59,0,38],
  [1,27,38],
  [58,9,28,38],
  [0,15,31,44,54],
  [0,40,43,30],
  [59,0,47,44,29],

  ## preview asked for
  [5,10],
  [0,26,38,41],
  [8,11,57],
  [8,57,11],
  [5,27,38,55,57],
  [5,27,57,38,55],
  [5,57,38,55],

  [59,5,21,38,48,55],
  [59,5,21,38,55],
  [59,5,38,48,55],

  [1, 34, 42, 48],

  [6, 35, 54, 55],
  [6, 37, 54, 55],

  [59, 5, 26, 38, 43],

  [4,17,36,51],
  [59, 4, 26, 37, 44, 55, 57],

  # konf..
  [1,34,42,48],
  [5,34,42,48],

  # more
  [58,4,19],
]

specs.each do |attributes|
  puts "==> punk #{attributes.inspect}"
  punk = generator.generate( *attributes )

  path = "./preview_v2/tmp/punk-#{attributes.join('_')}"
  punk.save( path+'.png' )
  punk.zoom(4).save( path+'@4x.png' )
end

puts "bye"


text:
!! ERROR(S) in  11769188 / e1d42cb644f69e6f86ec437445e2c98bdd1c7fbb33ae37ed140b714efa4d5680i0:
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyaliens",
   "g":[0, 12, 25]
}

   - protocol -- 'diyaliens' mint inscribe no. 11769188 lower than deploy inscribe no 11834519

!! ERROR(S) in  11769307 / a6afda0c3ac6bafe6b0a97f5658120addfa960727695ef76cf165b45bca39dbbi0:
{
	"p": "orc-721",
	"op": "mint",
	"s": "diyaliens",
	"g": [0, 19, 23]
}

   - protocol -- 'diyaliens' mint inscribe no. 11769307 lower than deploy inscribe no 11834519

!! ERROR(S) in  11805793 / 3484c3d4487384d8e0493759d2475eaeda621930bc32d424030e95a835ed9608i0:
{"p":"orc-721","op":"mint","s":"diyaliens","g":[0,14,9]}

   - protocol -- 'diyaliens' mint inscribe no. 11805793 lower than deploy inscribe no 11834519

!! ERROR(S) in  11805794 / 3295a82240b456deb88e5718c70ee1318bf61952306807707188529e5aaca101i0:
{"p":"orc-721","op":"mint","s":"diyaliens","g":[0,16,9]}

   - protocol -- 'diyaliens' mint inscribe no. 11805794 lower than deploy inscribe no 11834519

!! ERROR(S) in  11805799 / 9dcd7803ab36afbfb4a4db2f0832c7dc04a5a0598b1814feaac4a89fce884d23i0:
{"p":"orc-721","op":"mint","s":"diyaliens","g":[0,15,9]}

   - protocol -- 'diyaliens' mint inscribe no. 11805799 lower than deploy inscribe no 11834519

!! ERROR(S) in  11805811 / b234c63f5dc4861b35cf81583ea986ef7c1f23ad34f62b0e97496b7c0f0e1969i0:
{"p":"orc-721","op":"mint","s":"diyaliens","g":[0,18,9]}

   - protocol -- 'diyaliens' mint inscribe no. 11805811 lower than deploy inscribe no 11834519

!! ERROR(S) in  11805818 / 201b778ab3b23f2dd16fcb6d116091ef8c5abddc2f8562163262f116ad592bcci0:
{"p":"orc-721","op":"mint","s":"diyaliens","g":[0,17,9]}

   - protocol -- 'diyaliens' mint inscribe no. 11805818 lower than deploy inscribe no 11834519

!! ERROR(S) in  11845038 / d1ff143f2b7a33bd1900d8ee0087d617bf1b1e54d556728a85b032b71e964b03i0:
{"p":"orc-721","op":"mint","s":"diyaliens","g":[25，0，19]}

   - json parse -- 451: unexpected token at '，0，19]}'

!! ERROR(S) in  11845039 / d40de05010dffdd16373a9acddede839cab357575039d5153ff2f480c49b980di0:
{"p":"orc-721","op":"mint","s":"diyaliens","g":[0，13，8]}

   - json parse -- 451: unexpected token at '，13，8]}'


text:
# D.I.Y. (Recursive) Aliens (max. 100)

## Fam

1x

![](i/diyaliens.png)

4x

![]()

![](i/diyaliens@4x.png)

## Wen Deploy?

> Bro, pls wait for me for several hours rest, then deploy

here's everything to make it happen
(no worries - don't wait for me - please go ahead - LFG!) and please post the link to the deploy inscription in the #generative-orc-721 channel.

here's the magic ORC-721 deploy text to inscribe (the max limit set to 100 plus the 26 recursive inscription ids (0-25) for the image generation) ...

``` json
{
    "p": "orc-721",
    "op": "deploy",
    "slug": "diyaliens",
    "name": "D.I.Y. Aliens",
    "max": 100,
    "dim": "24x24",
    "generative":
["81ec4177e7fce4e568cc1c14366fe29deb88b0f0841eb12d4f1d0638cca68201i0",
 "5ce9f89ad571e5380baa5b5ee387f08ea313421e7e54662b3899d411c39321ddi0",
 "1355524a2aab576e069bac91227b0e52d227d65d84c5535377d3a0ea4e44d470i0",
 "a6b4b81f69e8c217db24f0a71954195d67ced49a819b67a4daf9f3ca7fa1b971i0",
 "83827ec13cb55a35fe3adca5acf67caf943c3bd6810f8fa893b067e8015c8f19i0",
 "5b1e638c050318bec23f17b8b7758ccf13945e422516da6c722c67ae5ed4e26di0",
 "5dcf96b13e5762d5a288d8bee36deb933fe192a55475199fe9a39ae29dd16853i0",
 "5760ce05009e94a750a7245cac994fa9ffd388eadc757929ac17737811455429i0",
 "0bd902941392ea138adb7db30cecdf5bc09a92c80e3e1bc3ecdf3c2d0abf6631i0",
 "7c2fd41b52624ddb1ba11fe1c6d95475f2e42c4b53d6aaf6a16a09064acebe38i0",
 "0f473c9dcd14e3f43a6599b038d810eac16bc6394edcfcf6b32f8df992ab6791i0",
 "d32c50c23693a028e2381d6f756746a9ff684f2028edf694ab7b1b6cde78e2cdi0",
 "d61fc2a89ecc6ae65cf91cdfac9edc37fd60c38621dac211f3a70891ef79b69ai0",
 "680e2ee8cad86aa174b4f3373d733370c9a6fc4230b9708d520a0f6bcb8e72a6i0",
 "56d3f4f661b2b4a9fc17755171d7cf4da74e570614b6b45de0cc87a809c3eb3ci0",
 "fe4321178bd841e52fdeb72ce4456c5b7596c0d611b19da15ba75ec63b5314cai0",
 "eddc1242f0fd290e130332e046897ad41dce1e7e112df48ecf2168e43172d383i0",
 "a2110fb4afaa29bc70bcfac445f750ecb5e81777e8d080be2d2b07eb030ba0ffi0",
 "c1277df4b986067b2a3f006d717b7f6d042896840c8b592e5a8b9ff22444b08fi0",
 "722dfdc90a67ff7eb892d13393a8a5b360b8a109f3d809600919684a600ff60ei0",
 "06136a5b4fb585069ef6265a0fde3baf67ee914b9f784d2c951f3a8187800d54i0",
 "8043604c7c96a5a43a97e251b246102ca40c0203431ff21bd26f23330dfa554ci0",
 "92e7f48454546718f98103d7464d954033adbee21855f06584be06faa3e291ddi0",
 "a01012b213ed425c5d4038bc36016f19f4f342ca052ff9bf6971672164e1a402i0",
 "87d89d290ebde5d5b7aa75b4c8d0359515e25ea1542bc0646dc3f5b0b2fc55fdi0",
 "aab67a4269ca0bda649fe341bd88c862aba2e9bf6e0826b9dfa5c4ba8fe62c2di0"]
}
```

NOTE:  as always please double check
that your copy-n-paste text in json format is valid e.g. ->  https://jsonlint.com/

For the D.I.Y. Aliens (max. 100)  image previewer - see https://ordbase.github.io/generative-orc-721/diyaliens   and for a cheatsheet /  list of attributes (0-25) with categories / structure - see https://github.com/ordbase/generative-orc-721/blob/master/diyaliens/meta.csv

PS: For the mint text use - and fill-in the g numbers:

``` json
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyaliens",
   "g":[]
}
```

Example 1 - Alien

``` json
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyaliens",
   "g":[0]
}
```

![](i/alien-0.png)

4x

![](i/alien-0@4x.png)

Example 2 - Alien / Headband

``` json
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyaliens",
   "g":[0,4]
}
```

![](i/alien-0_4.png)

4x

![](i/alien-0_4@4x.png)

Example 2 - Alien / Mohawk / Earring

``` json
{
   "p":"orc-721",
   "op":"mint",
   "s":"diyaliens",
   "g":[0,1,20]
}
```

![](i/alien-0_1_20.png)

4x

![](i/alien-0_1_20@4x.png)

Here be dragons. Happy minting D.I.Y. Aliens (max. 100).  Wen deploy?

## Questions? Comments?

Please post in the #generative-orc-721 channel
in the ordinal punks discord.
For an invite
see <https://twitter.com/OrdinalPunks/status/1620230583711576068>.