"The three chief virtues of a programmer are laziness, impatience and hubris."
- Larry Wall
This page contains a partial list of scripts I've written, mostly for myself. Feel free to use and modify these scripts, but please leave the attribution information at the beginning of the files. I don't make any claims that these are reliable or bug-free, especially for the ones I use rarely. (I would also write most of them very differently if I actually had the time to re-write them - but I don't.) They worked well enough for my purposes, and I'm placing them here in case they will be of use to others.
For most of these scripts, the directory and files must be executable, and your web server must be configured to run .cgi scripts from arbitrary directories. You may need to change the path to your python installation on the first line of the .cgi files.
Easy Survey v. 0.16
Photograph manager
Anonymous mailer
- Language: python
- Date written: April 2004
- Usage: occasionally by me
- Download: mailer.zip (2 files)
- Installation: Unzip anywhere.
- Description: Use or try out this tool here. This is a bare-bones script for sending text emails from any address accepted as valid by SMTP.
Printable online calendar
- Language: python
- Date written: December 2003
- Last updated: June 2005
- Usage: daily by me
- Download: calendar.zip (2 files)
- Installation: Unzip anywhere. The script will create two additional files, "events" and "archive".
- Description: This is an editable online calendar formatted for easy printing. The script displays by default sixteen weeks (a bit more than a full semester) starting with the beginning of the current month, which prints on two pages. Days that have passed are slightly greyed out (this is not visible in printing). Bare-bones controls for editing and viewing are at the bottom of the calendar (and prints on a third page with certain margin settings). Current and future events are stored using the pickle module in both the "events" and "archive" files, and past events are removed from the "events" file.
GRE Definition Grabber
- Language: python
- Date written: October 2003
- Usage: rarely by me and friends
- Download: definition.zip (4 files)
- Installation: Unzip anywhere. The script will create one additional file, "cached-vocab".
- Description: Use or try out this tool here.
UCBD Partner Match
- Language: python
- Date written: August 2003
- Usage: frequently by a wide ballroom audience
- Description: See UCBD's Partner Match.
UCBD Manager's Interface
- Language: python
- Date written: March 2003
- Usage: frequently by the UCBD officer board
- Description: Forthcoming. See the output at http://www.ucbd.org.
Python calendar module
- Language: python
- Date written: March 2003
- Usage: frequently, as part of UCBD Manager's Interface
- Download: calendar-module.py (1 file)
- Installation: Put anywhere. Put your webpage headers and footers in "headers.txt" and "footers.txt," respectively. Writes <month>.html files in the place specified by the path at the beginning of the script.
- Description: This is a collection of functions used to generate the calendar on the UCBD website. They generate <month>.html files for the current month and the next three months, linking between them. See http://www.ucbd.org/calendar.cgi for an example of the output of this script.
I wrote it a while ago and it isn't very organized or modular, but I've gotten several email requests for it so I thought I'd include it here. I've had to modify it to not rely on other files and haven't gotten a chance to test it post-modification, so there may be bugs in it from the modification.
Certain parts of it, especially the constants at the top and the function _calendar_entry(event) and the formatting of the input to _write_calendar(...), will need to be tailored to your application. Add page headers and footers (basically everything that wraps around the calendar) in files called headers.txt and footers.txt, respectively.