Site Translator for Espacenet not working
This translator has multiple issues. It does not detect the site at all anymore - the match in detectWeb needs to change from textdoc to biblio for individual documents and from results to searchResults for multiple. I was able to change these with Scaffold to get the site to detect at all.
But after that, the code section throws an error which I cannot find.
Thanks.
But after that, the code section throws an error which I cannot find.
Thanks.
This discussion has been closed.
-------------------------------------------------
Espacenet have changed their URL format, simply replace the Detect code in Scaffold by the following :
function detectWeb(doc, url) {
if(doc.location.href.match("searchResults")) {
return "multiple";
} else if (doc.location.href.match("publicationDetails")) {
return "patent";
}
}
In addition, the title xpath have changed too, replace the older by :
/html/body/table[2]/tbody/tr[1]/td[3]/h2
http://zotero-dev.googlegroups.com/web/TradZotero_espacenet.txt
1. Go into Z preferences (cogwheel menu in Z), and in the 'Advanced' tab, click on Data Directory;
2. Click on the 'storage' folder and locate the file called 'ESpacenet.js';
3. Open with a text editor like Notepad, or better Notepad Pro;
4. CLOSE Firefox;
5. Back in the test editor, replace the function detectWeb in accordance with tperki's second post above;
6. Replace the xpath statement for the title section in accordance with tperki's second post above (this is the line starting 'var xpath' under the line '//Get title');
7. Change the line that starts "lastUpdated" (near the top of the file) with the new date and time in the format YYYY-MM-DD hh:mm:00;
8. Save and close the file.
9. Re-start FF.
You may be able to use Scaffold as an alternative but this add-on doesn't seem to work with Zotero 1.5b2.1.
I did try Scaffold before posting here but it didn't seem to connect to the database. Not sure if that's an access/permissions issue or if it's not working. Anyway, thanks for the instructions.
I got the espacenet-translator working now.
But has somebody a solution for integration of an automatic full-text pdf-download in this espacenet translator. This would be very helpfull.
I've been using the Zotfile plugin, which takes a little fiddling (well-documented in their instructions) to get to work, but which will pull your most-recently downloaded file out of the download folder and into whichever item you are highlighting in Zotero. So I manually download the PDF and Zotfile it into the appropriate Z item (you can also download a bunch of PDFs and Zotfile them in reverse order of download, since Zotfile deletes the file from download folder when it moves it to Zotero.
http://www.columbia.edu/~jpl2136/zotfile.html
Hey Z devs, any chance we can get the fixed espacenet translator in the respository?
i tried to use the zotfile plugin, but I got it until now not working. This problem, I discuss further in an other discussion.
pdf's direct from espacenet: captcha could be really a problem.
the old espacenet translator is not working anymore since the espacenet search homepage has changed to http://t1.espacenet.com/ . Is there a chance to get the old espacenet translator working for the new site or has anyone a translator written for the new espacenet homepage.
Thanks.
would indeed be very usefull to have that working again.
Would it be an idea to contact espacenet/epo to ask whether they could add some standard to their page that can be read by zotero? Embedded RDF?
-Moritz
https://gist.github.com/951329
It should work but I'm not really a xpath specialist so please report any error.
To make it work find the ESpacenet.js translator in your Zotero/translator folder and replace the code.
Edouard.
//table[1]/tbody/tr[5]/td
, use//table[@class="tableType3"]/tbody/tr[5]/td
or//table[@class="tableType3"]/tbody/tr[contains(th/text(),"Applicant(s)")]/td
. Navigating tables is messy, so enumeration is sometimes not avoidable, but enumeration outside of data tables is something to avoid; some of your expressions are fragile enough to be thrown off by the addition of a single DIV or TR anywhere in the page. If you have questions, send them to zotero-dev and we'll get this committed. Thanks for stepping up and making a great start at a translator!thanks for your work. But for me the modified translator is not working. I got no "Zotero" Button in the address line of my firefox, which indicates that the espacenet-site is zotero-ready.
(firefox 4.0.1, zotero 2.1.6, windows xp sp2)
Yes, it should be working on worldwide.espacenet.com. Note that you need to search for something for the icon to show up.
The only feature that is not working yet is the ECLA classification, the translator is not able to get the data.
Thank you for your comments, I'll rework the xpaths and the ECLA support and post the code on the google group.
for me the translator do not work.
Here a sample url:
http://worldwide.espacenet.com/publicationDetails/biblio?DB=EPODOC&adjacent=true&locale=en_EP&FT=D&date=20071221&CC=KR&NR=20070120187A&KC=A
I get no zotero icon in the addressbar of the firefox.
Edouard - with "replace the code" you mean "replace the file Espacenet.js completely, or not.
Many Thanks Ajlyon.
Could anyone provide assistance fixing the problem with the translator? This was such a great feature.
TIA.
I'd suggest to see if one of the other patent sites works for this.
The problem is that there is no systematic display of data on the site, so writing a translator involves an unfortunate amount of hacks which break easily.