Changeset 26976

Show
Ignore:
Timestamp:
04.03.2013 17:25:51 (7 years ago)
Author:
ak19
Message:

First commit for RSS support: copying rss-items.rdf file across from archives to building, so that eventually it will be copied into the index dir as is required.

Location:
main/trunk/greenstone2
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/buildcol.pl

    r26567 r26976  
    690690    } 
    691691 
     692 
     693    # for RSS support: Need rss-items.rdf file in index folder 
     694    #  check if a file called rss-items.rdf exists in archives, then copy it into the building folder 
     695    #  so that when building is moved to index, this file will then also be in index as desired 
     696    my $collection_dir = &util::resolve_collection_dir($collectdir, $collection, $site); 
     697    my $rss_items_rdf_file = &util::filename_cat($archivedir, "rss-items.rdf"); 
     698    if(defined $builddir && -d $builddir && -f $rss_items_rdf_file) { 
     699    &gsprintf($out, "{buildcol.copying_rss_items_rdf}\n") if ($verbosity >= 1); 
     700    &util::cp ($rss_items_rdf_file, $builddir); 
     701    } 
     702 
    692703    # if buildcol.pl was run with -activate, need to run activate.pl  
    693704    # now that building's complete   
     
    716727        } 
    717728    } 
    718      
     729     
    719730    close OUT if $close_out; 
    720731    close FAILLOG; 
  • main/trunk/greenstone2/perllib/strings.properties

    r26536 r26976  
    8686 
    8787buildcol.copying_back_cached_build:Copying back the cached build 
     88 
     89buildcol.copying_rss_items_rdf:Copying rss-items.rdf file from archives to building (eventually to index) 
    8890 
    8991buildcol.create_images:Attempt to create default images for new collection. This relies on the Gimp being installed along with relevant perl modules to allow scripting from perl. 
  • main/trunk/greenstone2/perllib/util.pm

    r26973 r26976  
    18431843    my ($colgroup, $collection) = &util::get_collection_parts($qualified_collection);    
    18441844     
    1845     if (defined $collect_dir) { 
     1845    if (defined $collect_dir && $collect_dir) { # ensure not empty string either 
    18461846        return &util::filename_cat($collect_dir,$colgroup, $collection); 
    18471847    }