Can't install Solvent
Dear Zotero,
I have tried to follow the instructions to install Solvent. They does not seem to work in FF 9.0.1. I just get "... incompatible with Firefox 9.0.1".
The instructions I tried to follow are here:
http://niche-canada.org/member-projects/zotero-guide/chapter3.html
I have tried to follow the instructions to install Solvent. They does not seem to work in FF 9.0.1. I just get "... incompatible with Firefox 9.0.1".
The instructions I tried to follow are here:
http://niche-canada.org/member-projects/zotero-guide/chapter3.html
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
It has been wikified and updated (a year and half ago...) by Tom Roche here.
In some (simple) cases, you should consider using the "translator framework".
I use Firebug to get XPath.
BTW Scaffold has a checkbox for including this framework. This should be a button instead since clearing the checkbox does not remove the framework.
- The field Scaffold/Target is not used by FW. Is it used at all?
- What should be put in Scaffold/Min. Version?
- How can I normalize the date (ISO format preferred)?
- Why does not my "tags" work? Could Scaffold perhaps tell that the object type is wrong?
- What is "libraryCatalog" and where did I specify that? ;-)
- Any suggestion for what to do with FW.MultiScraper and how to block list pages for FW.Scraper?
Tested on this page:
http://www.psychologytoday.com/blog/mad-in-america/201112/cognitive-therapy-found-effective-in-unmedicated-psychotic-patients-and-o
Here is the FW code:
function detectWeb(doc, url) { return FW.detectWeb(doc, url); }
function doWeb(doc, url) { return FW.doWeb(doc, url); }
FW.Scraper({
itemType : 'blogPost',
// detect : FW.Url().match(/(\/node\/\d+|articles\/[a-zA-Z0-9]+\.shtml)/),
detect : FW.Url().match("^http://(?:www.)?psychologytoday.com/blog/"),
title : FW.Xpath('/html/body/div/div[4]/div/div[2]/div/div/h1').text().trim(),
creators : FW.Xpath('/html/body/div/div[4]/div/div/div/div[2]/div[2]')
.text().replace(/\s/," ")
.trim()
.replace(/^by /, "")
.cleanAuthor("author"),
date : FW.Xpath('/html/body/div/div[4]/div/div[2]/div/div[3]/span')
.text()
.match(/[a-z]+ [0-9]+, 20[0-9][0-9]/i),
// tags : FW.Xpath('//div[@class="terms terms-inline"]/ul/li/a[@rel="tag"]').text(),
tags : FW.Xpath('/html/body/div/div[4]/div/div[2]/div/div[4]/div[3]/div[2]/div[4]')
.text()
.replace(/Tags:/, "")
.trim()
.split(/,\s*/),
blogTitle : FW.Xpath('/html/body/div/div[4]/div/div/div/div[2]/h1/a').text().trim(),
abstractNote : FW.Xpath('/html/body/div/div[4]/div/div[2]/div/div[2]').text().trim(),
downloadAssociatedFiles : false
});
http://groups.google.com/group/zotero-dev
If you post there I suggest you post the entire code to gist.github.com - it's much easier to read and download that way.
What I can say so far is that you don't want to use full xpaths - they are much too fragile. Instead you want to use abbreviated xpaths like
//div[@class="title"] and the like.
Scaffold will handle the date automatically, and don't worry about the minimum version; if it matters, I'll set it before putting it in the repository (it almost never matters).
Thanks ajlyon, I see. Perhaps some message about what is included/removed when checking/unchecking that checkbox would make it more clear?
Info about testing in standalone version should I ask that here, or?