Skip to content

Latest commit

 

History

History
59 lines (31 loc) · 2.44 KB

README.md

File metadata and controls

59 lines (31 loc) · 2.44 KB

ORCIDWorks

ORCID Hub logo

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.

Installation

Prerequisites

You'll need Python 3.6+ (and pip).

API Keys

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.)

Running

Install dependencies:

pip install -r requirements.txt

Secrets

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.)

Get token

Run getORCIDToken.py to acquire a token. This will log to getORCIDtoken.log.

Run

You should now be able to run the main script, getworks.py. (In VSCode, press F5.)

Configuration

Set testing to True in getworks.py to have the script use the ORCID.org sandbox and test.orcidhub.org.nz.

Libraries

The script uses python-decouple to maintain separation of settings (API keys and secrets) from code, in .env.

Licensing

Issued under the MIT license.

Help

Please use Discussions to ask for help, or raise an issue to report a bug or request a new feature.

Contributions

Alt