Kia ora Tim,
The first webform example that comes to mind as similar to what you want is at http://wiki.canterbury.ac.nz/display/LIBRARY/Articles+without+DOIs
As written the function convert(form) has some extra stuff around DOIs and EBL (.eblib.com) which you can strip out.
For normalising the PURL, I think I'd do it in three steps:
1) remove the "http://www.university.edu.proxyrewrite.proxy.edu/auth/EZProxy.asp?url=" string if present
2) remove ".proxyrewrite.proxy.edu" if present
3) prepend "http://www.university.edu.proxyrewrite.proxy.edu/auth/EZProxy.asp?url="
Feel free to email me if you need more information - I'm not sure how familiar you are with javascript.
Deborah
-----Original Message-----
From: Code for Libraries [mailto:[log in to unmask]] On Behalf Of Tim Pellett
Sent: Tuesday, 11 June 2013 1:28 a.m.
To: [log in to unmask]
Subject: [CODE4LIB] PURL normalizer script
Hi,
Has anyone created a script to help normalize PURLS that go through the EZProxy rewrite, that they would be willing to share?
The script would have to be smart enough to do the following:
1. Prepend the proxy prefix url if it does not exist.
2. Remove the proxy rewrite from either the proxy prefix and/or the vendor's url.
For example, a sample url would be:
http://www.university.edu.proxyrewrite.proxy.edu/auth/EZProxy.asp?url=
http://search.ebscohost.com.proxyrewrite.proxy.edu/login.aspx
?direct=true&db=a9h&AN=66352991&site=ehost-live
In this example, the proxy prefix is already there, but the rewrite, ".
proxyrewrite.proxy.edu" exists in two places and would need to be removed.
I visualize a web form that the patron would copy/paste the url into the text box and click button and new, working url will be there for user to use for future use.
--
----------------
Tim Pellett
Library Support Specialist
Maine InfoNet, University of Maine
Phone: 207.581.3086
http://support.maineinfonet.org
________________________________
P Please consider the environment before you print this email.
"The contents of this e-mail (including any attachments) may be confidential and/or subject to copyright. Any unauthorised use,
distribution, or copying of the contents is expressly prohibited. If you have received this e-mail in error, please advise the sender
by return e-mail or telephone and then delete this e-mail together with all attachments from your system."
|