Blosxom Hacking, Part Two

Since my original post about a Blosxom posting date preservation hack, a number of people have brought other text editing options to my attention. For example, those who find vi a little too esoteric but still need to edit blog entries remotely can use Pico—an excellent, terminal-based alternative. Just replace the line that executes vi with the following:

system 'pico', $file;

Those of the Windows persuasion may wish to make use of that platform’s ubiquitous Notepad application, and Matthew Magain reminds us that this is also an option. The only catch is that it is slightly more complicated. First, replace the vi-executing line in the Perl script with the following:

system 'notepad', $file;

Then save the Perl script somewhere (for example, “C:\Program Files\blosxom_edit\blosxom_edit.pl”), and create a Windows batch file containing the following (changing the path information as appropriate, of course):


@echo off

c:

cd\program files\blosxom_edit

perl blosxom_edit.pl %1

Assuming that Perl is in your path, you should now be able to run the batch script and edit the file using Notepad without changing the date.

Leave a Reply