/[webpac]/trunk/all2xml.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/all2xml.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 628 by dpavlin, Sun Jan 2 22:09:01 2005 UTC revision 641 by dpavlin, Sun Jan 23 02:02:10 2005 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
3  use strict;  use strict;
4  use IsisDB;  use Biblio::Isis;
5  use Getopt::Std;  use Getopt::Std;
6  use Data::Dumper;  use Data::Dumper;
7  use XML::Simple;  use XML::Simple;
# Line 22  die "FATAL: can't find configuration fil Line 22  die "FATAL: can't find configuration fil
22  my $config;  my $config;
23    
24  #use index_DBI;         # default DBI module for index  #use index_DBI;         # default DBI module for index
25  use index_DBI_cache;    # faster DBI module using memory cache  #use index_DBI_cache;   # faster DBI module using memory cache
26    use index_DBI_tag;      # tag support for indexes
27  my $index;  my $index;
28    
29  my %opts;  my %opts;
# Line 257  sub data2xml { Line 258  sub data2xml {
258                          # init vars so that we go into while...                          # init vars so that we go into while...
259                          ($swish,$display) = (1,1);                          ($swish,$display) = (1,1);
260    
                         # placeholder for all repeatable entries for index  
   
261                          sub mkformat($$) {                          sub mkformat($$) {
262                                  my $x = shift || die "mkformat needs tag reference";                                  my $x = shift || die "mkformat needs tag reference";
263                                  my $data = shift || return;                                  my $data = shift || return;
# Line 737  print STDERR "using: $type...\n"; Line 736  print STDERR "using: $type...\n";
736                  my $isis_db = $cfg -> val($database, 'isis_db') || die "$database doesn't have 'isis_db' defined!";                  my $isis_db = $cfg -> val($database, 'isis_db') || die "$database doesn't have 'isis_db' defined!";
737    
738                  $import2cp = Text::Iconv->new($config->{isis_codepage},$codepage);                  $import2cp = Text::Iconv->new($config->{isis_codepage},$codepage);
739                  my $db = new IsisDB( isisdb => $isis_db );                  my $db = new Biblio::Isis( isisdb => $isis_db );
740    
741                  my $max_rowid = $db->{'maxmfn'} || die "can't find maxmfn";                  my $max_rowid = $db->count || die "can't find maxmfn";
742    
743                  print STDERR "Reading database: $isis_db [$max_rowid rows]\n";                  print STDERR "Reading database: $isis_db [$max_rowid rows]\n";
744    
745                  my $path = $database;                  $path = $database;
746    
747                  for (my $row_id = 1; $row_id <= $max_rowid; $row_id++ ) {                  for (my $row_id = 1; $row_id <= $max_rowid; $row_id++ ) {
748                          my $row = $db->to_hash( $row_id );                          my $row = $db->to_hash( $row_id );

Legend:
Removed from v.628  
changed lines
  Added in v.641

  ViewVC Help
Powered by ViewVC 1.1.26