Skip to content
Permalink
Browse files

@socheres new Dialnet changes (#1613)

 [Dialnet] Simplified double issue, add test case, remove tags
  • Loading branch information...
zuphilip authored and adam3smith committed May 7, 2018
1 parent dcde9ab commit 118cb216c9d4c9a14af74ddd08c2e00b3a34303e
Showing with 45 additions and 17 deletions.
  1. +45 −17 Dialnet.js
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2018-03-15 10:24:57"
"lastUpdated": "2018-03-28 21:36:40"
}

/*
@@ -91,6 +91,17 @@ function scrape(doc, url) {
if (item.abstractNote && item.abstractNote.includes(item.title) && item.abstractNote.length<item.title.length+30) {
delete item.abstractNote;
}
// in case of double issue e.g. "3-4" wrong issue number in Embedded Metadata e,g. "3"
// clean issue number in case of multiple download
var issue = ZU.xpathText(doc, '//*[@id="informacion"]//a[contains(text(), "Nº.")]');
if (issue) {
// e.g. Vol. 89, Nº. 3-4, 2012
item.issue = issue.split('Nº.')[1].split(',')[0];
}

// Delete generic keywords
if (item.tags);
delete item.tags;
item.complete();
});
translator.getTranslatorObject(function(trans) {
@@ -125,17 +136,6 @@ var testCases = [
"title": "Snapshot"
}
],
"tags": [
{
"tag": "Libres"
},
{
"tag": "Libro"
},
{
"tag": "buenos y justos como miembros de un mismo cuerpo: lecciones de teoría del derecho y de derecho natural"
}
],
"notes": [],
"seeAlso": []
}
@@ -179,11 +179,6 @@ var testCases = [
"title": "Snapshot"
}
],
"tags": [
"Ciencias sociales",
"Grupo D",
"Sociología. Población. Trabajo social"
],
"notes": [],
"seeAlso": []
}
@@ -198,6 +193,39 @@ var testCases = [
"type": "web",
"url": "https://dialnet.unirioja.es/ejemplar/381860",
"items": "multiple"
},
{
"type": "web",
"url": "https://dialnet.unirioja.es/servlet/articulo?codigo=4251373",
"items": [
{
"itemType": "journalArticle",
"title": "Secularisation as a challenge for a contemporary order theology International Theological Symposium as part of the research project \"Transmission of Faith in social and Religious Transformation Processes\".",
"creators": [
{
"firstName": "Ulrich",
"lastName": "Engel",
"creatorType": "author"
}
],
"date": "2012",
"ISSN": "1123-5772",
"issue": "3-4",
"language": "mul",
"libraryCatalog": "dialnet.unirioja.es",
"pages": "659-666",
"publicationTitle": "Angelicum",
"url": "https://dialnet.unirioja.es/servlet/articulo?codigo=4251373",
"volume": "89",
"attachments": [
{
"title": "Snapshot"
}
],
"notes": [],
"seeAlso": []
}
]
}
]
/** END TEST CASES **/

0 comments on commit 118cb21

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