Newer
Older
Digital_Repository / Repositories / Misc / harvest.pl
nstanger on 16 Jan 2007 429 bytes - Added basic OAI stats harvester script.
use Net::OAI::Harvester;
use strict;

my $url = shift;

## create a harvester
my $harvester = Net::OAI::Harvester->new( 
	'baseURL' => $url,
);

## get a list of identifiers 
my $identifiers = $harvester->listAllIdentifiers(
	'metadataPrefix'    => 'oai_dc'
);

while ( my $header = $identifiers->next() )
{
	if ( $header->status() ne "deleted" )
	{
		print $header->identifier(),
			"\t",
			$header->datestamp(),
			"\n";
	}
}