This section contains various code I've written over the years. The boxes on the right relate to larger and older projects of mine. Shelved projects are things I've worked on fairly recently and, while not working on currently, might get back to at some point. Archived projects are old stuff that I have no plans on touching again unless I'm feeling sentimental.
Below are things I'm currently working on or are just small bits that I'm including here to have something on this page.
Mail Scripts
Script useful for mail. The mutt viewers are particularly handy.
- mailto - Firefox xterm/mutt caller.
- mutt-view-html - View html attachement from mutt in firefox (including attached images).
- mutt-view-images - View attached images from mutt.
- corpuscleaner - Python script to clean duplicates and binary attachments (keeping the attachment's headers) out of my spam corpus so it doesn't hog so much space. Useful for those of us who keep around 1000's of spam for training their baysian filters.
- bogominitrain.py - A python rewrite of the perl program of the same name that comes with bogofilter.
X Shell Scripts
Scripts handy while in X Windows. I have these all bound to keys and use them all the time.
- terminal_colors - Displays charts for 256/88/16 terminal color modes, auto-detecting correct mode for terminal. Also supports converting between 256/88 color values.
- scx - Spell check primary X selection.
- wnx - Dictionary lookup of primary X selection.
- xcopy - Copy primary X selection to clipboard.
- xpaste - Paste clipboard to primary X selection.
- bugmenot - Popup bugmenot info for selected URL.
Misc Shell Scripts
Other scripts I've found useful. Use the 2 vim ones quite a bit. Though the memory usage script is the best I've found.
- vimhelp - Vim help from command line (with zsh completion tip).
- pager - Vim as page reader (PAGER). Used with the above vimhelp and pager scripts.
- pager.vim - Vim settings to get it to act in a pager like way.
- man_title.vim - Sets the x-terminal's titlebar to the man page topic.
- realmemory - Display more accurate memory usage for process/app.
Openbox3 MPD pipemenu
Simple python script for controlling MPD from an Openbox3 pipemenu. View the current song, play/pause/stop, next/previous, volume, output control, toggle random/repeat, update the database and start/kill the mpd daemon. Simple setup, directions in the comments.
Changelog:
2007-09-09 - Fixed compatibility issue with mpdclient2 version 1.0 vs. 11.1
which I have (debian).
2007-11-18 - Added playlist load/clear support.
Openbox3 keybindings toggle
This is a set of scripts for having a menu entry that lets you toggle on and off your keybindings. The first 2 shell scripts are for toggling the eybindings on/off and generating the pipe-menu entry. The menu entry changes from "Turn On" to "Turn Off" given the current state, so it works as an indicator as well as a switch.
Zhar.net template system
zgen v0.5
- README - brief docs, changelog, etc.
- process.py - you exec this one.
- options.py - option processing.
- PageTemplate.py - class defs.
- layout.tmpl - my top level Cheetah template.
- zhar-template.tar.gz - a tarball of the directories/templates used to generate this site (sans images and other big files). Provided as an example.
My previous site was hosted in Zope but for my new site I wanted to simplify and eliminate overhead with a static site. While that sounded nice, I had gotten accustomed to having a template system for site design. So I went shopping for a template system I could use to generate a static site. I wasn't able to find anything I really like so I decided to roll my own.
It is a pretty simple system written in Python consisting of just a few files. It uses Cheetah for its basic template rendering and a simple heirarchical directory layout for organization. At this point it would be mostly of use to people already familiar with Python or willing to get that way. It is pretty flexible, but requires python for any significant change from its default setup.
The basic structure is to have a top level Cheetah template that is used for every page. The layout is a directory based heirarchy with one page per directory. The main template has a hook to pull in the body of the page. Each an every bit of content is rendered as its own template, so you can build up the pages from parts and pull in content from other areas. Other features include a sitemap, modification tracking to speed up processing, command line option parsing with config file support, plus a few other things. The code is commented a bit, but I wrote it primarily for my own use and thus documentation is lacking. If you think it might be useful to you but have some questions please drop me a line and I'll do all I can to help.