X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=extract_loadset;h=61326bdd0c575e3dfd069b18139926353c63aa8b;hp=43b2e5277c1abf5391e86f98944e9d4e7b73b0d1;hb=ed724b63f7d32cf5bb1a6e7b4c915d056413e899;hpb=7af21df77fb31c255c21c4a37addf7c645d42731 diff --git a/extract_loadset b/extract_loadset index 43b2e52..61326bd 100755 --- a/extract_loadset +++ b/extract_loadset @@ -41,7 +41,12 @@ open MI, '<', $conf->{input} or die "Can't open input file: $!\n"; open MO, '>', $conf->{output} or die "Can't open output file: $!\n"; while () { m/tag="$conf->{tag}".+?(\d+){reverse}) { + print MO if $exclude{$1}; + } else { + print MO unless $exclude{$1}; + } } @@ -58,6 +63,7 @@ sub initialize { 'output|o=s', 'tag|t=i', 'subfield|s=s', + 'reverse|r', 'help|h', ); show_help() unless $rc; @@ -85,6 +91,7 @@ Usage is: extract_loadset -l BOUND -i INPUTXML -o OUTPUTXML MATCHSET --output -o MARCXML output file --tag -t MARC tag to use as identifier (default: 903) --subfield -s Subfield of --tag argument (default: 'a') + --reverse -r Output subordinate bibs rather than lead bibs HELP exit; }