URI: 
       ip-art-addresses.awk - annna - Annna the nice friendly bot.
  HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
   DIR Log
   DIR Files
   DIR Refs
   DIR Tags
   DIR README
       ---
       ip-art-addresses.awk (513B)
       ---
            1 #!/usr/bin/awk -f
            2 #
            3 # Original source by josuah. Thanks!
            4 #
            5 
            6 # usage: IP-prefix pixelfile
            7 
            8 BEGIN {
            9         prefix = ARGV[1]
           10 
           11         for (i = 1; i < ARGC; i++)
           12                 ARGV[i] = ARGV[i + 1]
           13         ARGC--
           14 
           15         pix_on = "7"
           16         pix_off = "1"
           17 }
           18 
           19 function pixel(pix) {
           20         pix = (pix == " " ? pix_off : pix_on )
           21         return pix
           22 #        return substr(pix, 1 + int(rand() * 2), 1)
           23 }
           24 
           25 {
           26         #$0 = ":" $0
           27         for (i = 0; length($0) > 0; i++) {
           28                 pix = pixel(substr($0, 1, 1))
           29                 row = row ((i % 4 == 0) ? ":" : "") pix
           30                 $0 = substr($0, 2)
           31         }
           32         print prefix row
           33         row = ""
           34 }
           35