From 6a042b670017e578e830849a74d8f92889a65698 Mon Sep 17 00:00:00 2001 From: Shawn Boyette Date: Thu, 9 Oct 2008 05:38:12 +0000 Subject: [PATCH] trash filename must now be specified --- marc-cleanup | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/marc-cleanup b/marc-cleanup index f8d916c..0f7d638 100755 --- a/marc-cleanup +++ b/marc-cleanup @@ -23,7 +23,7 @@ my %trash = (); # hash for tags to be dumped initialize($conf); # read in trash tags file if it exists -populate_trash() if (-e '.trashtags'); +populate_trash() if ($conf->{trash}); my @record = (); # current record storage my %recmeta = (); # metadata about current record @@ -132,8 +132,8 @@ while (my $line = getline()) { # subfields can't be non-alphanumeric if ($line =~ />> TRASHTAGS FILE FOUND. LOADING TAGS TO BE STRIPPED FROM OUTPUT...\n"; - open TRASH, '<', '.trashtags'; + print $OUT ">>> TRASHTAGS FILE FOUND. LOADING TAGS TO BE STRIPPED FROM OUTPUT\n"; + open TRASH, '<', $conf->{trash} + or die "Can't open trash tags file!\n"; while () { my $lastwasrange = 0; my %lastrange = ( high => 0, low => 0); @@ -488,6 +489,7 @@ sub initialize { 'original-tag|ot=i', 'renumber-tag|rt=i', 'renumber-subfield|rt=i', + 'trash|t=s', 'help|h', ); show_help() unless $rc; -- 1.7.2.5