Introduction
Introduction Statistics Contact Development Disclaimer Help
ip-art-addresses.awk - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
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
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.