allow to set xslt sheet on commandline
authorWolfram Schneider <wosch@indexdata.dk>
Fri, 23 Apr 2010 15:35:37 +0000 (17:35 +0200)
committerWolfram Schneider <wosch@indexdata.dk>
Fri, 23 Apr 2010 15:35:37 +0000 (17:35 +0200)
bin/irspy-rewrite-records.pl

index f994de6..c80b05d 100755 (executable)
@@ -9,6 +9,12 @@ use ZOOM::IRSpy::Utils qw(render_record);
 
 my($dbname) = @ARGV;
 die "$0 no database name specified" if !defined $dbname;
 
 my($dbname) = @ARGV;
 die "$0 no database name specified" if !defined $dbname;
+
+my $irspy_to_zeerex_xsl = $ARGV[1] || '../xsl/irspy2zeerex.xsl';
+
+$ZOOM::IRSpy::irspy_to_zeerex_xsl = $irspy_to_zeerex_xsl
+  if $irspy_to_zeerex_xsl;
+
 my $spy = new ZOOM::IRSpy($dbname, "admin", "fruitbat");
 my $rs = $spy->{conn}->search(new ZOOM::Query::CQL("cql.allRecords=1"));
 print STDERR "rewriting ", $rs->size(), " target records";
 my $spy = new ZOOM::IRSpy($dbname, "admin", "fruitbat");
 my $rs = $spy->{conn}->search(new ZOOM::Query::CQL("cql.allRecords=1"));
 print STDERR "rewriting ", $rs->size(), " target records";