Live data from Hacker News

Show HN: One-click citations for your essays

speedcite.com

21–30 of 76 posts

Re: Show HN: One-click citations for your essays

#21
post #7

Earlier quoted context omitted.

Thanks for the feedback. Originally, clicking the style pill button refreshed the citation (in the selected style), which I think is the behavior you're describing. It sounds like I should go back to that behavior.

Have the server respond with the necessary info but generate the style client side instead of server side. There doesn't appear to be any need to make trips back to the server to change styles. Also, " http://google.com" complains about robots.txt, but " http://google.com/" (trailing slash) does not.

You're right - I could just pass the variables as JS to the client, then assemble the final citation there. Great idea! Regarding the trailing slash, that's a regex problem, and I will solve it! Nice catch.

Re: Show HN: One-click citations for your essays

#22

Is there a reason it doesn't show author names when I submit a URL like http://www.sciencemag.org/content/210/4472/903.short ?

Sciencemag.org uses a special metatag for authors (citation_author). I'm not sure how common this is, but I will add logic to check these. Then SpeedCite would properly cite the author.

Yeah I see the same happening with bbc. Example: http://www.bbc.com/news/health-27204988

Re: Show HN: One-click citations for your essays

#23
It didn't work with the ISBN I tried: 978-0-06-121495-0. For the paperback of this book: https://en.wikipedia.org/wiki/What_Is_Your_Dangerous_Idea%3F. A google search on the ISBN finds it.

EDIT: aha, you have to remove dashes for it to work. It should probably do this automatically.

Re: Show HN: One-click citations for your essays

#24
post #19

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 -…

This 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!

Re: Show HN: One-click citations for your essays

#25
post #23

It didn't work with the ISBN I tried: 978-0-06-121495-0. For the paperback of this book: https://en.wikipedia.org/wiki/What_Is_Your_Dangerous_Idea%3F . A google search on the ISBN finds it. EDIT: aha, you have to remove dashes for it to work. It should probably do this automatically.

Thanks for pointing this out. I thought I'd corrected this problem. I will fix this ASAP!

Re: Show HN: One-click citations for your essays

#27
post #19

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 -…

This 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!

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

Re: Show HN: One-click citations for your essays

#29
post #27

Earlier quoted context omitted.

This 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!

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

How 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']
Post reply on HN