projects
/
irspy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
58ed672
)
less verbose output, configurable
author
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 14 Apr 2010 10:32:09 +0000
(10:32 +0000)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 14 Apr 2010 10:32:09 +0000
(10:32 +0000)
bin/irspy-dump.pl
patch
|
blob
|
history
diff --git
a/bin/irspy-dump.pl
b/bin/irspy-dump.pl
index
e30e320
..
4e62a8b
100755
(executable)
--- a/
bin/irspy-dump.pl
+++ b/
bin/irspy-dump.pl
@@
-6,6
+6,8
@@
# $ irspy-dump.pl irspy.indexdata.com:8018/IR-Explain---1
# $ cd ..
# $ tar cfz records-2010-04-06.tar.gz records-2010-04-06
# $ irspy-dump.pl irspy.indexdata.com:8018/IR-Explain---1
# $ cd ..
# $ tar cfz records-2010-04-06.tar.gz records-2010-04-06
+#
+# or: cd zebra; make dump
use strict;
use warnings;
use strict;
use warnings;
@@
-23,14
+25,17
@@
my $rs = $conn->search_pqf('@attr 1=_ALLRECORDS @attr 2=103 ""');
my $n = $rs->size();
$| = 1;
print "$0: dumping $n records\n";
my $n = $rs->size();
$| = 1;
print "$0: dumping $n records\n";
+
+my $step = 200;
+my $step2 = 10;
foreach my $i (1..$n) {
foreach my $i (1..$n) {
- print ".";
- print " $i/$n (", int($i*100/$n), "%)\n" if $i % 50 == 0;
+ print "." if $i % $step2 == 0;
+ print " $i/$n (", int($i*100/$n), "%)\n" if $i % $step == 0;
my $rec = $rs->record($i-1);
my $xml = $rec->render();
open F, ">$i.xml";
print F $xml;
close F;
}
my $rec = $rs->record($i-1);
my $xml = $rec->render();
open F, ">$i.xml";
print F $xml;
close F;
}
-print " $n/$n (100%)\n" if $n % 50 != 0;
+print " $n/$n (100%)\n" if $n % $step != 0;
print "complete\n";
print "complete\n";