-
Notifications
You must be signed in to change notification settings - Fork 1
Use Case Recipes
Here are some ideas for how your institution might use this software.
Each set of resources to be made available for discovery via ResourceSync needs to be processed with rs_oaipmh_src.py. The only requirement is that those resources are already made available for discovery via OAI-PMH.
A real world example:
- your OAI-PMH provider's base URL is
http://example.com/oai/provider - the collection's setSpec is
testcol - you want to share the records in MODS format
- you will host the ResourceSync sitemap documents at
http://test.comwith the Apache 2 HTTP Server - you want the ResourceSync sitemap documents for this collection to be available at
http://test.com/resourcesync/testcol/
The very first time you process this collection, you generate a resourcelist:
sudo python3 rs_oaipmh_src.py single http://test.com apache http://example.com/oai/provider mods resourcelist testcolA couple of notes:
- if you're hosting with Tomcat 7, you can replace
apachewithtomcat; otherwise, you must explicitly specify the server's root directory (e.g., for Tomcat 6, it would be/usr/local/tomcat6/webapps/default) - if you want to make Dublin Core records available instead, replace
modswithoai_dc - for full usage information:
python3 rs_oaipmh_src.py single --help
Whenever changes are made to resources (records) in this collection, you need to create (or update) an inc_changelist (incremental changelist):
sudo python3 rs_oaipmh_src.py single http://test.com apache http://example.com/oai/provider mods inc_changelist testcolIf you have many collections to generate ResourceSync documents for, you can use the multi subcommand, passing it a CSV file with the parameters for each collection:
sudo python3 rs_oaipmh_src.py multi collections.csvIMPORTANT: you must not overwrite resourcelists by using the resourcelist strategy for generation after any changes are made! this will cause changes to be missed by destinations!
I want to populate a Solr index with OAI-PMH resources from one or more content providers. I want to use ResourceSync to do this. I have a local TinyDB instance at
/my/tiny/db.jsonwith one row per resource set (according to the schema) and a Solr index athttp://example.com/solr/resourcesync. I want to update Solr every Sunday at 2 AM.
# /etc/crontab
...
0 2 * * 0 root python3 rs-oaipmh-dest.py /my/tiny/db.json http://example.com/solr/resourcesync