EBSCOhost translater update for June 2011 release

76 views
Skip to first unread message

Josh (EP)

unread,
Mar 10, 2011, 5:30:59 PM3/10/11
to zoter...@googlegroups.com
Hi all,
Attached is a patch to account for the fact that our form tag will change a bit in June. Our form will now look like the following on the detail page, so it had to be accounted for in the translator. This patch is against the Zotero 2.0 branch.

This is how our form tag used to look:
<form id="aspnetForm" onsubmit="javascript:return WebForm_OnSubmit();" action="detail?hid=8&amp;sid=425955c5-d787-4287-b4d9-8dfab3120ca6%40sessionmgr14&amp;vid=4&amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZQ%3d%3d" method="post">

This is how our form now looks:
<form id="aspnetForm" onsubmit="javascript:return WebForm_OnSubmit();" action="detail?hid=805&amp;sid=ee4ef7de-6bcb-484b-8325-c15d68acdb15%40sessionmgr701&amp;vid=1&amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZQ%3d%3d" method="post" name="aspnetForm">

Oddly enough I can't get this translator to work on the Mac against our existing pages, although it seems to work fine on Windows. Before committing this patch can you verify Zotero + this patch works against the existing EBSCOhost interface in your environment?

Thanks,
Josh Geller
EBSCO Publishing
EP-zotero.patch

Avram Lyon

unread,
Mar 11, 2011, 3:24:52 AM3/11/11
to zoter...@googlegroups.com
Josh,

2011/3/11 Josh (EP) <jge...@ebscohost.com>:


> Attached is a patch to account for the fact that our form tag will change a
> bit in June. Our form will now look like the following on the detail page,
> so it had to be accounted for in the translator. This patch is against the
> Zotero 2.0 branch.

[..]


> Oddly enough I can't get this translator to work on the Mac against our
> existing pages, although it seems to work fine on Windows. Before committing
> this patch can you verify Zotero + this patch works against the existing
> EBSCOhost interface in your environment?

I ran into problems under Linux as well, so I did some more tweaking
-- I feel like it has to do with the escaping of the persistent link
URI, but I'm not sure. A revised translator that should work on the
new system, and which has a slightly less fragile regular expression
for the download URI, is up at Github:
https://github.com/ajlyon/zotero-bits/raw/master/EBSCOhost.js

Please try it out. If it passes muster, I'll get it into the repo right away.

Avram

Josh (EP)

unread,
Mar 11, 2011, 5:23:12 PM3/11/11
to zoter...@googlegroups.com
Avram,
I made some small corrections (attached) that seem to be working well. Let me know what you think. I used diff -crB to make the patch.
EBSCOhost.patch

Avram Lyon

unread,
Mar 23, 2011, 5:44:58 PM3/23/11
to zoter...@googlegroups.com
2011/3/12 Josh (EP) <jge...@ebscohost.com>:

> I made some small corrections (attached) that seem to be working well. Let
> me know what you think. I used diff -crB to make the patch.

Looks good. My patched version is now at
http://github.com/ajlyon/zotero-bits/raw/master/EBSCOhost.js -- please
confirm that this works on the updated EBSCO that's on its way, and
I'll get this into the repo ASAP, so clients have it before the switch
on your end.

And apologies for dropping off the translator review radar there for a bit.

Avram

Josh (EP)

unread,
Jul 20, 2011, 2:19:00 PM7/20/11
to zoter...@googlegroups.com
Hi Avram,

I was alerted to some issues with interface changes we made that will break Zotero. We are releasing a new version of EBSCOhost today. I have attached a new version of the translator that should work. I am wondering if there is a better way than using retrieveDocument, but I need data from the result list to pass into the next function for the next page. Let me know what you think.

Thanks,
Josh
EBSCOhost.js
EBSCOhost.patch

Avram Lyon

unread,
Jul 20, 2011, 2:29:24 PM7/20/11
to zoter...@googlegroups.com, Simon Kornblith, Dan Stillman
[cc'ing Dan and Simon, so they can get this pushed to clients ASAP.]

On Wed, Jul 20, 2011 at 10:19 PM, Josh (EP) <jrge...@gmail.com> wrote:
> I was alerted to some issues with interface changes we made that will break
> Zotero. We are releasing a new version of EBSCOhost today. I have attached a
> new version of the translator that should work. I am wondering if there is a
> better way than using retrieveDocument, but I need data from the result list
> to pass into the next function for the next page. Let me know what you
> think.

I changed the translator to use ZU.processDocuments(..) instead of
retrieveDocument(..), so that it works in the Safari and Chrome
connectors after their imminent update.

Take a look at make sure it works on the new site:
http://github.com/ajlyon/translators/raw/master/EBSCOhost.js

I'll commit it as soon as you tell me that it works (since I can't
test it until the new interface is rolled out).

Thanks for being so proactive on this-- it's a pleasure!

Avram

Josh (EP)

unread,
Jul 20, 2011, 3:13:29 PM7/20/11
to zoter...@googlegroups.com, Simon Kornblith, Dan Stillman

That's how I had it before I went to retrieveDocument. When using processDucuments, for some reason it uses the record key of the last item for all the records on the result list. I tried using wait and done, but maybe I did not have them in the right place. Hmm...

Avram Lyon

unread,
Jul 20, 2011, 3:33:10 PM7/20/11
to zoter...@googlegroups.com
On Wed, Jul 20, 2011 at 11:13 PM, Josh (EP) <jge...@epnet.com> wrote:
> That's how I had it before I went to retrieveDocument. When using
> processDucuments, for some reason it uses the record key of the last item
> for all the records on the result list. I tried using wait and done, but
> maybe I did not have them in the right place. Hmm...

I just pushed an updated version to my fork on github:
https://github.com/ajlyon/translators/commit/fb34ca3559db176a88b5cdaf873123142df4594b

It's a little hard to program in the dark, but that should work if
there aren't any redirects happening on the EBSCO side of things.

Worst case, we can push the retrieveDocument version now, and find a
solution later that supports connectors. The current generation of
connectors runs everything inside Standalone anyway, so it'll work
fine for now.

Avram

Josh (EP)

unread,
Jul 20, 2011, 4:09:59 PM7/20/11
to zoter...@googlegroups.com
It does redirect, so the url does not match. I am looking now to see if there is something else we could match on.

Avram Lyon

unread,
Jul 20, 2011, 4:23:28 PM7/20/11
to zoter...@googlegroups.com
On Thu, Jul 21, 2011 at 12:09 AM, Josh (EP) <jge...@epnet.com> wrote:
[..]

>> It's a little hard to program in the dark, but that should work if
>> there aren't any redirects happening on the EBSCO side of things.
>>
>> Worst case, we can push the retrieveDocument version now, and find a
>> solution later that supports connectors. The current generation of
>> connectors runs everything inside Standalone anyway, so it'll work
>> fine for now.
>
> It does redirect, so the url does not match. I am looking now to see if
> there is something else we could match on.

I've pushed a new version that recurses more intelligently, I think:
https://github.com/ajlyon/translators/commit/af029e501e3cf571a343f72fa52ce3f6aad1986d

Avram

Josh (EP)

unread,
Jul 20, 2011, 5:02:14 PM7/20/11
to zoter...@googlegroups.com
Much better, although for some reason not all the items are being shown in the select box. The new version of EBSCOhost is now live across all servers. If all result items showed up I would say we were good. I noticed items was re-var'ed, but I cannot see why some records are not listed.
 

Avram Lyon

unread,
Jul 20, 2011, 5:15:34 PM7/20/11
to zoter...@googlegroups.com

I won't be able to do any more work on this until tomorrow-- it's late
here in Russia. I think we can roll this out as is for now, and push
an additional update as soon as I get a chance to troubleshoot, or you
find a solution.

Dan: Can you push the updated version from the main branch on Github to clients?

It'd also be great if we could get 2.1.9 out the door soon, so I don't
have to maintain 2.1.8 compatibility in translators...

Avram

Simon

unread,
Jul 20, 2011, 8:47:07 PM7/20/11
to zoter...@googlegroups.com
There was a syntax error in that was causing the DOI translator to run instead, and the DOI translator was only picking up part of the search results, which gave the appearance of partial functionality. I've fixed the syntax error in the EBSCOhost translator, as well as a regression in Zotero that may have made the syntax error difficult to spot, and I finally got errors to display the proper line number, which wasn't working for quite a while.

Simon

Simon

unread,
Jul 20, 2011, 8:48:28 PM7/20/11
to zoter...@googlegroups.com
Oops, forgot to note that the updated translator can be had at https://raw.github.com/zotero/translators/master/EBSCOhost.js

Avram Lyon

unread,
Jul 21, 2011, 3:19:18 AM7/21/11
to zoter...@googlegroups.com

The syntax error was mainly because I was trying to code this at 2 am
local time... Thanks for catching it, and thanks for addressing the
line number issue. Now we can finally bring back error highlighting in
Scaffold.

Has this been pushed yet?

Avram

Dan Stillman

unread,
Jul 21, 2011, 1:44:17 PM7/21/11
to zoter...@googlegroups.com
On 7/21/11 3:19 AM, Avram Lyon wrote:
> Has this been pushed yet?

It's been pushed.

Reply all
Reply to author
Forward
0 new messages