#!/usr/bin/perl # compare2html.pl - transform a simple tab-delimited file into an HTML file # Eric Lease Morgan # April 4, 2016 - first cut # require use strict; # sanity check my $file = $ARGV[ 0 ]; if ( ! $file ) { print "Usage: $0 \n"; exit; } # initialize my $rows = ''; # process each row in a database open DB, " < $file" or die "Can't open $file ($!). Call Eric\n"; my $count = 0; while ( ) { if ( $count ) { # build a set of rows chop; my ( $id, $oldName, $koha, $newName, $lccn, $loc ) = split /\t/, $_; my $row = "$id$oldName
$newName"; $rows .= $row; } # increment $count++; } # build the html, output, and done my $html = &template; $html =~ s/##ROWS##/$rows/e; print $html; exit; # return a simple html template sub template { return < Compare & contrast

Compare & contrast

Use this file to compare & contrast the authority names. Each row includes a local identifier and two names. The first name is the name used in the existing authority file. The second name is the proposed authority listing. Each name is hotlinked to a full display in the local ILS or at the Library of Congress. Yes, I know. Weird characters exist in the display, but I'm confident they will not be "goofy" in the final result. --Eric Lease Morgan (April 4, 2016)

##ROWS##
EOF }