Initial revision
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 24 Nov 2002 20:52:11 +0000 (20:52 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 24 Nov 2002 20:52:11 +0000 (20:52 +0000)
git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@1 13eb9ef6-21d5-0310-b721-a9d68796d827

CPAN.modules [new file with mode: 0644]
Makefile [new file with mode: 0644]
README [new file with mode: 0644]
TODO [new file with mode: 0644]
all2xml.pl [new file with mode: 0755]
isis2xml.xml [new file with mode: 0644]

diff --git a/CPAN.modules b/CPAN.modules
new file mode 100644 (file)
index 0000000..a2b270c
--- /dev/null
@@ -0,0 +1,11 @@
+CPAN modules to consider using:
+
+AnyData::Format::XML 
+Data::DumpXML 
+Data::DumpXML::Parser 
+XML::Simple
+XML::Writer
+
+other perl modules which are used:
+
+Text::Unaccent from http://www.senga.org/unac/
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..5ac788e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,2 @@
+clean:
+       rm -f *.bak
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..d3f20ca
--- /dev/null
+++ b/README
@@ -0,0 +1,11 @@
+this is a free re-implementation of our searcher described at
+
+http://webpac.sf.net/
+
+This code is written by Dobrica Pavlinusic <dpavlin@rot13.org> and
+released under GPL v2 or later license.
+
+Status as of 2002-11-22:
+
+This code is *NOT* ready for production use. It's not even finished.
+But we are working on it.
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..e1d4d1e
--- /dev/null
+++ b/TODO
@@ -0,0 +1,27 @@
+This that has to be done (or fixed)
+
+- allmost everything
+- isis2xml.pl
+
+- implement "posudba"
+
+---------------------------------------------------------------------------
+
+General implementation notes:
+
+- 
+
+---------------------------------------------------------------------------
+
+This are notes about WWW interface:
+
+- re-use good ideas from MPS indexer (which was used as proof-of-concept,
+  see paper at http://webpac.sf.net/)
+
+- use CSS
+       * provide several color templates
+       * provide template without char size of color set (to enable
+         usage of default browser colors/font-size)
+
+---------------------------------------------------------------------------
+
diff --git a/all2xml.pl b/all2xml.pl
new file mode 100755 (executable)
index 0000000..6c07f28
--- /dev/null
@@ -0,0 +1,66 @@
+#!/usr/bin/perl -w
+
+use strict;
+use OpenIsis;
+use Getopt::Std;
+use Data::Dumper;
+use XML::Simple;
+
+my $config=XMLin();
+
+print Dumper($config);
+
+my %opts;
+
+getopts('d:m:q', \%opts);
+
+my $db_dir = $opts{d};
+
+die "usage: $0 -d [database_dir] -m [database1,database2] " if (! %opts);
+
+#--------------------------------------------------------------------
+
+my $last_tell=0;
+
+my @isis_dirs = ( '.' );       # use dirname as database name
+
+if ($opts{m}) {
+       @isis_dirs = split(/,/,$opts{m});
+}
+
+my @isis_dbs;
+
+foreach (@isis_dirs) {
+       if (-e "$common::isis_data/$db_dir/$_/LIBRI") {
+               push @isis_dbs,"$common::isis_data/$db_dir/$_/LIBRI/LIBRI";
+       }
+       if (-e "$common::isis_data/$db_dir/$_/PERI") {
+               push @isis_dbs,"$common::isis_data/$db_dir/$_/PERI/PERI";
+       }
+       if (-e "$common::isis_data/$db_dir/$_/AMS") {
+               push @isis_dbs,"$common::isis_data/$db_dir/$_/AMS/AMS";
+       }
+       if (-e "$common::isis_data/$db_dir/$_/ARTI") {
+#              push @isis_dbs,"$common::isis_data/$db_dir/$_/ARTI/ARTI";
+       }
+}
+
+foreach my $isis_db (@isis_dbs) {
+
+       my $db = OpenIsis::open( "$isis_db" ) || warn "can't open '$isis_db'";
+
+       my $max_rowid = OpenIsis::maxRowid( $db );
+
+       my $last_pcnt = 0;
+
+       for (my $row_id = 1; $row_id <= $max_rowid; $row_id++ ) {
+               my $row = OpenIsis::read( $db, $row_id );
+
+               # output current process indicator
+               my $pcnt = int($row->{mfn} * 100 / $max_rowid);
+               if ($pcnt != $last_pcnt) {
+                       printf STDERR ("%5d / %5d -- %-2d %%\n",$row->{mfn},$max_rowid,$pcnt) if (! $opts{q});
+                       $last_pcnt = $pcnt;
+               }
+       }
+}
diff --git a/isis2xml.xml b/isis2xml.xml
new file mode 100644 (file)
index 0000000..4e20c79
--- /dev/null
@@ -0,0 +1,19 @@
+<config>
+<!--
+       <isis post=",">700ab</isis>
+-->
+  <index>
+       <author>
+               <isis f="700" sf="ab"/>
+               <isis f="701" sf="ab"/>
+               <isis f="701" sf="cd"/>
+       </author>
+  </index>
+  <!-- not used and defined for now!
+  <display>
+      <author> <isis f="700" sf="a"/><isis f="700" sf="b"/> <post>, </post></author>
+      <author> <isis f="701" sf="a"/><isis f="701" sf="b"/> <post>, </post></author>
+      <author> <isis f="701" sf="c"/><isis f="701" sf="d"/> <post>, </post></author>
+  </display>
+  -->
+</config>