Home The Univeristy of Southampton Website
Login
Go to the frey group website

Software - eprintsFetch

eprintsFetch is a simple lightweight script that exploits the oai2 output from eprints and returns the associated meta data. The script can be easily be deployed with only minimal php skill.

The script was developed to list publication details for the group website, and be packaged up for distribution.

One thing to note is that eprintsFetch doesn't cache any of the meta data, and we recomend that you cache the meta data into you own database. If you don't then every view of your page will result in number of requests (one for each eprint) to the eprints server.

Requirements

eprintsFetch was developed with php 5 but has been tested on a php 4.3 system but not recommended on anything lower. The xml component uses the php XML Parser Functions (more info).

Installation

Installation is simple just include the file eprintsFetch.php into your script and declare the class by the line:

$fetch = new eprintFetch();

Example

Here is a simple example that will output an array of retrieved meta data from 2 eprints:

<?php

include('eprintsFetch.php');
//ids of eprints to fetch
$eprintids = array(20858, 17426);

//start a fetch
$fetch = new eprintFetch();

// Eprint URL - eg http://eprints.soton.ac.uk/
$fetch->config_eprinturl "http://eprints.soton.ac.uk/";

// oai identifier prefix - eg oai:eprints.soton.ac.uk
$fetch->config_eprintoai "oai:eprints.soton.ac.uk:";

//Runs through the eprints
foreach($eprintids as $eprintid)
    
$fetch->getoai($eprintid);

//to retrive the results
print_r($fetch->items);

?>

Downloads

Version 1.00.0: eprintsFetch-1.00.0.tar.gz (4KB)

More Info

To find out more about PHP - http://www.php.com/
To find out about EPrints - http://www.eprints.org/
The Frey group website - http://www.soton.ac.uk/~jgfchem/

© University of Southampton 2005
For more information, please email jgf@soton.ac.uk