OAButton/OAButton — pull request #106 by crankycoder (2013-10-09 05:16:14+00:00)
Title: Feature/101 core integration

@jezcope - I pushed this up to fix some problems with osx test failures. Sorry for the new branch - I'm having git problems.

--

﻿﻿Addresses #101.

Ok, so after you submit the form, this will now do a title search (searching by DOI isn't possible) in [CORE](http://core.kmi.open.ac.uk) and link to the full-text of the top ten hits. Obviously, this only works for papers which are cached in CORE: try it with [this paywalled Nature paper](http://www.nature.com/nphoton/journal/v4/n8/full/nphoton.2010.179.html).

I had to add some server-side stuff to proxy the calls to the CORE API because it doesn't set the `Access-Control-Allow-Origin:` header which means modern browsers won't let us do an XHR to it from JavaScript (see [Cross-origin resource sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) if you've not come across this before). It also has the added benefit of keeping our API key private because it's only needed on the server.

For the CORE stuff to work, you need to set the CORE_API_KEY environment variable before starting the server. Also, I added a couple of requirements in `requirements.txt`, so you'll need to `pip install -r requirements.txt` again.

Definitely some polishing required, but I'll wait and see what people make of this before deciding what needs doing.