-
Notifications
You must be signed in to change notification settings - Fork 20
Add OAI-PMH Ingestors #1180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add OAI-PMH Ingestors #1180
Changes from all commits
078a74a
664b1ae
b78eb32
ec2b4e6
c260fa0
928dd19
2c0c6b7
4d26ecd
0080133
cbf2699
8581f03
9b2c24f
bc3951f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,208 @@ | ||||||
| require 'open-uri' | ||||||
|
||||||
| require 'open-uri' |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config[:user_agent] is defined but not used when instantiating OAI::Client. Consider passing it via headers (alongside From) so requests identify TeSS consistently, matching how other ingestors set User-Agent on outbound HTTP requests.
| client = OAI::Client.new source_url, headers: { 'From' => config[:mail] } | |
| client = OAI::Client.new source_url, headers: { 'From' => config[:mail], 'User-Agent' => config[:user_agent] } |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
read_oai_dublin_core calls client.list_records without a metadata_prefix. In OAI-PMH, ListRecords requests require metadataPrefix, and many servers/gems will return a badArgument / raise when it’s missing. Consider explicitly requesting Dublin Core (typically oai_dc) here so this works against spec-compliant endpoints.
| client.list_records.full.each do |record| | |
| client.list_records(metadata_prefix: 'oai_dc').full.each do |record| |
Uh oh!
There was an error while loading. Please reload this page.