ropensci / oai

OAI-PMH R client
https://docs.ropensci.org/oai
Other
14 stars 4 forks source link

Help getting started with dspace repositories #68

Closed sje30 closed 1 year ago

sje30 commented 1 year ago

Hi,

many thanks for this package; it looks just like what I'm after.

Can someone help me get started? I'm trying to use oai to interact with DSPACE repositories, but neither of the two that I tried worked. What am I missing?

> id("https://dash.harvard.edu/oai")
Error in read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html = as_html,  : 
  Opening and ending tag mismatch: meta line 6 and head [76]

and

> id("https://www.repository.cam.ac.uk/oai")
Error in read_xml.raw(charToRaw(enc2utf8(x)), "UTF-8", ..., as_html = as_html,  : 
  Opening and ending tag mismatch: meta line 6 and head [76]

Thanks, Stephen

mbojan commented 1 year ago

Hi! Thanks!

I'm not familiar with DSPACE but I believe you need to pick the context like so:

library(oai)
#> Warning: package 'oai' was built under R version 4.2.2

id("https://dash.harvard.edu/oai/request")
#>   repositoryName                              baseURL protocolVersion
#> 1       harvard6 https://dash.harvard.edu/oai/request             2.0
#>                         adminEmail    earliestDatestamp deletedRecord
#> 1 dash-webadmin@HU.onmicrosoft.com 1900-01-01T05:00:00Z     transient
#>            granularity                                     description
#> 1 YYYY-MM-DDThh:mm:ssZ oaidash.harvard.edu:oai:dash.harvard.edu:1/1234
id("https://dash.harvard.edu/oai/driver")
#>   repositoryName                             baseURL protocolVersion
#> 1       harvard6 https://dash.harvard.edu/oai/driver             2.0
#>                         adminEmail    earliestDatestamp deletedRecord
#> 1 dash-webadmin@HU.onmicrosoft.com 1900-01-01T05:00:00Z     transient
#>            granularity                                     description
#> 1 YYYY-MM-DDThh:mm:ssZ oaidash.harvard.edu:oai:dash.harvard.edu:1/1234
id("https://dash.harvard.edu/oai/openaire")
#>   repositoryName                               baseURL protocolVersion
#> 1       harvard6 https://dash.harvard.edu/oai/openaire             2.0
#>                         adminEmail    earliestDatestamp deletedRecord
#> 1 dash-webadmin@HU.onmicrosoft.com 1900-01-01T05:00:00Z     transient
#>            granularity                                     description
#> 1 YYYY-MM-DDThh:mm:ssZ oaidash.harvard.edu:oai:dash.harvard.edu:1/1234
sje30 commented 1 year ago

thank you! I think I have what I need now.