update
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"translatorID": "f3f092bf-ae09-4be6-8855-a22ddd817925",
|
||||
"translatorType": 4,
|
||||
"label": "ACM Digital Library",
|
||||
"creator": "Guy Aglionby",
|
||||
"target": "^https://dl\\.acm\\.org/(doi|do|profile|toc|topic|keyword|action/doSearch|acmbooks|browse)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"maxVersion": null,
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2024-07-30 05:19:59"
|
||||
"lastUpdated": "2026-01-07 17:55:00"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -35,6 +35,10 @@
|
||||
*/
|
||||
|
||||
function detectWeb(doc, url) {
|
||||
if (doc.querySelector('div[aria-label="Export citations (Premium feature)"] > [inert]')) {
|
||||
// Frontend doesn't want us to export citations - honor that
|
||||
return false;
|
||||
}
|
||||
if (isContentUrl(url)) {
|
||||
let subtypeMatch = getItemSubtype(doc);
|
||||
if (!subtypeMatch) {
|
||||
@@ -58,7 +62,7 @@ function detectWeb(doc, url) {
|
||||
return 'computerProgram';
|
||||
}
|
||||
else if (subtype == 'dataset') {
|
||||
return 'document';
|
||||
return 'dataset';
|
||||
}
|
||||
else if (subtype == 'book') {
|
||||
let bookTypeRegex = /page:string:([\w ]+)/;
|
||||
@@ -79,16 +83,16 @@ function detectWeb(doc, url) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function doWeb(doc, url) {
|
||||
async function doWeb(doc, url) {
|
||||
if (detectWeb(doc, url) == 'multiple') {
|
||||
Zotero.selectItems(getSearchResults(doc), function (selected) {
|
||||
if (selected) {
|
||||
ZU.processDocuments(Object.keys(selected), scrape);
|
||||
}
|
||||
});
|
||||
let results = await Zotero.selectItems(getSearchResults(doc));
|
||||
if (!results) return;
|
||||
for (let url of Object.keys(results)) {
|
||||
await scrape(await requestDocument(url));
|
||||
}
|
||||
}
|
||||
else {
|
||||
scrape(doc);
|
||||
await scrape(doc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +109,7 @@ function isContentUrl(url) {
|
||||
function getSearchResults(doc, checkOnly) {
|
||||
let items = {};
|
||||
let found = false;
|
||||
let results = doc.querySelectorAll('h5.issue-item__title a');
|
||||
let results = doc.querySelectorAll('.issue-item__title a');
|
||||
|
||||
for (let i = 0; i < results.length; i++) {
|
||||
let url = results[i].href;
|
||||
@@ -128,110 +132,104 @@ function getSearchResults(doc, checkOnly) {
|
||||
return found ? items : false;
|
||||
}
|
||||
|
||||
function scrape(doc) {
|
||||
let doi = attr(doc, 'input[name=doiVal]', 'value');
|
||||
async function scrape(doc) {
|
||||
let doi = doc.location.pathname.match(/\/doi\/(?:[^/]+\/)?(10\.[^/]+\/[^/]+)/)[1];
|
||||
let lookupEndpoint = 'https://dl.acm.org/action/exportCiteProcCitation';
|
||||
let postBody = 'targetFile=custom-bibtex&format=bibTex&dois=' + encodeURIComponent(doi);
|
||||
|
||||
ZU.doPost(lookupEndpoint, postBody, function (returnedText) {
|
||||
let json = JSON.parse(returnedText);
|
||||
let cslItem = json.items[0][doi];
|
||||
cslItem.type = cslItem.type.toLowerCase().replace('_', '-');
|
||||
|
||||
// Some pages use ARTICLE rather than ARTICLE_JOURNAL
|
||||
// https://github.com/zotero/translators/issues/2162
|
||||
if (cslItem.type == 'article') {
|
||||
cslItem.type = 'article-journal';
|
||||
}
|
||||
else if (cslItem.type == 'thesis') {
|
||||
// The advisor is indicated as an editor in CSL which
|
||||
// ZU.itemFromCSLJSON incorrectly extracts as an author.
|
||||
delete cslItem.editor;
|
||||
// The (co-)chair(s) or supervisor(s) are included in CSL as additional authors.
|
||||
cslItem.author.splice(1);
|
||||
}
|
||||
|
||||
if (cslItem.source && (cslItem.source.includes('19') || cslItem.source.includes('20'))) {
|
||||
// Issue date sometimes goes in source (libraryCatalog)
|
||||
delete cslItem.source;
|
||||
}
|
||||
|
||||
let item = new Zotero.Item();
|
||||
ZU.itemFromCSLJSON(item, cslItem);
|
||||
|
||||
item.title = ZU.unescapeHTML(item.title);
|
||||
|
||||
let abstractElements = doc.querySelectorAll('div.article__abstract p, div.abstractSection p');
|
||||
let abstract = Array.from(abstractElements).map(x => x.textContent).join('\n\n');
|
||||
if (abstract.length && abstract.toLowerCase() != 'no abstract available.') {
|
||||
item.abstractNote = ZU.trimInternal(abstract);
|
||||
}
|
||||
|
||||
let pdfElement = doc.querySelector('a[title="View PDF"]');
|
||||
if (pdfElement) {
|
||||
item.attachments.push({
|
||||
url: pdfElement.href,
|
||||
title: 'Full Text PDF',
|
||||
mimeType: 'application/pdf'
|
||||
});
|
||||
if (item.DOI) {
|
||||
item.url = 'https://dl.acm.org/doi/' + ZU.cleanDOI(item.DOI);
|
||||
}
|
||||
}
|
||||
|
||||
if (item.itemType == 'journalArticle') {
|
||||
// Publication name in the CSL is shortened; scrape from page to get full title.
|
||||
let expandedTitle = text(doc, 'span.epub-section__title');
|
||||
if (expandedTitle) {
|
||||
item.journalAbbreviation = item.publicationTitle;
|
||||
item.publicationTitle = expandedTitle;
|
||||
}
|
||||
// Article number 46 --> pages = 46:1–46:22
|
||||
if (cslItem.number) {
|
||||
let number = cslItem.number.replace("Article", "").trim();
|
||||
if (item.pages) {
|
||||
item.pages = item.pages.split("–").map(x => number + ":" + x).join("–");
|
||||
}
|
||||
else {
|
||||
item.pages = number;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!item.creators.length) {
|
||||
// There are cases where authors are not included in the CSL
|
||||
// (for example, a chapter of a book) so we must scrape them.
|
||||
// e.g. https://dl.acm.org/doi/abs/10.5555/3336323.C5474411
|
||||
let authorElements = doc.querySelectorAll('div.citation span.loa__author-name');
|
||||
authorElements.forEach(function (element) {
|
||||
item.creators.push(ZU.cleanAuthor(element.textContent, 'author'));
|
||||
});
|
||||
}
|
||||
|
||||
if (!item.ISBN && cslItem.ISBN) {
|
||||
let isbnLength = cslItem.ISBN.replace('-', '').length;
|
||||
let isbnText = 'ISBN-' + isbnLength + ': ' + cslItem.ISBN;
|
||||
item.extra = item.extra ? item.extra + '\n' + isbnText : isbnText;
|
||||
}
|
||||
|
||||
let numPages = text(doc, 'div.pages-info span');
|
||||
if (numPages && !item.numPages) {
|
||||
item.numPages = numPages;
|
||||
}
|
||||
|
||||
let tagElements = doc.querySelectorAll('div.tags-widget a');
|
||||
tagElements.forEach(function (tag) {
|
||||
item.tags.push(tag.textContent);
|
||||
});
|
||||
|
||||
if (getItemSubtype(doc) == 'dataset') {
|
||||
item.extra = item.extra ? item.extra + '\nitemType: data' : 'itemType: data';
|
||||
}
|
||||
|
||||
delete item.callNumber;
|
||||
|
||||
item.complete();
|
||||
let json = await requestJSON(lookupEndpoint, {
|
||||
method: 'POST',
|
||||
body: postBody,
|
||||
});
|
||||
let cslItem = json.items[0][doi];
|
||||
cslItem.type = cslItem.type.toLowerCase().replace('_', '-');
|
||||
|
||||
// Some pages use ARTICLE rather than ARTICLE_JOURNAL
|
||||
// https://github.com/zotero/translators/issues/2162
|
||||
if (cslItem.type == 'article') {
|
||||
cslItem.type = 'article-journal';
|
||||
}
|
||||
else if (cslItem.type == 'thesis') {
|
||||
// The advisor is indicated as an editor in CSL which
|
||||
// ZU.itemFromCSLJSON incorrectly extracts as an author.
|
||||
delete cslItem.editor;
|
||||
// The (co-)chair(s) or supervisor(s) are included in CSL as additional authors.
|
||||
cslItem.author.splice(1);
|
||||
}
|
||||
|
||||
if (cslItem.source && (cslItem.source.includes('19') || cslItem.source.includes('20'))) {
|
||||
// Issue date sometimes goes in source (libraryCatalog)
|
||||
delete cslItem.source;
|
||||
}
|
||||
|
||||
let item = new Zotero.Item();
|
||||
ZU.itemFromCSLJSON(item, cslItem);
|
||||
|
||||
item.title = ZU.unescapeHTML(item.title);
|
||||
|
||||
let abstractElements = doc.querySelectorAll('div.article__abstract p, div.abstractSection p');
|
||||
let abstract = Array.from(abstractElements).map(x => x.textContent).join('\n\n');
|
||||
if (abstract.length && abstract.toLowerCase() != 'no abstract available.') {
|
||||
item.abstractNote = ZU.trimInternal(abstract);
|
||||
}
|
||||
|
||||
if (doc.location.pathname.includes('pdf') || doc.querySelector('#downloadPdfUrl')) {
|
||||
item.attachments.push({
|
||||
url: `https://dl.acm.org/doi/pdf/${doi}?download=true`,
|
||||
title: 'Full Text PDF',
|
||||
mimeType: 'application/pdf'
|
||||
});
|
||||
item.url = 'https://dl.acm.org/doi/' + ZU.cleanDOI(doi);
|
||||
}
|
||||
|
||||
if (item.itemType == 'journalArticle') {
|
||||
// Publication name in the CSL is shortened; scrape from page to get full title.
|
||||
let expandedTitle = text(doc, 'span.epub-section__title');
|
||||
if (expandedTitle) {
|
||||
item.journalAbbreviation = item.publicationTitle;
|
||||
item.publicationTitle = expandedTitle;
|
||||
}
|
||||
// Article number 46 --> pages = 46:1–46:22
|
||||
if (cslItem.number) {
|
||||
let number = cslItem.number.replace("Article", "").trim();
|
||||
if (item.pages) {
|
||||
item.pages = item.pages.split("–").map(x => number + ":" + x).join("–");
|
||||
}
|
||||
else {
|
||||
item.pages = number;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!item.creators.length) {
|
||||
// There are cases where authors are not included in the CSL
|
||||
// (for example, a chapter of a book) so we must scrape them.
|
||||
// e.g. https://dl.acm.org/doi/abs/10.5555/3336323.C5474411
|
||||
let authorElements = doc.querySelectorAll('div.citation span.loa__author-name');
|
||||
authorElements.forEach(function (element) {
|
||||
item.creators.push(ZU.cleanAuthor(element.textContent, 'author'));
|
||||
});
|
||||
}
|
||||
|
||||
if (!item.ISBN && cslItem.ISBN) {
|
||||
let isbnLength = cslItem.ISBN.replace('-', '').length;
|
||||
let isbnText = 'ISBN-' + isbnLength + ': ' + cslItem.ISBN;
|
||||
item.extra = item.extra ? item.extra + '\n' + isbnText : isbnText;
|
||||
}
|
||||
|
||||
let numPages = text(doc, 'div.pages-info span');
|
||||
if (numPages && !item.numPages) {
|
||||
item.numPages = numPages;
|
||||
}
|
||||
|
||||
let tagElements = doc.querySelectorAll('div.tags-widget a');
|
||||
tagElements.forEach(function (tag) {
|
||||
item.tags.push(tag.textContent);
|
||||
});
|
||||
|
||||
delete item.callNumber;
|
||||
|
||||
item.complete();
|
||||
}
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"translatorID": "3dcbb947-f7e3-4bbd-a4e5-717f3701d624",
|
||||
"translatorType": 4,
|
||||
"label": "HeinOnline",
|
||||
"creator": "Frank Bennett",
|
||||
"target": "^https?://(www\\.)?heinonline\\.org/HOL/(LuceneSearch|Page|IFLPMetaData|AuthorProfile)\\?",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"maxVersion": null,
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2025-06-20 17:11:32"
|
||||
"lastUpdated": "2026-01-09 20:40:00"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -113,8 +113,22 @@ async function scrapePage(doc, url) {
|
||||
// Check for an RIS popup link in the page.
|
||||
var risLink = doc.querySelector('a[href*="CitationFile?kind=ris"]');
|
||||
if (risLink) {
|
||||
let risURL = risLink.href;
|
||||
let ris = await requestText(risURL);
|
||||
let risURL = new URL(risLink.href);
|
||||
let docURLSearchParams = new URLSearchParams(doc.location.search);
|
||||
|
||||
// Work around id and div parameters being swapped(?) in the link URL
|
||||
// embedded in the page's static HTML
|
||||
if (risURL.searchParams.has('div')
|
||||
&& docURLSearchParams.has('div')
|
||||
&& risURL.searchParams.get('div') !== docURLSearchParams.get('div')
|
||||
&& risURL.searchParams.get('id') === docURLSearchParams.get('div')) {
|
||||
let id = risURL.searchParams.get('id');
|
||||
let div = risURL.searchParams.get('div');
|
||||
risURL.searchParams.set('id', div);
|
||||
risURL.searchParams.set('div', id);
|
||||
}
|
||||
|
||||
let ris = await requestText(risURL.toString());
|
||||
|
||||
let pdfURL = null;
|
||||
// the PDF URL gives us a page that will refresh itself to the PDF.
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"translatorID": "ce7a3727-d184-407f-ac12-52837f3361ff",
|
||||
"translatorType": 4,
|
||||
"label": "NYTimes.com",
|
||||
"creator": "Philipp Zumstein",
|
||||
"target": "^https?://(query\\.nytimes\\.com/(search|gst)/|(select\\.|www\\.|mobile\\.|[^\\/.]*\\.blogs\\.)?nytimes\\.com/)",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"maxVersion": null,
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2021-01-22 19:34:13"
|
||||
"lastUpdated": "2026-01-20 19:20:00"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -91,17 +91,32 @@ function scrape(doc, url) {
|
||||
item.publicationTitle = "The New York Times";
|
||||
item.ISSN = "0362-4331";
|
||||
}
|
||||
// Multiple authors are (sometimes) just put into the same Metadata field
|
||||
var authors = attr(doc, 'meta[name="author"]', 'content') || attr(doc, 'meta[name="byl"]', 'content') || text(doc, '*[class^="Byline-bylineAuthor--"]');
|
||||
if (authors && item.creators.length <= 1) {
|
||||
authors = authors.replace(/^By /, '');
|
||||
if (authors == authors.toUpperCase()) { // convert to title case if all caps
|
||||
authors = ZU.capitalizeTitle(authors, true);
|
||||
}
|
||||
let authorsArray = doc.querySelectorAll('[class*="byline"] [itemprop="name"], [class*="byline"][itemprop="name"]');
|
||||
if (authorsArray.length) {
|
||||
item.creators = [];
|
||||
var authorsList = authors.split(/,|\band\b/);
|
||||
for (let i = 0; i < authorsList.length; i++) {
|
||||
item.creators.push(ZU.cleanAuthor(authorsList[i], "author"));
|
||||
for (let authorElem of authorsArray) {
|
||||
let author = authorElem.textContent;
|
||||
if (author === author.toUpperCase()) {
|
||||
author = ZU.capitalizeName(author);
|
||||
}
|
||||
item.creators.push(ZU.cleanAuthor(author, 'author'));
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Multiple authors are (sometimes) just put into the same Metadata field
|
||||
let authors = attr(doc, 'meta[name="author"]', 'content')
|
||||
|| attr(doc, 'meta[name="byl"]', 'content')
|
||||
|| text(doc, '*[class^="Byline-bylineAuthor--"]');
|
||||
if (authors) {
|
||||
authors = authors.replace(/^By /, '');
|
||||
if (authors == authors.toUpperCase()) { // convert to title case if all caps
|
||||
authors = ZU.capitalizeTitle(authors, true);
|
||||
}
|
||||
item.creators = [];
|
||||
var authorsList = authors.split(/,|\band\b/);
|
||||
for (let i = 0; i < authorsList.length; i++) {
|
||||
item.creators.push(ZU.cleanAuthor(authorsList[i], "author"));
|
||||
}
|
||||
}
|
||||
}
|
||||
item.url = ZU.xpathText(doc, '//link[@rel="canonical"]/@href') || url;
|
||||
@@ -317,7 +332,7 @@ var testCases = [
|
||||
"abstractNote": "At their core, are America’s problems primarily economic or moral?",
|
||||
"blogTitle": "Opinionator",
|
||||
"language": "en-US",
|
||||
"url": "https://opinionator.blogs.nytimes.com/2013/06/19/our-broken-social-contract/",
|
||||
"url": "https://archive.nytimes.com/opinionator.blogs.nytimes.com/2013/06/19/our-broken-social-contract/",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
@@ -477,7 +492,7 @@ var testCases = [
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "Draft Deferment Scored at Rutgers",
|
||||
"title": "DRAFT DEFERMENT SCORED AT RUTGERS",
|
||||
"creators": [],
|
||||
"date": "1966-09-12",
|
||||
"ISSN": "0362-4331",
|
||||
@@ -498,10 +513,10 @@ var testCases = [
|
||||
"tag": "Colleges and Universities"
|
||||
},
|
||||
{
|
||||
"tag": "Draft and Mobilization of Troops"
|
||||
"tag": "DRAFT AND MOBILIZATION OF TROOPS"
|
||||
},
|
||||
{
|
||||
"tag": "Miscellaneous Section"
|
||||
"tag": "MISCELLANEOUS SECTION"
|
||||
},
|
||||
{
|
||||
"tag": "United States"
|
||||
@@ -557,7 +572,7 @@ var testCases = [
|
||||
"tag": "Howe, Irving"
|
||||
},
|
||||
{
|
||||
"tag": "Intellectuals"
|
||||
"tag": "INTELLECTUALS"
|
||||
},
|
||||
{
|
||||
"tag": "Kristol, Irving"
|
||||
@@ -662,12 +677,6 @@ var testCases = [
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Anti-Semitism"
|
||||
},
|
||||
{
|
||||
"tag": "Fringe Groups and Movements"
|
||||
},
|
||||
{
|
||||
"tag": "Harvard University"
|
||||
},
|
||||
@@ -729,9 +738,6 @@ var testCases = [
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "#MeToo Movement"
|
||||
},
|
||||
{
|
||||
"tag": "Besh, John (1968- )"
|
||||
},
|
||||
@@ -774,12 +780,6 @@ var testCases = [
|
||||
{
|
||||
"tag": "Rose, Charlie"
|
||||
},
|
||||
{
|
||||
"tag": "Sex Crimes"
|
||||
},
|
||||
{
|
||||
"tag": "Sexual Harassment"
|
||||
},
|
||||
{
|
||||
"tag": "Simmons, Russell"
|
||||
},
|
||||
@@ -839,9 +839,6 @@ var testCases = [
|
||||
{
|
||||
"tag": "Politics and Government"
|
||||
},
|
||||
{
|
||||
"tag": "Terrorism"
|
||||
},
|
||||
{
|
||||
"tag": "Vandalism"
|
||||
},
|
||||
@@ -853,6 +850,98 @@ var testCases = [
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "web",
|
||||
"url": "https://www.nytimes.com/2025/12/07/us/politics/biden-immigration-trump.html",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "newspaperArticle",
|
||||
"title": "How Biden Ignored Warnings and Lost Americans’ Faith in Immigration",
|
||||
"creators": [
|
||||
{
|
||||
"firstName": "Christopher",
|
||||
"lastName": "Flavelle",
|
||||
"creatorType": "author"
|
||||
}
|
||||
],
|
||||
"date": "2025-12-07",
|
||||
"ISSN": "0362-4331",
|
||||
"abstractNote": "The Democratic president and his top advisers rejected recommendations that could have eased the border crisis that helped return Donald Trump to the White House.",
|
||||
"language": "en-US",
|
||||
"libraryCatalog": "NYTimes.com",
|
||||
"publicationTitle": "The New York Times",
|
||||
"section": "U.S.",
|
||||
"url": "https://www.nytimes.com/2025/12/07/us/politics/biden-immigration-trump.html",
|
||||
"attachments": [
|
||||
{
|
||||
"title": "Snapshot",
|
||||
"mimeType": "text/html"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Abbott, Gregory W (1957- )"
|
||||
},
|
||||
{
|
||||
"tag": "Asylum, Right of"
|
||||
},
|
||||
{
|
||||
"tag": "Biden, Joseph R Jr"
|
||||
},
|
||||
{
|
||||
"tag": "Border Patrol (US)"
|
||||
},
|
||||
{
|
||||
"tag": "Denver (Colo)"
|
||||
},
|
||||
{
|
||||
"tag": "Deportation"
|
||||
},
|
||||
{
|
||||
"tag": "Harris, Kamala D"
|
||||
},
|
||||
{
|
||||
"tag": "Homeland Security Department"
|
||||
},
|
||||
{
|
||||
"tag": "Illegal Immigration"
|
||||
},
|
||||
{
|
||||
"tag": "Immigration Detention"
|
||||
},
|
||||
{
|
||||
"tag": "Immigration and Customs Enforcement (US)"
|
||||
},
|
||||
{
|
||||
"tag": "Immigration and Emigration"
|
||||
},
|
||||
{
|
||||
"tag": "Johnston, Michael (1974- )"
|
||||
},
|
||||
{
|
||||
"tag": "Murphy, Christopher Scott"
|
||||
},
|
||||
{
|
||||
"tag": "Polls and Public Opinion"
|
||||
},
|
||||
{
|
||||
"tag": "Presidential Election of 2024"
|
||||
},
|
||||
{
|
||||
"tag": "Texas"
|
||||
},
|
||||
{
|
||||
"tag": "Trump, Donald J"
|
||||
},
|
||||
{
|
||||
"tag": "United States Politics and Government"
|
||||
}
|
||||
],
|
||||
"notes": [],
|
||||
"seeAlso": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
/** END TEST CASES **/
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,11 +1,13 @@
|
||||
{
|
||||
"translatorID": "32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7",
|
||||
"translatorType": 3,
|
||||
"label": "RIS",
|
||||
"creator": "Simon Kornblith and Aurimas Vinckevicius",
|
||||
"target": "ris",
|
||||
"minVersion": "3.0.4",
|
||||
"maxVersion": "",
|
||||
"maxVersion": null,
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"configOptions": {
|
||||
"async": true,
|
||||
"getCollections": "true"
|
||||
@@ -15,9 +17,7 @@
|
||||
"exportNotes": true,
|
||||
"exportFileData": false
|
||||
},
|
||||
"inRepository": true,
|
||||
"translatorType": 3,
|
||||
"lastUpdated": "2023-07-28 09:46:04"
|
||||
"lastUpdated": "2026-01-05 19:00:00"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1544,20 +1544,7 @@ function applyValue(item, zField, value, rawLine) {
|
||||
break;
|
||||
case 'DOI':
|
||||
value = ZU.cleanDOI(value);
|
||||
//add DOI to extra field,
|
||||
if (!ZU.fieldIsValidForType("DOI", item.itemType) && value) {
|
||||
if (item.extra) {
|
||||
if (!(/^DOI:/.test(item.extra))) {
|
||||
item.extra += '\nDOI: ' + value;
|
||||
}
|
||||
}
|
||||
else {
|
||||
item.extra = 'DOI: ' + value;
|
||||
}
|
||||
}
|
||||
else {
|
||||
item[zField] = value;
|
||||
}
|
||||
item[zField] = value;
|
||||
break;
|
||||
default:
|
||||
//check if value already exists. Don't overwrite existing values
|
||||
@@ -2197,7 +2184,6 @@ var exports = {
|
||||
options: exportedOptions
|
||||
};
|
||||
|
||||
|
||||
/** BEGIN TEST CASES **/
|
||||
var testCases = [
|
||||
{
|
||||
@@ -2332,12 +2318,14 @@ var testCases = [
|
||||
}
|
||||
],
|
||||
"date": "0000 Year Date",
|
||||
"DOI": "10.1234/123456",
|
||||
"abstractNote": "Abstract",
|
||||
"archive": "Name of Database",
|
||||
"archiveLocation": "Accession Number",
|
||||
"extra": "DOI: 10.1234/123456\nPublication Number",
|
||||
"extra": "Publication Number",
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"place": "Place Published",
|
||||
"publisher": "Publisher",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
@@ -2396,6 +2384,7 @@ var testCases = [
|
||||
"extra": "Text Number",
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"place": "Place Published",
|
||||
"publisher": "Publisher",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
@@ -2494,6 +2483,7 @@ var testCases = [
|
||||
"extra": "Number",
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"place": "Place Published",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
"videoRecordingFormat": "Format",
|
||||
@@ -2821,7 +2811,9 @@ var testCases = [
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"pages": "Pages",
|
||||
"place": "Place Published",
|
||||
"publicationTitle": "Series Title",
|
||||
"publisher": "Publisher",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
"volume": "Volume",
|
||||
@@ -3320,7 +3312,10 @@ var testCases = [
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"pages": "Pages",
|
||||
"place": "Place Published",
|
||||
"publicationTitle": "Periodical Title",
|
||||
"publisher": "Publisher",
|
||||
"section": "E-Pub Date",
|
||||
"series": "Website Title",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
@@ -3567,6 +3562,7 @@ var testCases = [
|
||||
"extra": "Number",
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"place": "Place Published",
|
||||
"publisher": "Publisher",
|
||||
"url": "URL",
|
||||
"attachments": [],
|
||||
@@ -3662,6 +3658,7 @@ var testCases = [
|
||||
"genre": "Genre",
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"place": "Place Published",
|
||||
"runningTime": "Running Time",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
@@ -3724,7 +3721,10 @@ var testCases = [
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"pages": "Pages",
|
||||
"place": "Place Published",
|
||||
"publicationTitle": "Secondary Title",
|
||||
"publisher": "Publisher",
|
||||
"section": "Section",
|
||||
"series": "Tertiary Title",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
@@ -3830,7 +3830,10 @@ var testCases = [
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"pages": "Pages",
|
||||
"place": "Activity Location",
|
||||
"publicationTitle": "Periodical Title",
|
||||
"publisher": "Sponsoring Agency",
|
||||
"section": "Duration of Grant",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
"volume": "Amount Requested",
|
||||
@@ -3923,6 +3926,7 @@ var testCases = [
|
||||
"libraryCatalog": "Database Provider",
|
||||
"pages": "Pages",
|
||||
"publicationTitle": "Journal",
|
||||
"section": "Start Page",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
"volume": "Volume",
|
||||
@@ -4007,7 +4011,9 @@ var testCases = [
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"pages": "Pages",
|
||||
"place": "Place Published",
|
||||
"publicationTitle": "Magazine",
|
||||
"publisher": "Publisher",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
"volume": "Volume",
|
||||
@@ -4054,6 +4060,7 @@ var testCases = [
|
||||
"archiveLocation": "Accession Number",
|
||||
"callNumber": "Call Number",
|
||||
"extra": "Folio Number",
|
||||
"institution": "Library/Archive",
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"manuscriptType": "Type of Work",
|
||||
@@ -4217,9 +4224,11 @@ var testCases = [
|
||||
"pages": "Pages",
|
||||
"place": "Place Published",
|
||||
"publicationTitle": "Newspaper",
|
||||
"publisher": "Publisher",
|
||||
"section": "Section",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
"volume": "Volume",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
{
|
||||
@@ -4362,6 +4371,7 @@ var testCases = [
|
||||
"archiveLocation": "Accession Number",
|
||||
"callNumber": "Call Number",
|
||||
"extra": "Series Volume\nNumber of Pages",
|
||||
"institution": "Publisher",
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"manuscriptType": "Type of Work",
|
||||
@@ -4797,7 +4807,9 @@ var testCases = [
|
||||
"language": "Language",
|
||||
"libraryCatalog": "Database Provider",
|
||||
"pages": "Pages",
|
||||
"place": "Place Published",
|
||||
"publicationTitle": "Series Title",
|
||||
"publisher": "Institution",
|
||||
"series": "Department",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
@@ -4841,6 +4853,8 @@ var testCases = [
|
||||
"date": "0000 Year Last",
|
||||
"abstractNote": "Abstract",
|
||||
"language": "Language",
|
||||
"place": "Place Published",
|
||||
"publisher": "Publisher",
|
||||
"shortTitle": "Short Title",
|
||||
"url": "URL",
|
||||
"websiteTitle": "Periodical Title",
|
||||
@@ -5059,6 +5073,7 @@ var testCases = [
|
||||
"archiveLocation": "Address/Availability",
|
||||
"callNumber": "Call Number",
|
||||
"distributor": "Publisher Name",
|
||||
"place": "Place of Publication",
|
||||
"url": "Location/URL",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
@@ -5706,6 +5721,7 @@ var testCases = [
|
||||
],
|
||||
"date": "0000 Last",
|
||||
"abstractNote": "Abstract",
|
||||
"publisher": "Publisher Name",
|
||||
"url": "Location/URL",
|
||||
"websiteTitle": "Source",
|
||||
"attachments": [],
|
||||
@@ -5793,7 +5809,9 @@ var testCases = [
|
||||
"issue": "Issue ID",
|
||||
"journalAbbreviation": "Journal Title",
|
||||
"pages": "Location in Work",
|
||||
"place": "Place of Publication",
|
||||
"publicationTitle": "Monographic Title",
|
||||
"publisher": "Publisher Name",
|
||||
"series": "Series Title",
|
||||
"url": "Location/URL",
|
||||
"volume": "Volume ID",
|
||||
@@ -5872,7 +5890,9 @@ var testCases = [
|
||||
"callNumber": "Call Number",
|
||||
"issue": "Issue ID",
|
||||
"pages": "Page(s)",
|
||||
"place": "Place of Publication",
|
||||
"publicationTitle": "Magazine Title",
|
||||
"publisher": "Publisher Name",
|
||||
"url": "Location/URL",
|
||||
"volume": "Volume ID",
|
||||
"attachments": [],
|
||||
@@ -6082,7 +6102,9 @@ var testCases = [
|
||||
"callNumber": "Call Number",
|
||||
"issue": "Issue ID",
|
||||
"pages": "Extent of Work",
|
||||
"place": "Place of Publication",
|
||||
"publicationTitle": "Journal Title",
|
||||
"publisher": "Publisher Name",
|
||||
"url": "Location/URL",
|
||||
"volume": "Volume ID",
|
||||
"attachments": [],
|
||||
@@ -6427,6 +6449,7 @@ var testCases = [
|
||||
"archiveLocation": "Address/Availability",
|
||||
"callNumber": "Call Number",
|
||||
"extra": "Timing",
|
||||
"place": "Place of Publication",
|
||||
"url": "Location/URL",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
@@ -6483,6 +6506,7 @@ var testCases = [
|
||||
"pages": "Page(s)",
|
||||
"place": "Place of Publication",
|
||||
"publicationTitle": "Newspaper Name",
|
||||
"publisher": "Publisher Name",
|
||||
"url": "Location/URL",
|
||||
"attachments": [],
|
||||
"tags": [
|
||||
@@ -6786,6 +6810,8 @@ var testCases = [
|
||||
"archiveLocation": "Address/Availability",
|
||||
"callNumber": "Call Number",
|
||||
"issue": "Catalog Number",
|
||||
"place": "Place of Publication",
|
||||
"publisher": "Publisher Name",
|
||||
"url": "Location/URL",
|
||||
"volume": "Edition",
|
||||
"attachments": [],
|
||||
@@ -6985,7 +7011,7 @@ var testCases = [
|
||||
},
|
||||
{
|
||||
"type": "import",
|
||||
"input": "TY - JOUR\nT1 - From Basic to Applied Research to Improve Outcomes for Individuals Who Require Augmentative and Alternative Communication: \u2028Potential Contributions of Eye Tracking Research Methods\nAU - Light, Janice\nAU - McNaughton, David\nY1 - 2014/06/01\nPY - 2014\nDA - 2014/06/01\nN1 - doi: 10.3109/07434618.2014.906498\nDO - 10.3109/07434618.2014.906498\nT2 - Augmentative and Alternative Communication\nJF - Augmentative and Alternative Communication\nJO - Augment Altern Commun\nSP - 99\nEP - 105\nVL - 30\nIS - 2\nPB - Informa Allied Health\nSN - 0743-4618\nM3 - doi: 10.3109/07434618.2014.906498\nUR - http://dx.doi.org/10.3109/07434618.2014.906498\nY2 - 2014/12/17\nER -",
|
||||
"input": "TY - JOUR\nT1 - From Basic to Applied Research to Improve Outcomes for Individuals Who Require Augmentative and Alternative Communication:
Potential Contributions of Eye Tracking Research Methods\nAU - Light, Janice\nAU - McNaughton, David\nY1 - 2014/06/01\nPY - 2014\nDA - 2014/06/01\nN1 - doi: 10.3109/07434618.2014.906498\nDO - 10.3109/07434618.2014.906498\nT2 - Augmentative and Alternative Communication\nJF - Augmentative and Alternative Communication\nJO - Augment Altern Commun\nSP - 99\nEP - 105\nVL - 30\nIS - 2\nPB - Informa Allied Health\nSN - 0743-4618\nM3 - doi: 10.3109/07434618.2014.906498\nUR - http://dx.doi.org/10.3109/07434618.2014.906498\nY2 - 2014/12/17\nER -",
|
||||
"items": [
|
||||
{
|
||||
"itemType": "journalArticle",
|
||||
@@ -7009,6 +7035,7 @@ var testCases = [
|
||||
"journalAbbreviation": "Augment Altern Commun",
|
||||
"pages": "99-105",
|
||||
"publicationTitle": "Augmentative and Alternative Communication",
|
||||
"publisher": "Informa Allied Health",
|
||||
"url": "http://dx.doi.org/10.3109/07434618.2014.906498",
|
||||
"volume": "30",
|
||||
"attachments": [],
|
||||
@@ -7037,10 +7064,10 @@ var testCases = [
|
||||
}
|
||||
],
|
||||
"date": "2009",
|
||||
"DOI": "10.1007/978-3-642-00230-4",
|
||||
"ISBN": "9783642002304",
|
||||
"abstractNote": "In dem Buch befinden sich einzelne Beiträge zu ...",
|
||||
"callNumber": "300 QN 100 D419",
|
||||
"extra": "DOI: 10.1007/978-3-642-00230-4",
|
||||
"language": "ger",
|
||||
"libraryCatalog": "UB Mannheim",
|
||||
"place": "Berlin, Heidelberg",
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"translatorID": "4a3820a3-a7bd-44a1-8711-acf7b57d2c37",
|
||||
"translatorType": 4,
|
||||
"label": "Web of Science Nextgen",
|
||||
"creator": "Abe Jellinek",
|
||||
"target": "^https://(www\\.webofscience\\.com|webofscience\\.clarivate\\.cn)/",
|
||||
"minVersion": "3.0",
|
||||
"maxVersion": "",
|
||||
"maxVersion": null,
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"browserSupport": "gcsibv",
|
||||
"lastUpdated": "2025-08-18 17:12:57"
|
||||
"lastUpdated": "2026-01-05 17:50:00"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -74,7 +74,7 @@ async function getSearchResultsLazy(doc, url) {
|
||||
let [, qid, sortBy] = url.match(SEARCH_RE);
|
||||
Z.debug('Export params:');
|
||||
Z.debug({ qid, sortBy });
|
||||
let markFrom = parseInt(text(doc, 'app-records-list > app-record .mat-checkbox-label'));
|
||||
let markFrom = parseInt(text(doc, 'app-records-list > app-record .mdc-label'));
|
||||
if (isNaN(markFrom)) {
|
||||
markFrom = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user