projects
/
crolist2marc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f38a1bf
)
support tables with different number of columns (NUMTAG)
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 14 Sep 2013 12:55:15 +0000
(14:55 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 14 Sep 2013 12:55:15 +0000
(14:55 +0200)
csv2tsv.pl
patch
|
blob
|
history
diff --git
a/csv2tsv.pl
b/csv2tsv.pl
index
fdbd848
..
6ace7eb
100755
(executable)
--- a/
csv2tsv.pl
+++ b/
csv2tsv.pl
@@
-23,7
+23,7
@@
while(my $line = <>) {
if ( $#v > $cols ) {
#warn "FIX $#v $cols", dump(@v);
my @l2 = splice( @v, -2 ); # keep last two
if ( $#v > $cols ) {
#warn "FIX $#v $cols", dump(@v);
my @l2 = splice( @v, -2 ); # keep last two
- my @fix = splice( @v,
6
);
+ my @fix = splice( @v,
$cols - 3
);
warn "XXX before ",dump( @fix );
my ( $k, $v ) = ( shift(@fix), '' );
while ( @fix && (( length($k) + length($fix[0]) ) < 8 ) ) {
warn "XXX before ",dump( @fix );
my ( $k, $v ) = ( shift(@fix), '' );
while ( @fix && (( length($k) + length($fix[0]) ) < 8 ) ) {