Changeset 98


Ignore:
Timestamp:
1999-01-06T14:22:01+13:00 (25 years ago)
Author:
rjmcnab
Message:

Switched doc.pl over to use unicode. Changed the importing software to create
a shallower directory structure. Added subject headings to FBPlug. Changed
bylw's indexes.

Location:
trunk/gsdl
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/bin/script/import.pl

    r91 r98  
    3737   
    3838    # get the list of plugins for this collection
    39     @plugins = ("RecPlug", "HTMLPlug", "TXTPlug");
    40     if (-e "$ENV{'GSDLHOME'}/collect/$collection/collect.cfg") {
     39    @plugins = ("HTMLPlug", "TXTPlug", "RecPlug");
     40    if (-e "$ENV{'GSDLHOME'}/collect/$collection/etc/collect.cfg") {
    4141    $collectcfg = &colcfg::read_collect_cfg ("$ENV{'GSDLHOME'}/collect/$collection/etc/collect.cfg");
    4242    if (defined $collectcfg->{'plugins'}) {
    4343        @plugins = @{$collectcfg->{'plugins'}};
    4444    }
     45    } else {
     46    print STDERR "WARNING - couldn't find collection configuration file\n";
     47    print STDERR "          using default plugins\n";
    4548    }
    4649   
  • trunk/gsdl/perllib/arcinfo.pm

    r14 r98  
    128128
    129129
     130# returns the number of documents so far
     131sub size {
     132    my $self = shift (@_);
     133    return (scalar(@{$self->{'order'}}));
     134}
     135
    1301361;
    131137
  • trunk/gsdl/perllib/docsave.pm

    r4 r98  
    3232    $OID = "NULL" unless defined $OID;
    3333
    34     # get the document's directory by inserting a / every 1-8 characters
    35     # and removing the last /
    36     my $doc_dir = $OID;
    37     $doc_dir =~ s/(.{1,8})/$1\//g;
    38     $doc_dir =~ s/\/$//;
    39     $doc_dir .= ".dir";
     34    # get the document's directory.
     35    my $doc_info = $self->{'archive_info'}->get_info($OID);
     36    my $doc_dir = "";
     37    if (defined $doc_info && scalar(@$doc_info) >= 1) {
     38    # this OID already has an assigned directory, use the
     39    # same one.
     40    $doc_dir = $doc_info->[0];
     41
     42    } else {
     43    # have to get a new document directory
     44    my $doc_dir_rest = $OID;
     45    my $doc_dir_num = 0;
     46    do {
     47        $doc_dir .= "/" if $doc_dir_num > 0;
     48        if ($doc_dir_rest =~ s/^(.{1,8})//) {
     49        $doc_dir .= $1;
     50        $doc_dir_num++;
     51        }
     52    } while ($doc_dir_rest ne "" &&
     53         (-d "$archive_dir/$doc_dir.dir" ||
     54          ($self->{'archive_info'}->size() >= 1024 && $doc_dir_num < 2)));
     55    $doc_dir .= ".dir";
     56    }
     57
    4058    &util::mk_all_dir ("$archive_dir/$doc_dir");
    4159
  • trunk/gsdl/perllib/mgbuilder.pm

    r91 r98  
    3434
    3535    # read in the collection configuration file
    36     if (!-e "$ENV{'GSDLHOME'}/collect/$collection/collect.cfg") {
     36    if (!-e "$ENV{'GSDLHOME'}/collect/$collection/etc/collect.cfg") {
    3737    die "mgbuilder::new - couldn't find collect.cfg for collection $collection\n";
    3838    }
  • trunk/gsdl/unicode/MAPPINGS/EASTASIA/GB/makemapfile.pl

    r92 r98  
    312312                      "unicode/MAPPINGS/EASTASIA/GB",
    313313                      "$encoding.TXT");
    314 #    if (!&loadencoding ($encoding, $mapfile)) {
    315     if (!&loadmapencoding ($encoding)) {
     314    if (!&loadencoding ($encoding, $mapfile)) {
     315#    if (!&loadmapencoding ($encoding)) {
    316316    die "couldn't load encoding $encoding";
    317317    }
     
    323323
    324324sub main {
    325     makeencodingmapfile ("GBK");
    326     makeencodingmapfile ("GB2312");
    327     makeencodingmapfile ("GB12345");
    328 }
     325    makeencodingmapfile ("BIG5");
     326#    makeencodingmapfile ("GBK");
     327#    makeencodingmapfile ("GB2312");
     328#    makeencodingmapfile ("GB12345");
     329}
Note: See TracChangeset for help on using the changeset viewer.