Skip to content
Permalink
Browse files

Merge in changes from zotero#789 for translators modified in zotero#896

  • Loading branch information...
aurimasv committed Jun 17, 2015
1 parent a393202 commit c99f87f7b1f175f7460e84b66483cec71622a53f
@@ -2,7 +2,7 @@
"translatorID": "0dda3f89-15de-4479-987f-cc13f1ba7999",
"label": "Ancestry.com US Federal Census",
"creator": "Elena Razlogova",
"target": "^https?://search.ancestry.com/.*(usfedcen|1890orgcen|1910uscenindex)",
"target": "^https?://search\\.ancestry\\.com/.*(usfedcen|1890orgcen|1910uscenindex)",
"minVersion": "1.0.0b4.r1",
"maxVersion": "",
"priority": 100,
@@ -2,7 +2,7 @@
"translatorID": "635c1246-e0c8-40a0-8799-a73a0b013ad8",
"label": "Bryn Mawr Classical Review",
"creator": "Michael Berkowitz",
"target": "^https?://bmcr\\.brynmawr\\.edu",
"target": "^https?://bmcr\\.brynmawr\\.edu/",
"minVersion": "1.0.0b4.r5",
"maxVersion": "",
"priority": 100,
@@ -2,7 +2,7 @@
"translatorID": "7e51d3fb-082e-4063-8601-cda08f6004a3",
"label": "Education Week",
"creator": "Ben Parr",
"target": "^https?://(?:www\\.|blogs\\.|www2\\.)?edweek",
"target": "^https?://(www2?\\.|blogs\\.)?edweek\\.org/",
"minVersion": "1.0.0b4.r1",
"maxVersion": "",
"priority": 100,
@@ -2,10 +2,10 @@
"translatorID": "5eacdb93-20b9-4c46-a89b-523f62935ae4",
"label": "HighWire",
"creator": "Simon Kornblith",
"target": "^https?://[^/]+/(?:cgi/searchresults|cgi/search|cgi/content/(?:abstract|full|short|summary)|current.dtl$|content/vol[0-9]+/issue[0-9]+/(?:index.dtl)?$)",
"target": "^https?://[^/]+/(cgi/searchresults|cgi/search|cgi/content/(abstract|full|short|summary)|current\\.dtl$|content/vol[0-9]+/issue[0-9]+/(index\\.dtl)?$)",
"minVersion": "2.1",
"maxVersion": "",
"priority": 100,
"priority": 250,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsbv",
2 IGN.js
@@ -2,7 +2,7 @@
"translatorID": "d210c5a1-73e1-41ad-a3c9-331d5a3ead48",
"label": "IGN",
"creator": "odie5533",
"target": "^https?://[^/]*\\.ign\\.com/",
"target": "^https?://[^/]+\\.ign\\.com/",
"minVersion": "1.0",
"maxVersion": "",
"priority": 100,
@@ -5,7 +5,7 @@
"target": "^https?://[^/]+/itw/infomark/",
"minVersion": "1.0.0b3.r1",
"maxVersion": "",
"priority": 100,
"priority": 250,
"inRepository": true,
"translatorType": 4,
"browserSupport": "g",
@@ -92,7 +92,7 @@ function scrape(doc, url){
item.abstractNote = Zotero.Utilities.trimInternal(doc.evaluate('//p[@class="abstract_block"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent);
var authors = Zotero.Utilities.trimInternal(doc.evaluate('//div[@class="bb"]/h3', doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent).split(/,\s+/);
for (var i=0; i<authors.length; i++) {
var aut = authors[i].replace(/[^\w^\s^\.]/g, "").replace(/\d/g, "");
var aut = authors[i].replace(/[^A-Z\s.]+/gi, '');
item.creators.push(Zotero.Utilities.cleanAuthor(aut, "author"));
}
item.date = doc.evaluate('//div[@class="abs-footer"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent.match(/date:\s+(.*)/)[1];
@@ -2,7 +2,7 @@
"translatorID": "cf87eca8-041d-b954-795a-2d86348999d5",
"label": "Library Catalog (Aleph)",
"creator": "Simon Kornblith, Michael Berkowitz, Ming Yeung Cheung",
"target": "https?://[^/]+/F(?:/[A-Z0-9\\-]+(?:\\?.*)?$|\\?func=find|\\?func=scan|\\?func=short)",
"target": "^https?://[^/]+/F(/[A-Z0-9\\-]+(\\?.*)?$|\\?func=find|\\?func=scan|\\?func=short)",
"minVersion": "1.0.0b3.r1",
"maxVersion": "",
"priority": 250,
@@ -2,7 +2,7 @@
"translatorID": "5d506fe3-dbde-4424-90e8-d219c63faf72",
"label": "Library Catalog (BiblioCommons)",
"creator": "Avram Lyon",
"target": "^https?://[^.]+\\.bibliocommons\\.com\\/",
"target": "^https?://[^/]+\\.bibliocommons\\.com\\/",
"minVersion": "2.1",
"maxVersion": "",
"priority": 250,
@@ -2,7 +2,7 @@
"translatorID": "ce7a3727-d184-407f-ac12-52837f3361ff",
"label": "NYTimes.com",
"creator": "Simon Kornblith",
"target": "^https?://(?:query\\.nytimes\\.com/(?:search|gst)/(?:alternate/)?|(?:select\\.|www\\.|\\.blogs\\.)?nytimes\\.com/)",
"target": "^https?://(query\\.nytimes\\.com/(search|gst)/(alternate/)?|(select\\.|www\\.|\\.blogs\\.)?nytimes\\.com/)",
"minVersion": "2.1.9",
"maxVersion": "",
"priority": 100,
@@ -146,7 +146,7 @@ function scrape(doc, url) {
var author = authors[i];
// fix capitalization
var words = author.split(" ");
for (var j in words) {
for (var j=0; j<words.length; j++) {
words[j] = words[j][0].toUpperCase() + words[j].substr(1).toLowerCase();
}
author = words.join(" ");
@@ -2,7 +2,7 @@
"translatorID": "fc410e64-0252-4cd3-acb1-25e584775fa2",
"label": "National Library of Australia",
"creator": "Michael Berkowitz",
"target": "http://librariesaustralia.nla.gov.au/",
"target": "^https?://librariesaustralia\\.nla\\.gov\\.au/",
"minVersion": "1.0.0b4.r5",
"maxVersion": "",
"priority": 100,
@@ -2,7 +2,7 @@
"translatorID": "fe39e97d-7397-4f3f-a5f3-396a1a79213c",
"label": "OpenJudis - Indian Supreme Court cases",
"creator": "Prashant Iyengar and Michael Berkowitz",
"target": "^https?://(www.)?openarchive\\.in/(judis|newcases)",
"target": "^https?://(www\\.)?openarchive\\.in/(judis|newcases)",
"minVersion": "1.0.0b4.r5",
"maxVersion": "",
"priority": 100,
@@ -2,7 +2,7 @@
"translatorID": "f203db7f-7b7b-4dc4-b018-115b7885fe3b",
"label": "Oxford Music and Art Online",
"creator": "Michael Berkowitz",
"target": "http://[^/]*www.oxford(music|art)online.com[^/]*/",
"target": "^https?://([^/]+\\.)?www\\.oxford(music|art)online\\.com/",
"minVersion": "1.0.0b4.r5",
"maxVersion": "",
"priority": 100,
@@ -55,12 +55,11 @@ function scrape(ids, host){
translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
translator.setString(text);
translator.setHandler("itemDone", function(obj, item) {
var authors = new Array();
for (var j in item.creators) {
if (!item.creators[j].firstName){
names = item.creators[j].lastName.match(/(.*)\s([^\s]+)$/);
item.creators[j] = {firstName:names[1], lastName:names[2], creatorType:"author"};
}
for (var j=0; j<item.creators.length; j++) {
if (!item.creators[j].firstName){
names = item.creators[j].lastName.match(/(.*)\s([^\s]+)$/);
item.creators[j] = {firstName:names[1], lastName:names[2], creatorType:"author"};
}
}
item.complete();
});
@@ -2,7 +2,7 @@
"translatorID": "b0abb562-218c-4bf6-af66-c320fdb8ddd3",
"label": "Philosopher's Imprint",
"creator": "Michael Berkowitz",
"target": "http://quod.lib.umich.edu/p/phimp",
"target": "^https?://quod\\.lib\\.umich\\.edu/p/phimp",
"minVersion": "1.0.0b4.r5",
"maxVersion": "",
"priority": 100,
@@ -2,7 +2,7 @@
"translatorID": "291934d5-36ec-4b81-ac9c-c5ad5313dba4",
"label": "Pion Journals",
"creator": "Michael Berkowitz",
"target": "http://(www.)?(hthpweb|envplan|perceptionweb)\\.com/",
"target": "^https?://(www\\.)?(hthpweb|envplan|perceptionweb)\\.com/",
"minVersion": "1.0.0b4.r5",
"maxVersion": "",
"priority": 100,
@@ -2,10 +2,10 @@
"translatorID": "a77690cf-c5d1-8fc4-110f-d1fc765dcf88",
"label": "ProQuest Legacy",
"creator": "Simon Kornblith",
"target": "^https?://[^/]+/pqdweb\\?((?:.*\\&)?did=.*&Fmt=[0-9]|(?:.*\\&)Fmt=[0-9].*&did=|(?:.*\\&)searchInterface=|(?:.*\\&)TS=[0-9])",
"target": "^https?://[^/]+/pqdweb\\?((.*\\&)?did=.*&Fmt=[0-9]|(.*\\&)Fmt=[0-9].*&did=|(.*\\&)searchInterface=|(.*\\&)TS=[0-9])",
"minVersion": "1.0.0b3.r1",
"maxVersion": "",
"priority": 100,
"priority": 250,
"inRepository": true,
"translatorType": 4,
"browserSupport": "g",
@@ -21,7 +21,7 @@ function scrape(doc) {
if (m = datum.match(/^Title;(.*)$/)) {
item.title = ZU.capitalizeTitle(m[1]);
} else if (datum.indexOf('Author;') == 0 && (m = datum.match(/\b[A-Z'\-]+\s+[A-Z'\-]+/g))) {
for (var j=0; j<m.length; j++) {;
for (var j=0; j<m.length; j++) {
item.creators.push(Zotero.Utilities.cleanAuthor(Zotero.Utilities.capitalizeTitle(m[j], true), "author"));
}
} else if (m = datum.match(/^Journal Title;(.*)$/)) {
@@ -2,7 +2,7 @@
"translatorID": "180a62bf-efdd-4d38-8d85-8971af04dd85",
"label": "TV by the Numbers",
"creator": "odie5533",
"target": "^https?://tvbythenumbers\\.com",
"target": "^https?://tvbythenumbers\\.com/",
"minVersion": "1.0",
"maxVersion": "",
"priority": 100,
@@ -172,7 +172,7 @@ function scrape(doc, url) {
var author = authors[i];
var words = author.split(" ");

for (var j in words) {
for (var j=0; j<words.length; j++) {
if (words[j] != "") {
words[j] = words[j][0].toUpperCase() + words[j].substr(1).toLowerCase();
}
@@ -2,7 +2,7 @@
"translatorID": "9499c586-d672-42d6-9ec4-ee9594dcc571",
"label": "The Hindu (old)",
"creator": "Prashant Iyengar and Michael Berkowitz",
"target": "^https?://(www\\.)?hindu\\.com",
"target": "^https?://(www\\.)?hindu\\.com/",
"minVersion": "1.0.0b4.r5",
"maxVersion": "",
"priority": 100,
@@ -2,7 +2,7 @@
"translatorID": "0d6f8450-72e8-4d8f-bdc2-b7fa03e6f2c5",
"label": "The Nation",
"creator": "odie5533",
"target": "^https?://www\\.thenation\\.com",
"target": "^https?://www\\.thenation\\.com/",
"minVersion": "1.0",
"maxVersion": "",
"priority": 100,
@@ -2,7 +2,7 @@
"translatorID": "d3b1d34c-f8a1-43bb-9dd6-27aa6403b217",
"label": "YouTube",
"creator": "Sean Takats, Michael Berkowitz, Matt Burton and Rintze Zelle",
"target": "https?://[^/]*youtube\\.com\\/",
"target": "^https?://([^/]+\\.)?youtube\\.com\\/",
"minVersion": "3.0",
"maxVersion": "",
"priority": 100,

0 comments on commit c99f87f

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