[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EP-tech] Core blimey!
- Subject: [EP-tech] Core blimey!
- From: Adam.Moore at liverpool.ac.uk (Vials Moore, Adam)
- Date: Fri, 18 May 2018 13:20:10 +0000
- In-reply-to: <email@example.com>
- References: <D718D6E2.257A1firstname.lastname@example.org>, <D71B4241.258FEemail@example.com>, <74B1B9AD-DA08-44FA-8650-B4BFEA162AC6@liverpool.ac.uk>, <firstname.lastname@example.org> <email@example.com>
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<http://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<http://core.ac.uk> for this to work!
Things to do to set it up:
Replace YYY with your CORE.ac.uk<http://CORE.ac.uk> repository ID in $searchroot_url
Replace XXXXXXX with your CORE.ac.uk<http://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:
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 . . .
-------------- next part --------------
An HTML attachment was scrubbed...