<?xml version="1.0"?>
<?python
 import time
 import comick

 def human(u):
   # clutter
   u = u.replace("/www.", "/", 1)
   u = u.replace("http://", "", 1)
   # tlds
   u = u.replace(".com/", "/", 1)
   u = u.replace(".org/", "/", 1)
   u = u.replace(".net/", "/", 1)
   # common webcomics house domains
   u = u.replace(".keenspace/", "/", 1)
   u = u.replace(".keenspot/", "/", 1)
   u = u.replace(".comicgenesis/", "/", 1)
   # file types
   u = u.replace(".html", "", 1)
   u = u.replace(".htm", "", 1)
   u = u.replace(".php", "", 1)
   u = u.replace(".aspx", "", 1)
   # generic page structure
   u = u.replace("/index", "/", 1)
   u = u.replace("/latest", "/", 1)
   u = u.replace("/comic", "/", 1)
   u = u.replace("/pages", "/", 1)
   u = u.replace("/current", "/", 1)
   u = u.replace("/default", "/", 1)
   u = u.replace("/Default", "/", 1)
   # left over clutter
   u = u.rstrip("/")
   return u
?>
<html xmlns:py="http://purl.org/kid/ns#">
<head>
<title>Comics I read</title>
</head>
<body>
<h1>Comics I read</h1>
<p>These urls point to the web pages for the comics I read.  This is
generated using the <a href="index.html">comick.py</a> script and a 
<a href="http://lesscode.org/projects/kid/">"Kid"</a> 
<a href="comickpage.kid">template</a> to create this page.</p>

<p>This page is just to provide public linkage to these comics; the
monitoring script opens the pages directly in my browser - but I
switched python html pretty printers in late 2005, and the new one
doesn't turn in-code urls into links.  Rather than lose that
altogether, here's a cleaner page of actual links.</p>

<p>(It's also useful if I want to check comics from a kiosk or phone
without my last-seen database handy...)</p>

<p>Last generated ${time.ctime()} - which means that while some of
these comicks are slow or non-updating (Argon Zark, for example, seems
to be on a six-months-per-page schedule, but it <i>is</i> updating,
and this script is the only way I can sanely keep up with it) the
links themselves will be mostly good, unlike many other comic
linkdumps.</p>

<ul py:for="u, checkproc, arg in comick.sites">
<li><a href="${u}">${human(u)}</a></li>
</ul>
</body>
</html>