Show HN: One-click citations for your essays
speedcite.com
speedcite.com
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. 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'] meta = r.json()
and avoid the json import.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
One minor usability issue, clicking the different style after generating the citation doesn't have any result until you generate a new citation. That is a little unintuitive. I would either switch to the different style immediately or put some separation in the UI between the returned citation and the components that are used to generate a new citation.
Also, "http://google.com" complains about robots.txt, but "http://google.com/" (trailing slash) does not.
The MLA format cite comes out as:
"Show HN: One." Ycombinator.com. N.p. Web. 30 Apr. 2014. <https://news.ycombinator.com/>
The APA format cite comes out as:
Show HN: One. Ycombinator.com. Retrieved Apr 30, 2014, from https://news.ycombinator.com.
The Chicago formate cite comes out as:
"Show HN: One." Ycombinator.com. https://news.ycombinator.com/.
Show HN: One-click citations for your essays (speedcite.com)
The Fault in Our Stars Paperback by John Green: http://www.amazon.com/The-Fault-Stars-John-Green/dp/01424241...
Feature suggestions: would be nice if it accepted PubMed ids, and supported other popular citation styles like Hardvard and Vancouver (or alternatively, permitted some customisation of the citation format).
The only two services I've found that accept it are http://hdl.handle.net/ and http://dx.doi.org/, and I think they're querying the same database.
That DOI is newly deposited, as I said in other comments, it may take a while to propagate.
You can check the Registration Agency with CrossRef to see who's responsible for it:
http://doi.crossref.org/ra/10.1073/pnas.1324197111
In this case, it is CrossRef. So this should work: http://api.crossref.org/works/10.1073/pnas.1324197111
It doesn't. I'll see if I can find out what's wrong.
If you have any questions you can email labs@crossref.org
EDIT: Looking at the Guest Query, http://www.crossref.org/guestquery/ it looks like this was deposited recently. There may be a delay in propagation through our systems.
DOIs are persistent identifiers, and the main reason you want those is so you can have a persistent link from one thing to another. A normal hyperlink is subject to link-rot, which is an especially bad problem when you've got printed journals or online 'printed journals'. A DOI is a link that goes via the DOI to redirect to wherever the link is meant to point at this point in history. RAs are responsible for registering DOIs and updating the link redirect data whenever the thing being pointed to moves.
RAs exist for different purposes. CrossRef exists to enable linking between scholarly publications, so we register DOIs for scholarly publications (journal articles, books, etc). DataCite exists to enable linking to objects like datasets.
CrossRef isn't just an DOI RA, but DOIs are a big part of what we do. In addition to this we store metadata from publishers and then let anyone use our APIs to get that data.
The DOI foundation maintains a load of DOI resolution servers. They all do the same job: you click on a link, you're load-balanced to one of the machines, and it replies with the relevant redirect.
Normally when you click on a DOI in a browser, you are redirected to the appropriate URL. We introduced 'Content Negotiation' for DOIs, which means you can supply an 'Accepts' header and get more bibliographic information about a DOI. This works with a redirect.
Here's an example:
curl -L -iH "Accept: text/turtle" http://dx.doi.org/10.5555/515151
That query is answered by one of the DOI servers. It doesn't matter which.
You see you're redirected to Location: http://data.crossref.org/10.5555%2F515151
This is a CrossRef server and it knows all the publication metadata. This then serves all the bibliographic data.
So TL;DR:
1 - The DOI foundation runs the DOI system
2 - CrossRef is an RA for DOIs
3 - Every RA runs its own resolution servers to spread the load
4 - Every resolution server can answer any DOI registered by any RA
5 - If you ask for bibliographic content negotiation on a CrossRef DOI, you'll be redirected to the data.crossref.org server which will give you what you asked for
And that DOI that worked on dx.doi.org but not data.CrossRef.org might be because it can take a day for the data to propagate to various systems.
Any questions, labs@crossref.org
EDIT: aha, you have to remove dashes for it to work. It should probably do this automatically.
The subject line gets cut much too short, and the URL gets trimmed to the root level of the domain.
I don't think the ISBN lookup works correctly. Typing in 9781405347587 or 978-1405347587 returns a book with ISBN 0-9690745-2-2
I'd be looking forward to upgraded version with IEEE but I just graduated, ha!
Amazon has the ISBN 9781405347587. The only other google result for this is your comment, which Google seems to have already indexed :)
Since Google Books doesn't have that ISBN, I would need 1) fail gracefully instead of giving a citation for the wrong book and 2) have a fallback API. I'm working on both of these. Thanks!