Skip to content

Commit

Permalink
https://github.com/ubtue/DatenProbleme/issues/1197
Browse files Browse the repository at this point in the history
  • Loading branch information
socheres committed Dec 4, 2020
1 parent 23ed77f commit 10560af
Showing 1 changed file with 88 additions and 1 deletion.
89 changes: 88 additions & 1 deletion SAGE Journals.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2020-12-03 10:32:23"
"lastUpdated": "2020-12-04 14:05:29"
}

/*
Expand Down Expand Up @@ -168,6 +168,10 @@ function scrape(doc, url) {
}
}
}
//ubtue: add tag "Book Review" in every issue 5 of specific journals if the dc.Type is "others"
let reviewType = ZU.xpathText(doc, '//meta[@name="dc.Type"]/@content');
if (reviewType && reviewType.match(/other/i) && item.issue === '5' && item.ISSN === '0142-064X' || item.ISSN === '0309-0892') item.tags.push('Book Review') && item.notes.push({note: "Booklist:" + item.date.match(/\d{4}$/)});

// Workaround while Sage hopefully fixes RIS for authors
for (let i = 0; i < item.creators.length; i++) {
if (!item.creators[i].firstName) {
Expand Down Expand Up @@ -693,6 +697,89 @@ var testCases = [
"seeAlso": []
}
]
},
{
"type": "web",
"url": "https://journals.sagepub.com/doi/full/10.1177/0142064X20928711",
"items": [
{
"itemType": "journalArticle",
"title": "1. New Testament General",
"creators": [],
"date": "August 1, 2020",
"DOI": "10.1177/0142064X20928711",
"ISSN": "0142-064X",
"abstractNote": ", , ,",
"issue": "5",
"journalAbbreviation": "Journal for the Study of the New Testament",
"language": "en",
"libraryCatalog": "SAGE Journals",
"pages": "1-3",
"publicationTitle": "Journal for the Study of the New Testament",
"url": "https://doi.org/10.1177/0142064X20928711",
"volume": "42",
"attachments": [
{
"title": "SAGE PDF Full Text",
"mimeType": "application/pdf"
}
],
"tags": [
{
"tag": "Book Review"
}
],
"notes": [
{
"note": "<p>doi: 10.1177/0142064X20928711</p>"
}
],
"seeAlso": []
}
]
},
{
"type": "web",
"url": "https://journals.sagepub.com/doi/full/10.1177/0142064X20928711",
"items": [
{
"itemType": "journalArticle",
"title": "1. New Testament General",
"creators": [],
"date": "August 1, 2020",
"DOI": "10.1177/0142064X20928711",
"ISSN": "0142-064X",
"abstractNote": ", , ,",
"issue": "5",
"journalAbbreviation": "Journal for the Study of the New Testament",
"language": "en",
"libraryCatalog": "SAGE Journals",
"pages": "1-3",
"publicationTitle": "Journal for the Study of the New Testament",
"url": "https://doi.org/10.1177/0142064X20928711",
"volume": "42",
"attachments": [
{
"title": "SAGE PDF Full Text",
"mimeType": "application/pdf"
}
],
"tags": [
{
"tag": "Book Review"
}
],
"notes": [
{
"note": "<p>doi: 10.1177/0142064X20928711</p>"
},
{
"note": "Booklist:2020"
}
],
"seeAlso": []
}
]
}
]
/** END TEST CASES **/

0 comments on commit 10560af

Please sign in to comment.