Skip to content

Commit

Permalink
Landes - fix abstract grabbing; NYTimes - fix historical PDFs; taz - …
Browse files Browse the repository at this point in the history
…don't detect homepage as article
  • Loading branch information
adam3smith committed Jun 12, 2014
1 parent a15b6f4 commit a7a315b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
16 changes: 12 additions & 4 deletions Landes Publishers.js
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsbv",
"lastUpdated": "2013-11-19 20:51:38"
"lastUpdated": "2014-06-11 21:49:07"
}

/*
Expand Down Expand Up @@ -68,13 +68,13 @@ function doWeb(doc,url)
ZU.processDocuments(urls, doWeb);
});
} else {
var abstract = ZU.xpathText(doc, '//div[@class="span6"]/p')
var abstract = ZU.xpathText(doc, '//div[@class="span6"]//div[@class="pad_l"]')
var translator = Zotero.loadTranslator('web');
//use Embedded Metadata
translator.setTranslator("951c027d-74ac-47d4-a107-9c3069ab7b48");
translator.setDocument(doc);
translator.setHandler('itemDone', function(obj, item) {
item.abstractNote = abstract;
if (abstract) item.abstractNote = abstract.replace(/\n/g, " ");
item.complete();
});
translator.translate();
Expand Down Expand Up @@ -121,13 +121,21 @@ var testCases = [
"publicationTitle": "Cell Cycle",
"volume": "4",
"issue": "5",
"number": "5",
"patentNumber": "5",
"pages": "665-668",
"publisher": "Landes Bioscience",
"institution": "Landes Bioscience",
"company": "Landes Bioscience",
"label": "Landes Bioscience",
"distributor": "Landes Bioscience",
"DOI": "10.4161/cc.4.5.1683",
"ISSN": "1538-4101, 1551-4005",
"url": "http://www.landesbioscience.com/journals/cc/article/1683/",
"abstractNote": "The fidelity of chromosome segregation during cell division is critical to maintain\ngenomic stability and to prevent cancer and birth defects. A key set of kinases that regulates this\nprocess has been identified and characterized over the last few years, including the Aurora, Polo\nand Nek families. Recently we proposed that a little-studied kinase known as haspin is a new\nmember of this important group. During mitosis haspin is phosphorylated, associates with the\nchromosomes, centrosomes and spindle, and is responsible for phosphorylation of histone H3 at\nthreonine-3. Depletion of haspin using RNA interference prevents normal alignment of\nchromosomes at metaphase, suggesting that haspin plays a crucial role in chromosome\nsegregation. Here we discuss possible mechanisms of haspin action and the function of histone\nphosphorylation in mitosis. We also outline some of the questions raised by these new findings\nand consider what role haspin might play in cancer.",
"abstractNote": "The fidelity of chromosome segregation during cell division is critical to maintain genomic stability and to prevent cancer and birth defects. A key set of kinases that regulates this process has been identified and characterized over the last few years, including the Aurora, Polo and Nek families. Recently we proposed that a little-studied kinase known as haspin is a new member of this important group. During mitosis haspin is phosphorylated, associates with the chromosomes, centrosomes and spindle, and is responsible for phosphorylation of histone H3 at threonine-3. Depletion of haspin using RNA interference prevents normal alignment of chromosomes at metaphase, suggesting that haspin plays a crucial role in chromosome segregation. Here we discuss possible mechanisms of haspin action and the function of histone phosphorylation in mitosis. We also outline some of the questions raised by these new findings and consider what role haspin might play in cancer.",
"date": "2005/03/02",
"libraryCatalog": "www.landesbioscience.com",
"accessDate": "CURRENT_TIMESTAMP",
"shortTitle": "Haspin"
}
]
Expand Down
4 changes: 2 additions & 2 deletions NYTimes.com.js
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsv",
"lastUpdated": "2014-04-03 17:50:01"
"lastUpdated": "2014-06-11 21:54:15"
}

function detectWeb(doc, url) {
Expand Down Expand Up @@ -177,7 +177,7 @@ function scrape(doc, url) {
newItem.url = newItem.url.replace(/\?.+/, '');
}
// get pdf for archive articles - make sure we don't go here if we're getting multiples or regular items
var pdfxpath = '//div[@class="articleAccess"]/p[@class="button"]/a[contains(@href, "/pdf")]/@href'
var pdfxpath = '//div[@id="articleAccess"]//span[@class="downloadPDF"]/a[contains(@href, "/pdf")]/@href'
if (!m && ZU.xpathText(doc, pdfxpath) != null) {
var pdflink = ZU.xpathText(doc, pdfxpath)
Zotero.Utilities.doGet(pdflink, function (text) {
Expand Down
4 changes: 2 additions & 2 deletions taz.de.js
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2013-09-25 15:39:32"
"lastUpdated": "2014-06-11 22:07:16"
}

/*
Expand Down Expand Up @@ -41,7 +41,7 @@ http://www.taz.de/1/debatte/kolumnen/artikel/1/haengt-sie-hoeher-1/

function detectWeb(doc, url) {

var taz_ArticleTitle_XPath = ".//h1";
var taz_ArticleTitle_XPath = ".//div[@class='sectbody']//h1";
var taz_Multiple_XPath = '//div[contains(@class, "first_page")]//a[h4]';
var taz_Search_XPath = '//div[contains(@class, "searchresults")]//a[h4]'
if (doc.evaluate(taz_ArticleTitle_XPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext() ){
Expand Down

0 comments on commit a7a315b

Please sign in to comment.