projects
/
crolist2marc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cf7450d
)
more tweaks to capitalization based on fields
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 14 Sep 2013 13:15:34 +0000
(15:15 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 14 Sep 2013 13:15:34 +0000
(15:15 +0200)
crolist2marc.pl
patch
|
blob
|
history
diff --git
a/crolist2marc.pl
b/crolist2marc.pl
index
50ae051
..
720b2e7
100755
(executable)
--- a/
crolist2marc.pl
+++ b/
crolist2marc.pl
@@
-10,7
+10,7
@@
use utf8;
my $data;
sub vc_casefix { # partial reverse-engeenered implementation of case mapping
my $data;
sub vc_casefix { # partial reverse-engeenered implementation of case mapping
- my ( $vc, $k, $rest ) = @_;
+ my ( $
tag, $sfi, $
vc, $k, $rest ) = @_;
$vc .= " " x (4 - length($vc));
$vc .= " " x (4 - length($vc));
@@
-27,7
+27,7
@@
sub vc_casefix { # partial reverse-engeenered implementation of case mapping
$sel >>= 1;
}
$sel >>= 1;
}
- if ( substr($vc,0,1) eq 'x' ) {
+ if ( substr($vc,0,1) eq 'x'
|| ( $vc eq 'am ' && $tag =~ m/^(200|210|225)$/ ) ) { #&& $sfi eq '$a' )
) {
$fixed = ucfirst $fixed;
}
$fixed = ucfirst $fixed;
}
@@
-86,7
+86,7
@@
csv_file( 'tsv/TEKTAG.csv', sub {
my ( $idsl, $tag, $tagno, $id, $sfi, $sfino, $textkey, $textres, $vc ) = split(/\t/,$_);
my ( $idsl, $tag, $tagno, $id, $sfi, $sfino, $textkey, $textres, $vc ) = split(/\t/,$_);
- my $text = vc_casefix( $vc, $textkey, $textres );
+ my $text = vc_casefix( $
tag, $sfi, $
vc, $textkey, $textres );
return ( $idsl, $tag, $tagno, $id, $sfi, $sfino, $text );
});
return ( $idsl, $tag, $tagno, $id, $sfi, $sfino, $text );
});
@@
-96,7
+96,7
@@
csv_file( 'tsv/NUMTAG.csv', sub {
my ( $IDSL, $TAG, $TAGNO, $ID, $SFI, $SFINO, $LTAG, $LTAGNO, $LID, $LSFI, $TXKEY, $TXRES, $VC, $STOPW ) = split(/\t/,$_);
my ( $IDSL, $TAG, $TAGNO, $ID, $SFI, $SFINO, $LTAG, $LTAGNO, $LID, $LSFI, $TXKEY, $TXRES, $VC, $STOPW ) = split(/\t/,$_);
- my $text = vc_casefix( $VC, $TXKEY, $TXRES );
+ my $text = vc_casefix( $
TAG, $SFI, $
VC, $TXKEY, $TXRES );
return ( $IDSL, $TAG, $TAGNO, $ID, $SFI, $SFINO, $text );
});
return ( $IDSL, $TAG, $TAGNO, $ID, $SFI, $SFINO, $text );
});