EPrints Technical Mailing List Archive

Message: #07308

< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Core blimey!

Hey all!

After coming up to nearly 5 years at Liverpool as resident eprints / repository / perl technologist I’m leaving at the end of the month to take up a new position at Jisc as Oricd community support and technology lead. 

I just wanted to say thanks so much to all the excellent people who have been so very helpful here and the many I’ve met in person as well in UG and other events.

I’m sure I’ll still be in touch, and will hopefully be at RepoFringe to catch up with everyone.

As my parting ‘gift' I leave a muddle of code that is a working but could do with much improvement: CoreSearch – I’m not sure how improved the basic search in 3.4 is but for those still struggling on 3.3.X this gives a call to the core.ac.uk repository API and returns local results

Roughly the code grabs the search term, slaps it onto the end of a query posted to the CORE API REST interface which already has your repository ID set, gets a list of eprint_id from the OAI information in the JSON return from the search, grabs those local eprints ID and renders them on a results page

Again, I apologise very much for my horrible code….

NB – you need to be indexed by core.ac.uk for this to work!

Things to do to set it up:

Replace YYY with your CORE.ac.uk repository ID in $searchroot_url
Replace XXXXXXX with your CORE.ac.uk API key in $searchterms_url

Add a phrase to your local phrases bank, such as this:

    <epp:phrase id="cgi/CoreSearch:title">Search The Repository</epp:phrase>

Things the code desperately needs:

Better Configurations

Probably should use HTTP POST not GET

Error trapping for when search queries fail

Better phrase set up for internationalisation

Paging (currently only returns first 10 results)

Turning into a Bazaar package

Until the next time . . .