4 # $ mkdir records-2010-04-06
5 # $ cd records-2010-04-06
6 # $ irspy-dump.pl irspy.indexdata.com:8018/IR-Explain---1
8 # $ tar cfz records-2010-04-06.tar.gz records-2010-04-06
15 print STDERR "Usage: $0 target\n";
19 my $conn = new ZOOM::Connection($ARGV[0]);
20 $conn->option(preferredRecordSyntax => "xml");
21 $conn->option(elementSetName => "zebra::data");
22 my $rs = $conn->search_pqf('@attr 1=_ALLRECORDS @attr 2=103 ""');
25 print "$0: dumping $n records\n";
26 foreach my $i (1..$n) {
28 print " $i/$n (", int($i*100/$n), "%)\n" if $i % 50 == 0;
29 my $rec = $rs->record($i-1);
30 my $xml = $rec->render();
35 print " $n/$n (100%)\n" if $n % 50 != 0;