X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=extract_holdings;h=00e0d0d7d053c30fe94ada815751e3877e23cd87;hp=8415c6a9dd04529c146fc69799bf02e8adccac56;hb=4215eed3a4f18d11c7c537102d8ccb4e7fa2e4bc;hpb=072efb63a94c69c32a84c97b92d1d30441ab72f2 diff --git a/extract_holdings b/extract_holdings index 8415c6a..00e0d0d 100755 --- a/extract_holdings +++ b/extract_holdings @@ -6,7 +6,7 @@ use XML::Twig; use YAML; use JSON; -my $marcxml = shift; +my $marcxml = shift || help(); open HOLDINGS, '>', "holdings"; open X, '>', "holdings.x"; @@ -87,3 +87,11 @@ sub print_reports { print HOLDINGS join("\t", $holdings->{id}, $copy->{copyid}, $copy->{b}, $copy->{p}, $copy->{h}, $copy->{9}), "\n"; } + + +sub help { + print <