Skip to content
Permalink
Browse files

Fixes and Updates - H (zotero#1168)

* Update Haaretz.js
* Update  HAL Archives Ouvertes.js
* Larger Update on Handelszeitung.js
* Update tests in Harpers.js
* Update Hathi Trust.js
* [HCSP.js]: Activate all browserSupport
* Update tests in HighWire 2.0.js
* Update tests in HLAS (historical).js
* Delete Hurricane Digital Memory Bank.js
The translator is completely broken and actually
the website is covered with COinS.
* Complete rewrite of Huff Post.js
* Update framework
  • Loading branch information...
zuphilip authored and adam3smith committed Nov 2, 2016
1 parent 04d4828 commit 37b6272dd534085073a76c3525fe36cc8d91dc97
Showing with 344 additions and 440 deletions.
  1. +7 −8 HAL Archives Ouvertes.js
  2. +2 −2 HCSP.js
  3. +26 −25 HLAS (historical).js
  4. +7 −6 Haaretz.js
  5. +92 −91 Handelszeitung.js
  6. +33 −33 Harpers.js
  7. +15 −13 Hathi Trust.js
  8. +16 −18 HighWire 2.0.js
  9. +2 −2 Hoovers.js
  10. +142 −90 Huff Post.js
  11. +0 −151 Hurricane Digital Memory Bank.js
  12. +2 −1 deleted.txt
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2014-11-08 21:46:36"
"lastUpdated": "2016-11-02 21:46:36"
}

/*
@@ -98,7 +98,7 @@ function doWeb(doc, url) {
function scrape(doc, url) {
var bibtexUrl = url.replace(/#.+|\/$/, "") + "/bibtex";
var abstract = ZU.xpathText(doc, '//div[@class="abstract-content"]');
var pdfUrl = url.replace(/#.+|\/$/, "") + "/document";
var pdfUrl = ZU.xpathText(doc, '//meta[@name="citation_pdf_url"]/@content');
//Z.debug(pdfUrl)
ZU.doGet(bibtexUrl, function (bibtex) {
//Z.debug(bibtex)
@@ -109,7 +109,7 @@ function scrape(doc, url) {
if (abstract){
item.abstractNote=abstract.replace(/(Abstract|Résumé)\s*:/, "");
}
if (ZU.xpathText(doc, '//div/a[contains(@data-original-title, ".pdf")]')){
if (pdfUrl){
item.attachments = [{
url: pdfUrl,
title: "HAL PDF Full Text",
@@ -147,7 +147,7 @@ var testCases = [
"creatorType": "author"
},
{
"firstName": "J.-P.",
"firstName": "Jean-Pierre",
"lastName": "Cammas",
"creatorType": "author"
},
@@ -273,9 +273,8 @@ var testCases = [
}
],
"tags": [
" ICT appropriation",
"Bibliothèque universitaire",
"Innovation",
"ICT appropriation",
"Learning Centre",
"Pedagogy",
"University Library",
@@ -303,7 +302,7 @@ var testCases = [
}
],
"date": "March 2012",
"abstractNote": "Children performing for a crowd of passersby in a park in Kunming. (Enfants jouant dans un parc à Kunming Photo d'enfants jouant dans un parc à Kunming",
"abstractNote": "Description : Children performing for a crowd of passersby in a park in Kunming. (Enfants jouant dans un parc à Kunming Photo d'enfants jouant dans un parc à Kunming",
"itemID": "gipouloux:medihal-00772952",
"libraryCatalog": "HAL Archives Ouvertes",
"url": "https://medihal.archives-ouvertes.fr/medihal-00772952",
@@ -331,4 +330,4 @@ var testCases = [
"items": "multiple"
}
]
/** END TEST CASES **/
/** END TEST CASES **/
@@ -8,8 +8,8 @@
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcs",
"lastUpdated": "2016-01-30 09:11:04"
"browserSupport": "gcsibv",
"lastUpdated": "2016-10-31 19:16:45"
}

/*
@@ -90,6 +90,7 @@ var testCases = [
"items": [
{
"itemType": "book",
"title": "Peronism and the three Perons: a checklist of material on peronism and on Juan Domingo, Eva, and Isabel Peron, and their writings, in the Hoover Institution library and archives and in the Stanford University Libraries",
"creators": [
{
"firstName": "Laszlo",
@@ -98,44 +99,44 @@ var testCases = [
},
{
"lastName": "Hoover Institution on War, Revolution, and Peace",
"creatorType": "contributor",
"fieldMode": true
},
{
"lastName": "Stanford University",
"creatorType": "contributor",
"fieldMode": true
}
],
"notes": [],
"date": "1988",
"ISBN": "9780817927127",
"callNumber": "Z1630.3 F2849 .H67 1988",
"libraryCatalog": "HLAS (historical)",
"numPages": "170",
"place": "Stanford, CA",
"publisher": "Hoover Institution, Stanford University",
"series": "Hoover Press bibliography",
"seriesNumber": "71",
"shortTitle": "Peronism and the three Perons",
"attachments": [],
"tags": [
"Perón, Juan Domingo",
"Bibliography Catalogs",
"Perón, Eva",
"Bibliography Catalogs",
"Perón, Isabel",
"Bibliography Catalogs",
"Peronism",
"1943-",
"Argentina",
"Bibliography Catalogs",
"Peronism",
"Catalogs",
"History Bibliography Catalogs",
"Hoover Institution on War, Revolution, and Peace",
"Libraries",
"Manuscripts Catalogs",
"Peronism",
"Perón, Eva",
"Perón, Isabel",
"Perón, Juan Domingo",
"Sources Bibliography Catalogs",
"Argentina",
"History Bibliography Catalogs",
"1943-"
"Stanford University"
],
"seeAlso": [],
"attachments": [],
"ISBN": "0817927123",
"title": "Peronism and the three Perons: a checklist of material on peronism and on Juan Domingo, Eva, and Isabel Peron, and their writings, in the Hoover Institution library and archives and in the Stanford University Libraries",
"place": "Stanford, CA",
"publisher": "Hoover Institution, Stanford University",
"date": "1988",
"numPages": "170",
"series": "Hoover Press bibliography",
"seriesNumber": "71",
"callNumber": "Z1630.3 F2849 .H67 1988",
"libraryCatalog": "HLAS (historical)",
"shortTitle": "Peronism and the three Perons"
"notes": [],
"seeAlso": []
}
]
}
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2015-08-17 22:01:10"
"lastUpdated": "2016-10-31 17:33:48"
}

/**
@@ -57,18 +57,19 @@ function doWeb(doc, url) {
item.creators.push(ZU.cleanAuthor(authors[i].textContent, 'author'));
}

item.date = ZU.xpathText(doc, '//time[@itemprop="datePublished"]/@datetime').split('T')[0];
var keywords = ZU.xpathText(doc, '//head/meta[@name="news_keywords"]/@content').split(',');
item.date = ZU.strToISO(ZU.xpathText(doc, '//time[@itemprop="datePublished"]/@datetime'));
var keywords = ZU.xpathText(doc, '//meta[@name="news_keywords"]/@content').split(',');
for(var i=0; i<keywords.length; i++) {
if(keywords[i].length>0) item.tags.push(keywords[i].trim());
}
item.complete();
}

/** BEGIN TEST CASES **/
var testCases = [
{
"type": "web",
"url": "http://www.haaretz.com/news/diplomacy-defense/1.671202",
"url": "http://www.haaretz.com/israel-news/1.671202",
"items": [
{
"itemType": "newspaperArticle",
@@ -96,7 +97,7 @@ var testCases = [
"libraryCatalog": "Haaretz",
"publicationTitle": "Haaretz",
"shortTitle": "Islamic Jihad",
"url": "http://www.haaretz.com/news/diplomacy-defense/1.671202",
"url": "http://www.haaretz.com/israel-news/1.671202",
"attachments": [],
"tags": [
"Palestinian hunger strike"
@@ -144,4 +145,4 @@ var testCases = [
]
}
]
/** END TEST CASES **/
/** END TEST CASES **/

0 comments on commit 37b6272

Please sign in to comment.
You can’t perform that action at this time.