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

ORCID Translator #1091

Closed
zuphilip opened this Issue Jul 11, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@zuphilip
Collaborator

zuphilip commented Jul 11, 2016

In the discussion https://forums.zotero.org/discussion/57892/vote-for-import-publication-from-zotero-to-orcid/ it was suggested to create an ORCID Translator. At the moment only the doi translator is active at an ORCID website and only receives results for entries with dois from CrossRef, DataCite.

@TomDemeranville suggested the following steps:

  1. Start with an ORCID page, e.g. http://orcid.org/0000-0003-0902-4386
  2. Extract the ORCID
  3. Extract orcid-put-code for any work, i.e. from the html code <li orcid-put-code="23239358">
  4. Call the API
curl -X GET --header 'Accept: application/vnd.citationstyles.csl+json' 'https://pub.orcid.org/v2.0_rc2/0000-0003-0902-4386/work/23239358'

Any ETA for the final version 2.0 of the API?
5. Import the CSL JSON data.

For the API call we would need content negation and maybe ideal with our usual method ZU.doGet(). This does not yet exists. I think @aurimasv discussed this before somewhere, but I have to search for this issue... Alternatively, we can try to come up with something purely in JavaScript, but this may not work in any browser (or in our translation server environment). The rest looks straightforward for me.

zuphilip added a commit to zuphilip/translators that referenced this issue Jul 29, 2016

@zuphilip zuphilip closed this Nov 5, 2016

@TomDemeranville

This comment has been minimized.

Show comment
Hide comment
@TomDemeranville

TomDemeranville Oct 12, 2018

Hi @zuphilip,

Apologies, I don't think I was very clear on the thread your'e referencing and that's lead you down the wrong path here. Can I suggest a small change to the code that will make it more maintainable/future proof?

Essentially what it should be doing is pulling a list of works from our API rather than scraping the HTML page. You can get it like this:

curl -X GET --header 'Accept: application/xml' 'https://pub.orcid.org/v2.1/0000-0003-0902-4386/works'

This will return you an XML list that can be parsed using XPath in a similar way to your existing implementation. The works are in groups, but for your purposes you simply select the first work summary in each group for processing.

Does that make sense?

TomDemeranville commented Oct 12, 2018

Hi @zuphilip,

Apologies, I don't think I was very clear on the thread your'e referencing and that's lead you down the wrong path here. Can I suggest a small change to the code that will make it more maintainable/future proof?

Essentially what it should be doing is pulling a list of works from our API rather than scraping the HTML page. You can get it like this:

curl -X GET --header 'Accept: application/xml' 'https://pub.orcid.org/v2.1/0000-0003-0902-4386/works'

This will return you an XML list that can be parsed using XPath in a similar way to your existing implementation. The works are in groups, but for your purposes you simply select the first work summary in each group for processing.

Does that make sense?

@adam3smith

This comment has been minimized.

Show comment
Hide comment
@adam3smith

adam3smith Oct 12, 2018

Collaborator

@TomDemeranville you're looking at a 2 year old closed PR. The current one is here: #1764 and @zuphilip is doing exactly what you propose.

Collaborator

adam3smith commented Oct 12, 2018

@TomDemeranville you're looking at a 2 year old closed PR. The current one is here: #1764 and @zuphilip is doing exactly what you propose.

@TomDemeranville

This comment has been minimized.

Show comment
Hide comment
@TomDemeranville

TomDemeranville Oct 12, 2018

Fantastic, thanks.

TomDemeranville commented Oct 12, 2018

Fantastic, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment