Here’s a quick perl script I used to migrate Excalibur EFS 3.7 filerooms to Adobe Acrobat PDF’s. Keywords: excalibur, EFS, efsbatch.
Continue reading ‘Migrating Excalibur EFS to Adobe Acrobat PDF’s’ »
Upon thy belly shalt thou go….
Here’s a quick perl script I used to migrate Excalibur EFS 3.7 filerooms to Adobe Acrobat PDF’s. Keywords: excalibur, EFS, efsbatch.
Continue reading ‘Migrating Excalibur EFS to Adobe Acrobat PDF’s’ »
Here’s a quick script to determine shell, perl, PHP, and groff files, and then run a quick check on them. For my use, I also use the WDG’s ‘validate’ command-line HTML validator, from the OpenBSD ports/packages collection.
#!/bin/sh -x
# Use ls2mail to convert a LISTSERV(R) list archive to a UNIX mbox
# Then use Aid4Mail to convert the mbox to whatever you wish. It
# took under half an hour for me to convert a decade’s worth of around
# 50 lists into a single Outlook .pst file. Quite handy.
# SRCDIR is where the LISTSERV .LOG files are located
SRCDIR=’/home/me/LISTSERV’
DSTDIR=’/home/me/other’
cd $SRCDIR
for i in LISTONE LISTTWO LISTTHREE; do
# concatenate archives sequentially.
# if you have lists from the 80’s add a .LOG8* line…
cat $SRCDIR/$i.LOG9* >> $DSTDIR/$i
cat $SRCDIR/$i.LOG0* >> $DSTDIR/$i
# my LISTSERV install ran on Windows.
# this strips carriage returns (0×15) at the end of line.
perl -i -p -e ’s/\r$//’ $DSTDIR/$i
# now that a list’s archives are in one file, convert it to an mbox
cat $DSTDIR/$i | ./ls2mail.pl > $DSTDIR/$i.mbox
done
# here you should end up with $DSTDIR/(LISTONE|LISTTWO|LISTTHREE).mbox
# Again, just use Aid4Mail to convert it from there to whatever you wish.
# http://homepages.tesco.net/J.deBoynePollard/FGA/mail-mbox-formats.html
# http://hypermail-project.org/archive/99/12/1216.html
# http://www.aid4mail.com/
Book recommendations:
Marking Time: The Epic Quest to Invent the Perfect Calendar is a very good read; add it to your list. Then, if you’re in the mood for deeper reading, try the more scholarly and austere History of the Hour : Clocks and Modern Temporal Orders, which covers the evolution of timekeeping to regulate and limit — among other things — markets, sermons, and torture sessions.
My Visual Basic implementation (external link to PlanetSourceCode) of Lawrence Philips’ Double Metaphone phonetic algorithm (external link to Dr. Dobbs’ Journal)
RE: keyboard mappings (keymaps) on BeOS and its open-source successor Haiku.
# SAMPLE: 0xe28da1 # U+2361 APL FUNCTIONAL SYMBOL UP TACK DIAERESIS 0xe18f8a # U+13CA CHEROKEE LETTER QUU
The Unicode values and character names are taken from the 3.0 specification database.
I got a wild hair to start playing classical music on the banjo a while back.
I’ll add more songs as I learn them.
MP3 recording of Bach’s Prelude in C Major (BWV 846) on the 5-string banjo
To check DNS for errors:
http://www.dnsreport.com/ - View a quick sanity check of your zone (e.g. http://www.dnsreport.com/tools/dnsreport.ch?domain=snakelegs.org)
http://www.squish.net/dnscheck/
Men and Mice’s “DNS Expert” is pricy, but worth it.Here’s a list of each test DNS Expert performs.
Microsoft’s free DNSlint with a demonstration and training webcast
EXAMPLE:
#!/usr/bin/perl -w
use strict;
use Net::DNS;
use Net::DNS::ZoneCheck;
my $zonetocheck = “your.zone.com”;
my $res = Net::DNS::Resolver->new;
$res->nameservers(“your.nameserver.com”);
my @zone = $res->axfr($zonetocheck);
Net::DNS::ZoneCheck::check(records => \@zone, zone => $zonetocheck, strict_checks => “true”, soft_errors => “true”);
To check troff/groff input files for errors, run:
groff -b -z -w w filename
EXAMPLE:
groff -b -z -w w /usr/share/man/cat1/f77.0
/usr/share/man/cat1/f77.0:421: warning: escape character ignored before a backspace character
/usr/share/man/cat1/f77.0:425: warning: escape character ignored before a backspace character
/usr/share/man/cat1/f77.0:425: a backspace character is not allowed in an escape name
/usr/share/man/cat1/f77.0:428: warning: escape character ignored before a backspace character
/usr/share/man/cat1/f77.0:433: warning: escape character ignored before a backspace character
/usr/share/man/cat1/f77.0:763: warning: escape character ignored before a backspace character
To run a quick sanity check on a PHP script, run:
php -l filename
EXAMPLE:
Warning at line 46, character 15: net-enabling start-tag; possibly missing required quotes around an attribute value or using XHTML syntax in HTML
Error at line 61, character 61: text is not allowed here; try wrapping the text in a more descriptive container
Error at line 61, character 93: end tag for element “OPTION” which is not open; try removing the end tag or check for improper nesting of elements
Error at line 64, character 18: missing a required sub-element of “SELECT”
Error at line 69, character 30: required attribute “TYPE” not specified
Error at line 69, character 30: element “SCRIPT” not allowed here; check which elements this element may be contained within
To quickly check a perl script or module, run:
perl -c filename
Always turn on warnings and use strict:
#!/usr/local/bin/perl -w
use strict;
To check the pod documentation, run:
podchecker -warnings -warnings filename
EXAMPLE:
# podchecker -warnings -warnings /usr/local/bin/rsnapshot
*** WARNING: No items in =over (at line 4502) / =back list at line 4518 in file /usr/local/bin/rsnapshot
*** WARNING: No items in =over (at line 4546) / =back list at line 4559 in file /usr/local/bin/rsnapshot
*** WARNING: 2 unescaped <> in paragraph at line 4582 in file /usr/local/bin/rsnapshot
*** WARNING: 2 unescaped <> in paragraph at line 4584 in file /usr/local/bin/rsnapshot
*** WARNING: 4 unescaped <> in paragraph at line 4586 in file /usr/local/bin/rsnapshot
*** WARNING: 2 unescaped <> in paragraph at line 4589 in file /usr/local/bin/rsnapshot
*** WARNING: No items in =over (at line 4600) / =back list at line 4608 in file /usr/local/bin/rsnapshot
If you’re going to do it, do it right.
Use CSE HTML Validator to validate your HTML and CSS. It offers advice beyond syntax errors, like warning about variation in browser support for different constructs, and providing basic accessibility testing. I highly recommend it.
The W3 HTML Validator isn’t as good, but it’s free. The W3 CSS Validator works well.
The Web Design Group’s (WDG) offline validator is particularly handy for scripting.