Changeset 16102 for gsdl/trunk/bin


Ignore:
Timestamp:
2008-06-23T10:54:24+12:00 (16 years ago)
Author:
davidb
Message:

Some minor adjustments to ingesting documents into a Fedoar repository: it now descends into all the folders generated in archives/export; and it tests for ImagePlugin (rather than the older ImagePlug) name;

Location:
gsdl/trunk/bin/script
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/bin/script/g2f-buildcol.pl

    r14959 r16102  
    205205
    206206    if (opendir(DIR, $export_dir)) {
    207     my @hash_dirs = grep { /\.dir$/ } readdir(DIR);
    208207    closedir DIR;
     208    ## my @hash_dirs = grep { /\.dir$/ } readdir(DIR);
     209    my @hash_dirs = &g2futil::get_all_hash_dirs($export_dir);
    209210
    210211
     
    213214
    214215        my $docmets_filename
    215         = &util::filename_cat($export_dir,$hd,"docmets.xml");
     216        = &util::filename_cat($hd,"docmets.xml");
    216217
    217218        print STDERR "<Build>\n" if $gli;
  • gsdl/trunk/bin/script/g2f-import.pl

    r15657 r16102  
    204204    if ( -e $export_dir ) {
    205205        print "***\n";
    206     print "* Removing existing Greenstone $gs_col objects from Fedora $pid_namespace\n";
     206    print "* Updating existing Greenstone $gs_col objects from Fedora $pid_namespace\n";
    207207        print "***\n";
    208208
    209209    # readdir
    210210    if (opendir(DIR, $export_dir)) {
    211         my @hash_dirs = grep { /\.dir$/ } readdir(DIR);
     211
    212212        closedir DIR;
    213 
     213        my @hash_dirs = &g2futil::get_all_hash_dirs($export_dir,$maxdocs);
    214214
    215215        # for each hash dir, purge its respective PID
    216         foreach my $hd (@hash_dirs) {
    217 
    218         my $full_hd = &util::filename_cat($export_dir,$hd);
     216        foreach my $full_hd (@hash_dirs) {
     217
    219218        my $hash_id = &g2futil::get_hash_id($full_hd);
    220219
     
    226225
    227226        if ($dsinfo_status == 0) {
    228             print "  $pid being removed.\n";       
     227            print "  $pid being updated.\n";       
    229228            &g2futil::run_purge($pid,$options);
    230229        }
Note: See TracChangeset for help on using the changeset viewer.