Skip to content

Instantly share code, notes, and snippets.

@andrawaag
Created April 21, 2019 11:00
Show Gist options
  • Save andrawaag/0cc9e74b0ef9da5b72f1ef461157cbc1 to your computer and use it in GitHub Desktop.
Save andrawaag/0cc9e74b0ef9da5b72f1ef461157cbc1 to your computer and use it in GitHub Desktop.
from wikidataintegrator import wdi_core, wdi_login, wdi_helpers
pmid = "22329630"
doi = "10.1016/j.anifeedsci.2007.03.013"
login = wdi_login.WDLogin(<username>, <passwd>)
write = True
print(wdi_helpers.PublicationHelper(doi, id_type="doi", source="crossref").get_or_create(login if write else None))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment