Downloads

This is source code I've made available for download. Stricly for educational purposes, provided without warranty, use at your own discretion, yadda yadda yadda.

Blosxom Code

Blosxom 3 advertises itself as alpha quality code. It's actually in pretty good shape (my weblog is running with it) but it has one serious problem. It's designed as a series of handlers that you can override with your own code, but a bug in the code doesn't allow you to override half of them (the flow handlers.) There are also several other small fixes in the patch, including a fix that strips comments off the end of handler name, which seems to be Rael's intention. Edit Blosxom using the code in this source file in order to get a version of Blosxom 3 that allows you to override flow handlers.
View Download

The Calendar plugin creates an html table representing a month's calendar. Dates in the calendar are links to entries made on that day, if any were made that day.
View Download

The Search plugin adds searchability to your Blosxom weblog. It creates a form that you can use to search for words in your Blosxom entries.
View Download

Paginate is a plugin that displays successive page of entries. You access older and newer pages of entries by clicking on links. This module contains the logic that determines where pages of entries start and end. It also contains code that creates links to the next older and next newer page of entries.
View Download

DumpContent is a Blosxom plugin that helps you debug your Blosxom code. If you place it in the handlers.flow file, the normal output of Blosxom will be replaced by the contents of the $state variable at the point where it is placed.
View Download

StopTheFuture is a Blosxom plugin that prevents files with dates in the future from being displayed by Blosxom. This allows you to post files today and change their modification date with the touch command so they will not be visible until the date you gave in the touch command.
View Download

The Summarize plugin produces an excerpt from the beginning N characters of a post that has all html removed. I wrote this plugin to get my RSS feed to validate. If I left html markup in the feed there was too great a chance that incorrect markup would invalidate the RSS feed and cause it not to display in some newsreaders.
View Download

The DynamicTemplate plugin is a replacement for the Interpolate method in Blosxom 3. It is an upwardly compatible extension that adds if, include, and set commands and others to Interpolate. Commands are places on their own line and start with a sharp (#) character. Further documentation on what the plugin can do are included in the documentation inside the file.
View Download

One of the features of the DynamicTemplate module is the ability to write filters, which are subroutines which process portions of a template after variables have been interpolated. I've written an example of filter called encode. It replaces a section of text with Javascript code which when run reproduces the original text. It's intended to hide email addresses from spam harvesters.
View Download

The companion to DynamicTemplate is StaticTemplate. It's designed to keep a consistent appearance between all pages on a web site, both static and those generated by Blosxom. It uses a template file that contains the common html code used by all pages on the site. It's intended for web sites that contain a combination of static web pages and pages generaated by several cgi scripts. It requires the HtmlBlocks package mentioned below.
View Download

CGI Scripts

Search_engine is a Perl CGI script that implements a simple search engine for a web site. It doesn't use an index, it searches the html files when the search is submitted.
View Download

The Boger Card Repertory is a small CGI the demonstrates how a homeopathic repertory works. Cyrus Boger was a homeopathic doctor who practiced in West Virginia in the first third of of the twentienth century. He is probably best known for translating Boenninghausen's repertory into English. The card repertory is a distillation of Boenninghausen's method. A working version of the script can be found on the Baltimore Homeopathic Study Group web site. The script is bundled with its data file, html templates, and Perl modules it uses.
Download

Perl Modules

HtmlBlocks forms the back end of a simple templating system. Regions of an html template are delimeted by special comments. The substitute subroutine replaces thes regions with the corresponding values in a hash. The extract subroutine will create a hash from an existing html file. By combining the two subroutines, you can merge the content of one page with another.
View Download

Comment blocks in the template are wrapped in html comments that look like

<!-- begin name -->
<!-- end name -->

where name is any identifier string.

Yeti stands for "yet another interpolator." It is intended for use in cgi script, but its use is not limited to them, and can be used for other tasks. The code is quite short compared to other templating libraries, yet provides all the capabilites I've found necessary for cgi scripting.
View Download

Textdb implements a simple text database and is intended for use with cgi scripts. Fields can span several lines. The file format is designed to be easy to create and update with a text editor. There is nothing unique or wonderful about this module, but it's served me well in a number of cgi scripts.
View Download

Perl Scripts

Followme is a script that uses HtmlBlocks. It produces a new html file from a template and an old html file. The purpose if this script is to keep html files in synch with a template. One changes the template and then runs this script to propogate the changes in the template to the other html files.
View Download

Webwatcher watches a list of URLs. The URLs are read from a file containing a list of URLs, one per line. To modify the list of URLs to check add or delete lines from the file.
View Download

Webwatcher gets the web page and computes a checksum. It compares the checksum to the previous run to see if the page has changed. If any page has changed, it sends a mail message with the changed pages. This script is meant to be run as a cron job on your ISP.

Javascript

I've revised my Tibetan calendar script so that it properly computes the Tibetan date in the Phukluk and Tsurluk calendar systems over the decade from 2000 to 2009. I was able to do this thanks to the calendars at Ed Henning's Kalachakra site. To use the script on a web page, add the following line to the html header section.

<script language="JavaScript" src="tibdate.js"></script>

Then add the following lines at the point where you want the current Tibetan date to appear.

<script language="JavaScript">
document.write("<div>Today's Tibetan date is the ");
document.write (getTibetanDate("p") + "</div>");
</script>

The "p" that is passed as an argument to getTibetanDate tells the script to use the Phukluk calendar. This is the most commonly used Tibetan calendar. If you would rather use the Tsurluk calendar, used in the Karma Kagyu tradition, replace the "p" with a "t".
View Download

Kate McDonnell has translated this script into French. You can download the French version from her site.

Random Quotes

The script onlique.js displays a random card from Brian Eno's Oblique Strategies. The Oblique Startegies are a set of cards written y electronic musician Brian Eno that give open ended advice to stimulate the creative process.
View Download

The scripts random_37.js and sequential_37.js display verses from the text The 37 Practices of a Bodhisattva. In the former case the verse is chosen at random. In the latter case. it displays each verse in order, one day at a time.
View Download

The script random_instruction.js displays a random quote from the mind training instructions of the Seven Points of Mind Training. Along with the instruction, it displays a link to Thrangu Rinpoche's commentary on that instruction. The script sequential_instruction.js displays a new mind training instruction each day. The scripts plus Thrangu Rinpoche's commentary are contained in a zipped folder.
Download