Skip to content

Instantly share code, notes, and snippets.

@zuphilip
Last active March 10, 2019 22:00
Show Gist options
  • Save zuphilip/ec35629d6b386ac2eac267a462d10bf5 to your computer and use it in GitHub Desktop.
Save zuphilip/ec35629d6b386ac2eac267a462d10bf5 to your computer and use it in GitHub Desktop.
Example to extract bibliographic data from Wikidata with Zotero translation-server
me@home MINGW64 ~/Coding/translation-server (master)
$ curl -d https://www.wikidata.org/wiki/Q30000000 -H 'Content-Type: text/plain' http://127.0.0.1:1969/web > wdata.json
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 823 100 784 100 39 157 7 0:00:05 0:00:04 0:00:01 197
me@home MINGW64 ~/Coding/translation-server (master)
$ curl -d @wdata.json -H 'Content-Type: application/json' http://127.0.0.1:1969/export?format=bibtex
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1292 100 508 100 784 16387 25290 --:--:-- --:--:-- --:--:-- 25290
@article{miccadei_synergistic_2002,
title = {The {Synergistic} {Activity} of {Thyroid} {Transcription} {Factor} 1 and {Pax} 8 {Relies} on the {Promoter}/{Enhancer} {Interplay}},
volume = {16},
doi = {10.1210/MEND.16.4.0808},
language = {English},
number = {4},
journal = {Molecular Endocrinology},
author = {Miccadei, Stefania and Leo, Rossana De and Zammarchi, Enrico and Natali, Pier Giorgio and Civitareale, Donato},
month = apr,
year = {2002},
keywords = {transcription},
pages = {837--846}
}
me@home MINGW64 ~/Coding/translation-server (master)
$ less wdata.json
[
{
"key":"JCA3BBGH",
"version":0,
"itemType":"journalArticle",
"creators":[
{
"firstName":"Stefania",
"lastName":"Miccadei",
"creatorType":"author"
},
{
"firstName":"Rossana De",
"lastName":"Leo",
"creatorType":"author"
},
{
"firstName":"Enrico",
"lastName":"Zammarchi",
"creatorType":"author"
},
{
"firstName":"Pier Giorgio",
"lastName":"Natali",
"creatorType":"author"
},
{
"firstName":"Donato",
"lastName":"Civitareale",
"creatorType":"author"
}
],
"tags":[
{
"tag":"transcription",
"type":1
}
],
"publicationTitle":"Molecular Endocrinology",
"title":"The Synergistic Activity of Thyroid Transcription Factor 1 and Pax 8 Relies on the Promoter/Enhancer Interplay",
"DOI":"10.1210/MEND.16.4.0808",
"date":"2002-04-01T00:00:00Z",
"language":"English",
"volume":"16",
"pages":"837-846",
"issue":"4",
"libraryCatalog":"Wikidata"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment