Home

Awesome

Shell OAI Harvester

The OAI-PMH Shell Harvester is able to harvest OAI-PMH targets. It supports multiple configurable targets which can be updated individually. Furthermore, it is able to execute a preset command for each record it updates or deletes. View the CHANGELOG for important changes.

Installation

Use sudo/root where needed.

Dependencies

Manual

Make

Gentoo

Package available in the flavour overlay.

Usage

Configuration

The harvester has several configuration options that apply to the general behaviour while other options are repository specific. Different config files can be used with different levels of precedence (without fallback).

  1. commandline option provided location: oaiharvester -c <config file>
  2. $HOME/.config/shell-oaiharvester/config.xml
  3. /etc/shell-oaiharvester/config.xml

Some notes on the options:

Operation

View all available options: oaiharvester -h

To harvest records from a specified repository, run: oaiharvester -r <repository_id>

To only retrieve identifiers: oaiharvester -r <repository_id> -n

Not harvest, but validate the repository oaiharvester -r <repository_id> -t

To perform strict validation use: oaiharvester -r <repository_id> --test-strict

To list configured repositories: oaiharvester -l

Logs

Unless customized, the log file of the harvest process is stored at /tmp/oaiharvester-log.csv. The logger uses a simple csv format with a line for each downloaded page: YYYY-MM-DD HH:MM:SS,PID,repository,record count,download time,process time.

A recordlog can also be set, by default at /dev/null because depending on repositories this file can increase in size a lot. This has the following format: YYYY-MM-DD HH:MM:SS,repository,record datestamp,record identifier.

Status

Once harvested, each repository directory will hold a status file. In version 1, this is lasttimestamp.txt containing just the timestamp where the harvester should continue. Starting from version 2, a hidden .oaiharvester file is used to contain not only the timestamp, but also harvester version information which should help with future migrations.