Orphan Non Home Pages

It's interesting on occasion to see a list of all pages that are not pointed to by anything other than a ChangesInXXX page, and which themselves do not point to CategoryHomePage.

Obtained by a simple gawk script to process links.txt ...

BEGIN {
print ""
print "Orphan pages other than home pages. Specifically, pages
"
print "on the C2 wiki that are not pointing to CategoryHomePage,
"
print "and are not pointed to by anything other than ChangesInXXX.

"
print "

    "
    }
    /CategoryHomePage/ { for (i=2;i<=NF;i++) tgts[$i] = 1 ; next }
    /^ChangesIn/ { next }
    { pages[$1] = $1
    for (i=2;i<=NF;i++)
    tgts[$i] = 1
    }
    END {
    n = asort(pages)
    c = 0
    for (i=1;i<=n;i++) {
    p = pages[i]
    if (!(p in tgts)) {
    print "
  1. http://c2.com/cgi/wiki?" p "\">" p "
  2. "
    c++
    }
    }
    print "
"
print c " pages, generated automatically at"
system("date")
print ""
}

CategoryWikiMaintenance


In case you're interested, 1571 pages, generated automatically at Mon Apr 28 10:05:06 BST 2008