Skip to content

Instantly share code, notes, and snippets.

@sr
Created December 26, 2008 19:10
Show Gist options
  • Save sr/40110 to your computer and use it in GitHub Desktop.
Save sr/40110 to your computer and use it in GitHub Desktop.
#!/bin/bash
cat <<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Notes en Vrac</title>
<link rel="alternate" type="application/atom+xml"
title="Notes en Vrac (Atom)" href="/notes/feed" />
<style type="text/css">
@import "/2008/10-crumb.css";
body { margin: auto; width: 60%;
font: 1em/1.3 Arial, sans-serif;
color: #111111; background: #fff; }
h1, h2, h3 {
font-family: "Gill Sans", sans-serif; }
h1 { font-variant: small-caps; }
h1 a { color: #000; text-decoration: none; }
address { text-align: center;}
address:before { content: "— ";}
</style>
</head>
<body>
<p id="crumb"><a href="/">atonie.org</a> → <a href="/notes">notes</a></p>
<h1>Notes en Vrac</h1>
<p>Miscellaneous hypertext notes by Simon Rozet.
You can <a href="/notes/feed">subscribe</a> or browse the archives.</p>
<ul id="archives">
EOF
for fn in $(ls -1 **/*.html | grep -vE '(index)' | sort -r)
do path=`echo "$fn" | tr -d ".html"`
size=$(wc -w $fn | awk '{print $1}')
total=$(($total + $size))
echo "<li><a href=\"/notes/$path\">$(echo $path | tr "/" "-")</a> ($size words)</li>"
done
echo '</ul>'
echo "<p>For a total of $total words.</p>"
cat <<EOF | textile
h2(#flogosphere). Flogosphere
* "The Flog":http://d8uv.org/flog -- Cody Woodard
* "Gallimaufry of Whits":http://inamidst.com/whits -- Sean B. Palmer
* "Notes en Vrac":http://atonie.org/notes -- Simon Rozet
* "Vinc' Notes":http://aon.shortbrain.org/notes/ -- Vincent Demeester
h2(#colophon). Colophon
Inspired by Sean B. Palmer's "Gallimaufry of Whits":http://inamidst.com/whits
and Christian Neukirchen's "Anarchaia":http://anarchaia.org/
Note are handcrafted in "Textile":http://redcloth.org/textile and converted to HTML
using "Statig":http://github.com/sr/statig. The archive is generated using a
"bash script":/notes/2008/10-index.sh.txt and the "Atom feed":/notes/feed converted
from "hAtom":http://microformats.org/wiki/hatom to HTML with the help
"mofo":http://mofo.rubyforge.org.
<address><a href="http://purl.org/net/sr/">Simon Rozet</a>, atonie.org</address>
</body>
</html>
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment