Chunky Kibbles's Collection of Random Writings
Herein find some random stuff that I've written in the past
It's pretty much just all random stuff I've written to random people
in the hopes that it'll be of some interest
I'd love to hear from anyone who actually finds them of even remote
use
If it's all garbage, don't hesitate to e-mail me corrections, and
gain the dubious honor of having your name added to the bottom,
here.
Something from a sharper man than
I
The Linux Documentation
Project has the noble goal to `create the canonical set of free
Linux documentation'.
The Open Source Writer's
Group wants `to put together a comprehensive "card catalogue" of Open
Source and Open Source-related documentation'.
On the other hand, my pet hamster dressed up in a penguin suit, and
appeared to me in a dream, telling me to write documentation for random
stuff, and include lots of obscenities.
Disclaimer
If you break your machine, it's not my fault. If you e-mail me, I'll be
happy to try and help you out... we all know the routine by now.
In short, there is no warranty
$current_filename,
"titlelink" => $current_titlelink,
"description" => $current_description
);
}
} else if ($name == "filename") {
$current_filename = $current_string;
} else if ($name == "titlelink") {
$current_titlelink = $current_string;
} else if ($name == "description") {
$current_description = $current_string;
}
}
function characterData($parser, $data) {
global $current_string;
$current_string .= $data;
}
$xml_parser = xml_parser_create();
xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, false);
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");
/* The XML has an embedded DTD and everything here is set to be anal. I'm
protecting me from myself pretty heavily. I've deliberately unset
XML_OPTION_CASE_FOLDING so that there's no danger of me messing
anything up. If the XML has even a tiny bit wrong with it, everything
dies horribly. Damn me and my "Let's get this correct" */
if (!($fp = fopen($file, "r"))) {
die("could not open XML input");
}
while ($data = fread($fp, 4096)) {
if (!xml_parse($xml_parser, $data, feof($fp))) {
die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
}
}
xml_parser_free($xml_parser);
foreach ($items as $item) {
print("".
$item["titlelink"]
." - ".
$item["description"]
."
Last modifed ".
date("Y-m-d",filemtime($item["filename"]))
. "
\n\n");
}
?>
Thanks Phoenix, Arthur, Greg, Gareth, James, Beardy
Just an aside
In case anyone's interested, this page is being generated with some
XML voodoo.
I've had some complaints that the second of those links is
producing garbage. Stop using a browser that thinks it's cleverer
than the web server, and
get
one
that
belives
in
mime
types.