-
Notifications
You must be signed in to change notification settings - Fork 0
/
htb_alephseq_numberlist_to_marcxml
executable file
·55 lines (45 loc) · 1.29 KB
/
htb_alephseq_numberlist_to_marcxml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/perl
use strict;
use FindBin;
use lib $FindBin::Bin;
use HierarchyToolbox;
use Getopt::Long;
use File::Basename;
sub usage {
my $PROG=File::Basename::basename($0);
print STDERR<<EOD;
$PROG - 15.02.2008 (c) andres.vonarx\@unibas.ch
usage: $PROG [options]
Reads an Aleph sequential file and a numberlist (a text file consisting
of one Aleph system number per line). Converts all records listed in
numberlist into MARC21 XML.
options:
--help show this text and quit
--version show version information and quit
--alephseq=filename Aleph sequential input file (mandatory)
--numberlist=filename textfile with lines of Aleph system numbers (mandatory)
--output=filename XML output file (default: stdout)
example:
\$ $PROG --aleph=full.seq --numberlist=select.txt --output=select.xml
EOD
exit;
}
my $opt;
my $infile = '';
my $numberlist = '';
my $outfile = '-';
GetOptions(
'help' => \$opt->{help},
'version' => \$opt->{help},
'alephseq=s' => \$infile,
'numberlist=s' => \$numberlist,
'output=s' => \$outfile,
) or usage;
($opt->{help}) and usage;
($infile) or usage;
($numberlist) or usage;
convert_alephseq_to_marcxml(
infile => $infile,
outfile => $outfile,
numberlist => $numberlist
);