Skip to content

tobiasschweizer/oai-harvester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

-------------------------------------------------------------------------------

-------------  USE THIS SCRIPT FROM THE COMMAND LINE (PHP CLI)  ---------------

-------------------------------------------------------------------------------

This script allows for harvesting of digital repositories using OAI-PMH and includes also the image-paths

For usage information, call the script without any parameters: 

     php get_records_with_urls.php

Call this script on a regular basis providing a datestamp in order to harvest selectively:
The following call of date provides a datestamp 24h and 1m ago (and reduced by one hour according to Greenwich Z)

     date --date="1 days ago 1 hours ago 1 minutes ago" +"%Y-%m-%dT%H:%M:%SZ"

You can also determine the date of the last harvest by reading its datestamp. For doing that, you can use jshon (available at https://github.com/keenerd/jshon)

    jshon -e datestamp < harvest.json | sed "s/^\([\"']\)\(.*\)\1\$/\2/g"
    
To automate syncing, you can use the script harvest.sh (jshon is required).

About

CLI PHP for harvesting records via OAI-PMH

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published