Skip to content

Instantly share code, notes, and snippets.

@no-reply
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save no-reply/b8d35729b87785f841e4 to your computer and use it in GitHub Desktop.
Save no-reply/b8d35729b87785f841e4 to your computer and use it in GitHub Desktop.
opts = {uri:"http://repox.metro.org:8080/repox/OAIHandler",oai:{metadata_prefix:"mods",skip_set:["BusinessRecords","MusicParts","MusicScores","Programs","LBI_Periodicals","cia_menu","cdlc","dudleyo","JSY","p15109coll4","p16694coll39","p16694coll43","VHB011"]}}
# or whatever options you want to use, these are the real ESDN ones
activity = Krikri::Activity.create do |a|
a.agent = "Krikri::Harvesters::OAIHarvester"
a.opts = JSON.generate(opts)
end
n = 100 # or whatever test harvest size
activity.run do |agent, activity_uri|
agent.records.take(n).each { |rec| agent.process_record(rec, activity_uri) }
end
# you now have recourse to ProvenanceQueryClient, and...
activity.entities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment