Collect works metadata from ORCID.org
Adapted from a gist by @JasonGush, this is a Python script that collects works on ORCID from their API from a list of users affiliated with an institution on the NZ ORCID Hub and outputs them to a CSV file.
You'll need Python 3.6+ (and pip).
You'll need to obtain credentials from both the ORCID.org API and the NZ ORCID Hub API. For the latter, choose "Hub API Registration" from the "Settings" menu.
ℹ We suggest using the ORCID.org sandbox and Test Hub first. (See "Configuration" below.)
Install dependencies:
pip install -r requirements.txt
Rename .env.sample
to .env
, and copy and paste your access keys and secrets into it at the appropriate lines. (.env
is included in .gitignore
, so it won't be committed.)
Run getORCIDToken.py to acquire a token. This will log to getORCIDtoken.log
.
You should now be able to run the main script, getworks.py
. (In VSCode, press F5.)
Set testing
to True
in getworks.py to have the script use the ORCID.org sandbox and test.orcidhub.org.nz.
The script uses python-decouple to maintain separation of settings (API keys and secrets) from code, in .env
.
Issued under the MIT license.
Please use Discussions to ask for help, or raise an issue to report a bug or request a new feature.