Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upORCID Translator #1091
Comments
added a commit
to zuphilip/translators
that referenced
this issue
Jul 29, 2016
zuphilip
closed this
Nov 5, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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.
@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. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
TomDemeranville
commented
Oct 12, 2018
Fantastic, thanks. |
zuphilip commentedJul 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:
orcid-put-code
for any work, i.e. from the html code<li orcid-put-code="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.