4 ms·
For interest, you can do something like this on the command line using curl. Try these: curl -LH "Accept: text/bibliography" "http://dx.doi.org/10.1017/S00
by aaren 12y ago
For interest, you can do something like this on the command line using curl. Try these:
curl -LH "Accept: text/bibliography" "http://dx.doi.org/10.1017/S0022112061000019"
curl -LH "Accept: text/bibliography; style=bibtex" "http://dx.doi.org/10.1017/S0022112061000019"
curl -LH "Accept: text/bibliography; style=apa" "http://dx.doi.org/10.1017/S0022112061000019"
My academic life became a lot simpler when I learnt this - now I only need to maintain a database of {cite key: DOI} pairs, rather than a bibtex monster. Yes, I have tried Mendeley et al. and yes, I do prefer scripts that do what I tell them to.
- aroch 12y agoOk, that's pretty awesome. Time to shove this into a Word macro (because, I have to use word :( )
- michaelq 12y agoThis works great! I looked into doi.org before but I wasn't sure what their ratelimit is. I'm currently using phantomJS and google scholar for DOIs, and I think I might have hit their rate limit already, so I will take a second look at this!
- aaren 12y agop.s. I found I had to use 'data.crossref.org' instead of 'dx.doi.org' when I scripted it (python + requests). Not sure why exactly (doi was redirecting to crossref anyway).
- aaren 12y agoHow to do it in python in case anyone is wondering: import requests import json url = 'http://data.crossref.org/10.1017/S0022112061000019' headers = {'Accept': 'application/citeproc+json'} r = requests.get(url, headers=headers) meta = json.loads(r.content) # meta is a dictionary of metadata, e.g. meta['DOI']
- mmcnickle 12y agoNeat tip: You can just do: meta = r.json() and avoid the json import.
- afandian 12y agoFYI this is CrossRef DOIs, and the data is served by CrossRef. Take a look at our API, e.g. http://api.crossref.org/works/10.5555/12345678 http://api.crossref.org/works/10.5555/12345678 and http://search.crossref.org http://search.crossref.org Any questions email, us at labs@crossref.org *which are the kinds of DOI you're likely to be citing, but other Registration Agencies and types of DOIs exist
- grundprinzip 12y agoFor CS I did it almost like that: Typically you write papers in LaTeX which means you need a correct Bibtex entry, and correct means its better be curated by someone else. Since most of the relevant CS publications are in DBLP [1] I wrote a small script that scans missing citation keys in your LaTeX file for actual DBLP keys and automatically builds this into a bibtex file that you can use [2]. If you integrate this command in your regular build cycle for LaTeX using for example latexmk manually maintaining bibtex files is a thing from the past. [1] http://www.dblp.org/search/ http://www.dblp.org/search/ [2] https://github.com/grundprinzip/dblp https://github.com/grundprinzip/dblp
- michaelq 12y agoDo you know where I can find the documentation for this API? I got MLA style working, but I can't get Chicago/Turabian style working. Once I get this working, I plan to switch to this method for DOIs. Thanks!
- michaelq 12y agoNevermind - I found it.
- toomuchtodo 12y agoSorry to hijack this reply; for your URL citations, you may want to integrate with the Internet Archive (archive.org) to get/store the snapshot of the URL/URI you're citing.
- afandian 12y agoTo clarify, this is using Content Negotiation on the DOI API (i.e. sending 'Accepts' headers). These DOIs are CrossRef's, so requesting those formats via content negotiation is getting metadata from CrossRef.