", "") // divide results
+ .replace(/
|\r/g, "\n")
+ .replace(/vo (\d+)\n/, "VO $1\n") // Divide VO and IS to different line
+ .replace(/IS (\d+)\nvo/, "IS $1\nVO")// Uppercase VO
+ .replace(/IS 0(\d+)\n/g, "IS $1\n")// Remove leading 0
+ .replace(/VO 0(\d+)\n/g, "VO $1\n")
+ .replace(/\n+/g, "\n")
+ .replace(/\n([A-Z][A-Z1-9]\s)/g, "
$1")
+ .replace(/\n/g, "")
+ .replace(/
/g, "\n")
+ .replace(/(K1 .*[\u4e00-\u9fa5]) ([a-zA-Z])/g, "$1;$2")// cn keywwords and en keywords
+ .replace(/\t/g, "") // \t in abstract
+ .replace(
+ /^RT\s+Conference Proceeding/gim,
+ "RT Conference Proceedings"
+ )
+ .replace(/^RT\s+Dissertation\/Thesis/gim, "RT Dissertation")
+ .replace(/^(A[1-4]|U2)\s*([^\r\n]+)/gm, function (m, tag, authors) {
+ authors = authors.split(/\s*[;,,]\s*/); // that's a special comma
+ if (!authors[authors.length - 1].trim()) authors.pop();
+ return tag + " " + authors.join("\n" + tag + " ");
+ })
+ .replace(/LA 中文;?/g, "LA zh-CN")
+ .trim();
}
function getIDFromURL(url) {
@@ -96,7 +84,12 @@ function getIDFromURL(url) {
function getIDFromRef(doc, url) {
let database = attr(doc, '#paramdbname', 'value');
let filename = attr(doc, '#paramfilename', 'value');
- return { dbname: database, filename: filename, url: url };
+ if (database && filename) {
+ return { dbname: database, filename: filename, url: url };
+ }
+ else {
+ return false;
+ }
}
// Get dbname and filename from the link target on the "take note" button in
@@ -107,7 +100,7 @@ function getIDFromRef(doc, url) {
// required info. The note-taking button appears more stable across the CNKI
// domains.
function getIDFromNoteTakerLink(doc, url) {
- const noteURLString = doc.querySelector("li.btn-note a").href;
+ const noteURLString = attr(doc, "li.btn-note a", "href");
if (!noteURLString) return false;
const urlParams = new URLSearchParams(new URL(noteURLString).search);
@@ -119,6 +112,17 @@ function getIDFromNoteTakerLink(doc, url) {
return { dbname: dbnameValue, filename: filenameValue, url: url };
}
+function getIDFromSearchRow(row) {
+ var dbcode = attr(row, "a.icon-collect", "data-dbname");
+ var filename = attr(row, "a.icon-collect", "data-filename");
+ if (dbcode && filename) {
+ return { dbcode: dbcode, dbname: dbcode, filename: filename };
+ }
+ else {
+ return false;
+ }
+}
+
function getIDFromPage(doc, url) {
return getIDFromURL(url)
|| getIDFromRef(doc, url)
@@ -130,14 +134,21 @@ function getTypeFromDBName(dbname) {
CJFQ: "journalArticle",
CJFD: "journalArticle",
CAPJ: "journalArticle",
+ SJES: "journalArticle",
+ SJPD: "journalArticle",
+ SSJD: "journalArticle",
CCJD: "journalArticle",
+ CDMD: "journalArticle",
+ CYFD: "journalArticle",
CDFD: "thesis",
CMFD: "thesis",
CLKM: "thesis",
CCND: "newspaperArticle",
CPFD: "conferencePaper",
+ IPFD: "conferencePaper",
+ SCPD: "patent"
};
- var db = dbname.substr(0, 4).toUpperCase();
+ var db = dbname.substring(0, 4).toUpperCase();
if (dbType[db]) {
return dbType[db];
}
@@ -161,7 +172,6 @@ function getItemsFromSearchResults(doc, url, itemInfo) {
links = ZU.xpath(doc, '//table[@class="GridTableContent"]/tbody/tr[./td[2]/a]');
aXpath = './td[2]/a';
}
-
if (!links.length) {
return false;
}
@@ -171,7 +181,7 @@ function getItemsFromSearchResults(doc, url, itemInfo) {
var a = ZU.xpath(links[i], aXpath)[0];
var title = ZU.xpathText(a, './node()[not(name()="SCRIPT")]', null, '');
if (title) title = ZU.trimInternal(title);
- var id = getIDFromURL(a.href);
+ var id = getIDFromURL(a.href) || getIDFromSearchRow(links[i]);
// pre-released item can not get ID from URL, try to get ID from element.value
if (!id) {
var td1 = ZU.xpath(links[i], './td')[0];
@@ -191,6 +201,10 @@ function detectWeb(doc, url) {
// Z.debug(doc);
var id = getIDFromPage(doc, url);
var items = getItemsFromSearchResults(doc, url);
+ var searchResult = doc.querySelector("#ModuleSearchResult");
+ if (searchResult) {
+ Z.monitorDOMChanges(searchResult, { childList: true, subtree: true });
+ }
if (id) {
return getTypeFromDBName(id.dbname);
}
@@ -202,99 +216,96 @@ function detectWeb(doc, url) {
}
}
-function doWeb(doc, url) {
+async function doWeb(doc, url) {
if (detectWeb(doc, url) == "multiple") {
var itemInfo = {};
var items = getItemsFromSearchResults(doc, url, itemInfo);
- Z.selectItems(items, function (selectedItems) {
- if (!selectedItems) return;
-
- var itemInfoByTitle = {};
- var ids = [];
- for (var url in selectedItems) {
- ids.push(itemInfo[url].id);
- itemInfoByTitle[selectedItems[url]] = itemInfo[url];
- itemInfoByTitle[selectedItems[url]].url = url;
+ let selectItems = await Z.selectItems(items);
+ if (selectItems) {
+ for (let url in selectItems) {
+ await scrape(itemInfo[url].id, doc, { url: url });
}
- scrape(ids, doc, url, itemInfoByTitle);
- });
+ }
}
else {
- scrape([getIDFromPage(doc, url)], doc, url);
+ await scrape(getIDFromPage(doc, url), doc);
}
}
-function scrape(ids, doc, url, itemInfo) {
- getRefWorksByID(ids, function (text) {
- var translator = Z.loadTranslator('import');
- translator.setTranslator('1a3506da-a303-4b0a-a1cd-f216e6138d86'); // RefWorks Tagged
- text = text.replace(/IS (\d+)\nvo/, "IS $1\nVO");
- translator.setString(text);
-
- translator.setHandler('itemDone', function (obj, newItem) {
- // split names
- for (var i = 0, n = newItem.creators.length; i < n; i++) {
- var creator = newItem.creators[i];
- if (creator.firstName) continue;
-
- var lastSpace = creator.lastName.lastIndexOf(' ');
- var lastMiddleDot = creator.lastName.lastIndexOf('·');
- if (creator.lastName.search(/[A-Za-z]/) !== -1 && lastSpace !== -1) {
- // western name. split on last space
- creator.firstName = creator.lastName.substr(0, lastSpace);
- creator.lastName = creator.lastName.substr(lastSpace + 1);
- }
- else if (lastMiddleDot !== -1) {
- // translated western name with · as separator
- creator.firstName = creator.lastName.substr(0, lastMiddleDot);
- creator.lastName = creator.lastName.substr(lastMiddleDot + 1);
- }
- else {
- // Chinese name. first character is last name, the rest are first name
- creator.firstName = creator.lastName.substr(1);
- creator.lastName = creator.lastName.charAt(0);
- }
- }
-
- if (newItem.abstractNote) {
- newItem.abstractNote = newItem.abstractNote.replace(/\s*[\r\n]\s*/g, '\n');
+async function scrape(id, doc, extraData) {
+ var { dbname, filename } = id;
+ var postData = `FileName=${dbname}!${filename}!1!0&DisplayMode=Refworks&OrderParam=0&OrderType=desc&SelectField=&PageIndex=1&PageSize=20&language=&uniplatform=NZKPT&random=0.30585230060685187`;
+ var refer = `https://kns.cnki.net/dm/manage/export.html?filename=${dbname}!${filename}!1!0&displaymode=NEW&uniplatform=NZKPT`;
+ var reftext = await request(
+ 'https://kns.cnki.net/dm/api/ShowExport',
+ {
+ method: "POST",
+ body: postData,
+ headers: {
+ Referer: refer
}
+ }
+ );
+ var translator = Z.loadTranslator('import');
+ translator.setTranslator('1a3506da-a303-4b0a-a1cd-f216e6138d86'); // RefWorks Tagged
+ translator.setString(toStdRef(reftext));
+
+ translator.setHandler('itemDone', function (obj, newItem) {
+ // split names
+ for (var i = 0, n = newItem.creators.length; i < n; i++) {
+ var creator = newItem.creators[i];
+ if (creator.firstName) continue;
- // clean up tags. Remove numbers from end
- for (var j = 0, l = newItem.tags.length; j < l; j++) {
- newItem.tags[j] = newItem.tags[j].replace(/:\d+$/, '');
+ var lastSpace = creator.lastName.lastIndexOf(' ');
+ var lastMiddleDot = creator.lastName.lastIndexOf('·');
+ if (/[A-Za-z]/.test(creator.lastName) && lastSpace !== -1) {
+ // western name. split on last space
+ creator.firstName = creator.lastName.substring(0, lastSpace);
+ creator.lastName = creator.lastName.substring(lastSpace + 1);
}
-
- newItem.title = ZU.trimInternal(newItem.title);
- if (itemInfo) {
- var info = itemInfo[newItem.title];
- if (!info) {
- Z.debug('No item info for "' + newItem.title + '"');
- }
- else {
- newItem.url = info.url;
- }
+ else if (lastMiddleDot !== -1) {
+ // translated western name with · as separator
+ creator.firstName = creator.lastName.substring(0, lastMiddleDot);
+ creator.lastName = creator.lastName.substring(lastMiddleDot + 1);
}
else {
- newItem.url = url;
- }
-
- // CN 中国刊物编号,非refworks中的callNumber
- // CN in CNKI refworks format explains Chinese version of ISSN
- if (newItem.callNumber) {
- // newItem.extra = 'CN ' + newItem.callNumber;
- newItem.callNumber = "";
- }
- // don't download PDF/CAJ on searchResult(multiple)
- var webType = detectWeb(doc, url);
- if (webType && webType != 'multiple') {
- newItem.attachments = getAttachments(doc, newItem);
+ // Chinese name. first character is last name, the rest are first name
+ creator.firstName = creator.lastName.substring(1);
+ creator.lastName = creator.lastName.charAt(0);
}
- newItem.complete();
- });
+ }
+
+ if (newItem.abstractNote) {
+ newItem.abstractNote = newItem.abstractNote.replace(/\s*[\r\n]\s*/g, '\n');
+ }
+
+ // clean up tags. Remove numbers from end
+ for (var j = 0, l = newItem.tags.length; j < l; j++) {
+ newItem.tags[j] = newItem.tags[j].replace(/:\d+$/, '');
+ }
- translator.translate();
+ newItem.title = ZU.trimInternal(newItem.title);
+ if (extraData) {
+ newItem.url = extraData.url;
+ }
+ else {
+ newItem.url = id.url;
+ }
+
+ // CN 中国刊物编号,非refworks中的callNumber
+ // CN in CNKI refworks format explains Chinese version of ISSN
+ if (newItem.callNumber) {
+ // newItem.extra = 'CN ' + newItem.callNumber;
+ newItem.callNumber = "";
+ }
+ // don't download PDF/CAJ on searchResult(multiple)
+ var webType = detectWeb(doc, id.url);
+ if (webType && webType != 'multiple') {
+ newItem.attachments = getAttachments(doc, newItem);
+ }
+ newItem.complete();
});
+ translator.translate();
}
// get pdf download link
@@ -351,6 +362,7 @@ var testCases = [
{
"type": "web",
"url": "https://kns.cnki.net/KCMS/detail/detail.aspx?dbcode=CJFQ&dbname=CJFDLAST2015&filename=SPZZ201412003&v=MTU2MzMzcVRyV00xRnJDVVJMS2ZidVptRmkva1ZiL09OajNSZExHNEg5WE5yWTlGWjRSOGVYMUx1eFlTN0RoMVQ=",
+ "defer": true,
"items": [
{
"itemType": "journalArticle",
@@ -391,29 +403,19 @@ var testCases = [
"ISSN": "1000-8713",
"abstractNote": "来自中药的水溶性多糖具有广谱治疗和低毒性特点,是天然药物及保健品研发中的重要组成部分。针对中药多糖结构复杂、难以表征的问题,本文以中药黄芪中的多糖为研究对象,采用\"自下而上\"法完成对黄芪多糖的表征。首先使用部分酸水解方法水解黄芪多糖,分别考察了水解时间、酸浓度和温度的影响。在适宜条件(4 h、1.5mol/L三氟乙酸、80℃)下,黄芪多糖被水解为特征性的寡糖片段。接下来,采用亲水作用色谱与质谱联用对黄芪多糖部分酸水解产物进行分离和结构表征。结果表明,提取得到的黄芪多糖主要为1→4连接线性葡聚糖,水解得到聚合度4~11的葡寡糖。本研究对其他中药多糖的表征具有一定的示范作用。",
"issue": "12",
- "language": "中文;",
+ "language": "zh-CN",
"libraryCatalog": "CNKI",
"pages": "1306-1312",
"publicationTitle": "色谱",
"url": "https://kns.cnki.net/KCMS/detail/detail.aspx?dbcode=CJFQ&dbname=CJFDLAST2015&filename=SPZZ201412003&v=MTU2MzMzcVRyV00xRnJDVVJMS2ZidVptRmkva1ZiL09OajNSZExHNEg5WE5yWTlGWjRSOGVYMUx1eFlTN0RoMVQ=",
"volume": "32",
- "attachments": [],
- "tags": [
- {
- "tag": "Astragalus"
- },
- {
- "tag": "characterization"
- },
- {
- "tag": "hydrophilic interaction liquid chromatography(HILIC)mass spectrometry(MS)"
- },
+ "attachments": [
{
- "tag": "partial acid hydrolysis"
- },
- {
- "tag": "polysaccharides"
- },
+ "title": "Full Text PDF",
+ "mimeType": "application/pdf"
+ }
+ ],
+ "tags": [
{
"tag": "亲水作用色谱"
},
@@ -441,6 +443,7 @@ var testCases = [
{
"type": "web",
"url": "https://kns.cnki.net/KCMS/detail/detail.aspx?dbcode=CMFD&dbname=CMFD201701&filename=1017045605.nh&v=MDc3ODZPZVorVnZGQ3ZrV3JyT1ZGMjZHYk84RzlmTXFwRWJQSVI4ZVgxTHV4WVM3RGgxVDNxVHJXTTFGckNVUkw=",
+ "defer": true,
"items": [
{
"itemType": "thesis",
@@ -452,27 +455,15 @@ var testCases = [
"creatorType": "author"
}
],
- "date": "2015",
- "abstractNote": "黄瓜(Cucumis sativus L.)是我国最大的保护地栽培蔬菜作物,也是植物性别发育和维管束运输研究的重要模式植物。黄瓜基因组序列图谱已经构建完成,并且在此基础上又完成了全基因组SSR标记开发和涵盖330万个变异位点变异组图谱,成为黄瓜功能基因研究的重要平台和工具,相关转录组研究也有很多报道,不过共表达网络研究还是空白。本实验以温室型黄瓜9930为研究对象,选取10个不同组织,进行转录组测序,获得10份转录组原始数据。在对原始数据去除接头与低质量读段后,将高质量读段用Tophat2回贴到已经发表的栽培黄瓜基因组序列上。用Cufflinks对回贴后的数据计算FPKM值,获得10份组织的2...",
- "language": "中文;",
+ "date": "2017",
+ "abstractNote": "黄瓜(Cucumis sativus L.)是我国最大的保护地栽培蔬菜作物,也是植物性别发育和维管束运输研究的重要模式植物。黄瓜基因组序列图谱已经构建完成,并且在此基础上又完成了全基因组SSR标记开发和涵盖330万个变异位点变异组图谱,成为黄瓜功能基因研究的重要平台和工具,相关转录组研究也有很多报道,不过共表达网络研究还是空白。本实验以温室型黄瓜9930为研究对象,选取10个不同组织,进行转录组测序,获得10份转录组原始数据。在对原始数据去除接头与低质量读段后,将高质量读段用Tophat2回贴到已经发表的栽培黄瓜基因组序列上。用Cufflinks对回贴后的数据计算FPKM值,获得10份组织的24274基因的表达量数据。计算结果中的回贴率比较理想,不过有些基因的表达量过低。为了防止表达量低的基因对结果的影响,将10份组织中表达量最大小于5的基因去除,得到16924个基因,进行下一步分析。共表达网络的构建过程是将上步获得的表达量数据,利用R语言中WGCNA(weighted gene co-expression network analysis)包构建共表达网络。结果得到的共表达网络包括1134个模块。这些模块中的基因表达模式类似,可以认为是共表达关系。不过结果中一些模块内基因间相关性同其他模块相比比较低,在分析过程中,将模块中基因相关性平均值低于0.9的模块都去除,最终得到839个模块,一共11,844个基因。共表达的基因因其表达模式类似而聚在一起,这些基因可能与10份组织存在特异性关联。为了计算模块与组织间的相关性,首先要对每个模块进行主成分分析(principle component analysis,PCA),获得特征基因(module eigengene,ME),特征基因可以表示这个模块所有基因共有的表达趋势。通过计算特征基因与组织间的相关性,从而挑选出组织特异性模块,这些模块一共有323个。利用topGO功能富集分析的结果表明这些特异性模块所富集的功能与组织相关。共表达基因在染色体上的物理位置经常是成簇分布的。按照基因间隔小于25kb为标准。分别对839个模块进行分析,结果发现在71个模块中共有220个cluster,这些cluster 一般有2~5个基因,cluster中的基因在功能上也表现出一定的联系。共表达基因可能受到相同的转录调控,这些基因在启动子前2kb可能会存在有相同的motif以供反式作用元...",
+ "language": "zh-CN",
"libraryCatalog": "CNKI",
"thesisType": "硕士",
"university": "南京农业大学",
"url": "https://kns.cnki.net/KCMS/detail/detail.aspx?dbcode=CMFD&dbname=CMFD201701&filename=1017045605.nh&v=MDc3ODZPZVorVnZGQ3ZrV3JyT1ZGMjZHYk84RzlmTXFwRWJQSVI4ZVgxTHV4WVM3RGgxVDNxVHJXTTFGckNVUkw=",
"attachments": [],
"tags": [
- {
- "tag": "co-expression"
- },
- {
- "tag": "cucumber"
- },
- {
- "tag": "network"
- },
- {
- "tag": "transcriptome"
- },
{
"tag": "共表达"
},
@@ -494,6 +485,7 @@ var testCases = [
{
"type": "web",
"url": "https://kns.cnki.net/kcms/detail/detail.aspx?dbcode=CCJD&dbname=CCJDLAST2&filename=ZKSF202002010&uniplatform=NZKPT&v=RM9dl7WiC7a9v7FVB6ov3OwJSXCWzsWIng_BWXok2rj4YFWz9tZ20FRZxDaeDPCm",
+ "defer": true,
"items": [
{
"itemType": "journalArticle",
@@ -511,16 +503,21 @@ var testCases = [
}
],
"date": "2020",
- "abstractNote": "<正>一、简介近来再次对俄罗斯(1993)和西班牙(1995)陪审团审判模式进行介绍的原因有两个方面。第一,在废除传统陪审团审判的情况下,要么采取仅由职业法官组成的法院审理案件,要么由职业法官和审讯顾问合议来判断所有的事实问题、法律问题并作出相应判决,这是一种令人惊闻的倒退。",
- "issue": "02",
- "language": "中文;",
+ "abstractNote": "<正>一、简介近来再次对俄罗斯(1993)和西班牙(1995)陪审团审判模式进行介绍的原因有两个方面。第一,在废除传统陪审团审判的情况下,要么采取仅由职业法官组成的法院审理案件,要么由职业法官和审讯顾问合议来判断所有的事实问题、法律问题并作出相应判决,这是一种令人惊闻的倒退。",
+ "issue": "2",
+ "language": "zh-CN",
"libraryCatalog": "CNKI",
"pages": "193-212",
"publicationTitle": "司法智库",
"shortTitle": "欧洲陪审团制度新发展",
"url": "https://kns.cnki.net/kcms/detail/detail.aspx?dbcode=CCJD&dbname=CCJDLAST2&filename=ZKSF202002010&uniplatform=NZKPT&v=RM9dl7WiC7a9v7FVB6ov3OwJSXCWzsWIng_BWXok2rj4YFWz9tZ20FRZxDaeDPCm",
"volume": "3",
- "attachments": [],
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "mimeType": "application/pdf"
+ }
+ ],
"tags": [
{
"tag": "俄罗斯"
@@ -545,7 +542,8 @@ var testCases = [
},
{
"type": "web",
- "url": "https://kns.cnki.net/kcms2/article/abstract?v=3uoqIhG8C44YLTlOAiTRKibYlV5Vjs7ioT0BO4yQ4m_mOgeS2ml3UHGnAz_wirMwf-b2NsjH_IkCCqUvvwsK8DOvNyxMAxbu&uniplatform=NZKPT",
+ "url": "https://kns.cnki.net/kcms2/article/abstract?v=aGn3Ey0ZxcAi0XeGEjt5HeH9QvBBKaMwsES4SuFJjIdiexE2qhU8bX2aGBIHriUe6WrMOFyCz6TIuYJGlA_YQUO9h2FJwGt_gZfkHkLHnqVgNK8uMWo5lKYMqxvBPfO6_0Zy21140lIwEFrUw-cJtw==&uniplatform=NZKPT",
+ "defer": true,
"items": [
{
"itemType": "journalArticle",
@@ -559,31 +557,21 @@ var testCases = [
],
"date": "2022",
"ISSN": "1001-2397",
- "abstractNote": "我国绿色产品认证标识制度框架已初步形成。作为一项法律制度,绿色产品标识及认证中形成了两组法律关系:一是就产品认可认证,在行政主体、认证机构与申请人之间构成公私混合的规制关系;二是就绿色产品标识授权使用,在上述法律关系主体间构成的商业许可关系。两组法律关系的搭建,形成了我国绿色产品认证标识制度的基本格局。制度的具体完善路径是将现行同类环保产品认证标识纳入绿色产品标识与绿色属性产品标识的二元框架内,或吸收,或拆解,或由市场逐步淘汰,最终形成统一的绿色产品认证标识体系。在制度构建过程中,对第三方认证机构的规制成为制度有效运行的关键。参考域外经验,我国应当通过强化认证机构的独立性,平衡认证机构与申请人...",
- "issue": "06",
- "language": "中文;",
+ "abstractNote": "我国绿色产品认证标识制度框架已初步形成。作为一项法律制度,绿色产品标识及认证中形成了两组法律关系:一是就产品认可认证,在行政主体、认证机构与申请人之间构成公私混合的规制关系;二是就绿色产品标识授权使用,在上述法律关系主体间构成的商业许可关系。两组法律关系的搭建,形成了我国绿色产品认证标识制度的基本格局。制度的具体完善路径是将现行同类环保产品认证标识纳入绿色产品标识与绿色属性产品标识的二元框架内,或吸收,或拆解,或由市场逐步淘汰,最终形成统一的绿色产品认证标识体系。在制度构建过程中,对第三方认证机构的规制成为制度有效运行的关键。参考域外经验,我国应当通过强化认证机构的独立性,平衡认证机构与申请人之间的制约关系,以及通过加强行政监管与社会监督,防止认证权力寻租,充分发挥绿色产品认证标识制度的实践效果。",
+ "issue": "6",
+ "language": "zh-CN",
"libraryCatalog": "CNKI",
"pages": "133-145",
"publicationTitle": "现代法学",
- "url": "https://kns.cnki.net/kcms2/article/abstract?v=3uoqIhG8C44YLTlOAiTRKibYlV5Vjs7ioT0BO4yQ4m_mOgeS2ml3UHGnAz_wirMwf-b2NsjH_IkCCqUvvwsK8DOvNyxMAxbu&uniplatform=NZKPT",
+ "url": "https://kns.cnki.net/kcms2/article/abstract?v=aGn3Ey0ZxcAi0XeGEjt5HeH9QvBBKaMwsES4SuFJjIdiexE2qhU8bX2aGBIHriUe6WrMOFyCz6TIuYJGlA_YQUO9h2FJwGt_gZfkHkLHnqVgNK8uMWo5lKYMqxvBPfO6_0Zy21140lIwEFrUw-cJtw==&uniplatform=NZKPT",
"volume": "44",
- "attachments": [],
- "tags": [
- {
- "tag": "certification trade mark"
- },
+ "attachments": [
{
- "tag": "green product certification"
- },
- {
- "tag": "green product identification"
- },
- {
- "tag": "green products"
- },
- {
- "tag": "third party certification"
- },
+ "title": "Full Text PDF",
+ "mimeType": "application/pdf"
+ }
+ ],
+ "tags": [
{
"tag": "第三方认证"
},
@@ -607,7 +595,8 @@ var testCases = [
},
{
"type": "web",
- "url": "https://kns.cnki.net/kcms2/article/abstract?v=ARuSRxW-FQHH_OEY6X72RuJIsrP2RHAQAacVbC9CGuvOv08ETIP-MqQO5E296beGN9e8BXVfYGR6l0qfpFxS9gdAPZ5URHqiAY8WVPwSYoF6MXeqOgFQfX5vrMMS_wZaK3j5TPxvx-nDGPfIMtrXBlDrWr9SVlAl&uniplatform=NZKPT",
+ "url": "https://kns.cnki.net/kcms2/article/abstract?v=aGn3Ey0ZxcCQMiRSLWzbqHFLmF0YiAvOI33I1RqvSIDdZeLKl7q3QL7ioYjCbxuMHo1CSBSG2LYUjI9r30yPonoox-iGbCfgn-YF7W2h79KqPswOTOxrzPV94p2evWa1-zchF2wLCag2WcjSEGNUdSNYdPlVmcGt&uniplatform=NZKPT",
+ "defer": true,
"items": [
{
"itemType": "journalArticle",
@@ -621,15 +610,20 @@ var testCases = [
],
"date": "2022",
"ISSN": "1671-7287",
- "abstractNote": "我国对常规污染物的治理取得了显著成效,但以有毒有害化学物质的生产和使用为主要来源的新污染物的环境风险仍然较为严峻。当前我国相关环境法律法规和标准中缺乏对新污染物环境风险管控的要求,对于现有化学物质的环境风险管控还存在较为严重的不足。未来环境法典中新污染物环境风险管控立法应当坚持风险预防原则,但风险预防原则并不以追求“零风险”为目标。新污染物环境风险管控立法总体上应当遵循“风险筛查→风险评估→风险管控”的思路。环境风险评估应当聚焦于从科学角度评估新污染物对公众健康和生态环境带来的“风险”本身,不考虑与环境风险无关的经济、社会等因素。确定什么是“不合理的风险”,除了科学判断之外,也需要“正当程序”...",
- "issue": "05",
- "language": "中文;",
+ "abstractNote": "我国对常规污染物的治理取得了显著成效,但以有毒有害化学物质的生产和使用为主要来源的新污染物的环境风险仍然较为严峻。当前我国相关环境法律法规和标准中缺乏对新污染物环境风险管控的要求,对于现有化学物质的环境风险管控还存在较为严重的不足。未来环境法典中新污染物环境风险管控立法应当坚持风险预防原则,但风险预防原则并不以追求“零风险”为目标。新污染物环境风险管控立法总体上应当遵循“风险筛查→风险评估→风险管控”的思路。环境风险评估应当聚焦于从科学角度评估新污染物对公众健康和生态环境带来的“风险”本身,不考虑与环境风险无关的经济、社会等因素。确定什么是“不合理的风险”,除了科学判断之外,也需要“正当程序”的加持。风险无法确定时,比照“存在不合理风险”进行管控。在选择风险管控措施时,应当考虑新污染物对公众健康和生态环境的影响程度以及经济、社会等因素。对于新化学物质,应当秉承“除非能证明无害,否则都应当进行适当风险管控”的理念。",
+ "issue": "5",
+ "language": "zh-CN",
"libraryCatalog": "CNKI",
"pages": "18-30+115",
"publicationTitle": "南京工业大学学报(社会科学版)",
- "url": "https://kns.cnki.net/kcms2/article/abstract?v=ARuSRxW-FQHH_OEY6X72RuJIsrP2RHAQAacVbC9CGuvOv08ETIP-MqQO5E296beGN9e8BXVfYGR6l0qfpFxS9gdAPZ5URHqiAY8WVPwSYoF6MXeqOgFQfX5vrMMS_wZaK3j5TPxvx-nDGPfIMtrXBlDrWr9SVlAl&uniplatform=NZKPT",
+ "url": "https://kns.cnki.net/kcms2/article/abstract?v=aGn3Ey0ZxcCQMiRSLWzbqHFLmF0YiAvOI33I1RqvSIDdZeLKl7q3QL7ioYjCbxuMHo1CSBSG2LYUjI9r30yPonoox-iGbCfgn-YF7W2h79KqPswOTOxrzPV94p2evWa1-zchF2wLCag2WcjSEGNUdSNYdPlVmcGt&uniplatform=NZKPT",
"volume": "21",
- "attachments": [],
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "mimeType": "application/pdf"
+ }
+ ],
"tags": [
{
"tag": "新污染物风险管控"
@@ -654,11 +648,12 @@ var testCases = [
},
{
"type": "web",
- "url": "https://kns.cnki.net/kcms/detail/detail.aspx?doi=10.13863/j.issn1001-4454.2022.01.030",
+ "url": "https://kns.cnki.net/kcms2/article/abstract?v=aGn3Ey0ZxcBuyOSvEQLm_QauzuszuNvOETrZkPfTUVjXy6wyG6-n2nHmyA70y6TC3IN6i68HMAN2clvthsV7F1ypcjao4RepuYmOZSEVhLK8lN1UAkOxmQkqtJdHoHI1N1gKQDPjuaEbdR6APIJ1sA==&uniplatform=NZKPT&language=CHS",
+ "defer": true,
"items": [
{
"itemType": "journalArticle",
- "title": "Box-Behnken Design-响应面法优化碱水解人参茎叶三醇皂苷制备人参皂苷Rg_2工艺研究",
+ "title": "Box-Behnken Design-响应面法优化碱水解人参茎叶三醇皂苷制备人参皂苷Rg2工艺研究",
"creators": [
{
"lastName": "史",
@@ -699,21 +694,26 @@ var testCases = [
"date": "2022",
"DOI": "10.13863/j.issn1001-4454.2022.01.030",
"ISSN": "1001-4454",
- "abstractNote": "目的:利用Box-Behnken Design-响应面法优选制备人参皂苷Rg_2的最佳工艺参数。方法:以碱解反应的碱度、温度、时间作为考察因素,人参茎叶三醇皂苷中人参皂苷Rg_2含量作为评价指标,运用Design-Expert 8.0.5b软件对工艺参数进行优化并获得最佳工艺参数。结果:经优化得到碱水解人参茎叶三醇皂苷制备人参皂苷Rg_2的最佳工艺参数:反应碱度7.4%、反应温度187℃、反应时间5 h。验证试验表明,在此工艺参数下可将人参皂苷Rg_2含量提高至9.84%,且工艺稳定。结论:经过优化的工艺可有效提高人参茎叶三醇皂苷中人参皂苷Rg_2含量。",
- "issue": "01",
- "language": "中文;",
+ "abstractNote": "目的:利用Box-Behnken Design-响应面法优选制备人参皂苷Rg2的最佳工艺参数。方法:以碱解反应的碱度、温度、时间作为考察因素,人参茎叶三醇皂苷中人参皂苷Rg2含量作为评价指标,运用Design-Expert 8.0.5b软件对工艺参数进行优化并获得最佳工艺参数。结果:经优化得到碱水解人参茎叶三醇皂苷制备人参皂苷Rg2的最佳工艺参数:反应碱度7.4%、反应温度187℃、反应时间5 h。验证试验表明,在此工艺参数下可将人参皂苷Rg2含量提高至9.84%,且工艺稳定。结论:经过优化的工艺可有效提高人参茎叶三醇皂苷中人参皂苷Rg2含量。",
+ "issue": "1",
+ "language": "zh-CN",
"libraryCatalog": "CNKI",
"pages": "173-176",
"publicationTitle": "中药材",
- "url": "https://kns.cnki.net/kcms/detail/detail.aspx?doi=10.13863/j.issn1001-4454.2022.01.030",
+ "url": "https://kns.cnki.net/kcms2/article/abstract?v=aGn3Ey0ZxcBuyOSvEQLm_QauzuszuNvOETrZkPfTUVjXy6wyG6-n2nHmyA70y6TC3IN6i68HMAN2clvthsV7F1ypcjao4RepuYmOZSEVhLK8lN1UAkOxmQkqtJdHoHI1N1gKQDPjuaEbdR6APIJ1sA==&uniplatform=NZKPT&language=CHS",
"volume": "45",
- "attachments": [],
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "mimeType": "application/pdf"
+ }
+ ],
"tags": [
{
"tag": "Box-Behnken Design-响应面法"
},
{
- "tag": "人参皂苷Rg_2"
+ "tag": "人参皂苷Rg2"
},
{
"tag": "人参茎叶三醇皂苷"
diff --git a/COBISS.js b/COBISS.js
new file mode 100644
index 00000000000..f23b5a34968
--- /dev/null
+++ b/COBISS.js
@@ -0,0 +1,1945 @@
+{
+ "translatorID": "ceace65b-4daf-4200-a617-a6bf24c75607",
+ "label": "COBISS",
+ "creator": "Brendan O'Connell",
+ "target": "^https?://plus\\.cobiss\\.net/cobiss",
+ "minVersion": "5.0",
+ "maxVersion": "",
+ "priority": 100,
+ "inRepository": true,
+ "translatorType": 4,
+ "browserSupport": "gcsibv",
+ "lastUpdated": "2023-08-17 18:57:34"
+}
+
+/*
+ ***** BEGIN LICENSE BLOCK *****
+
+ Copyright © 2023 Brendan O'Connell
+
+ This file is part of Zotero.
+
+ Zotero is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Zotero is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with Zotero. If not, see .
+
+ ***** END LICENSE BLOCK *****
+*/
+
+function detectWeb(doc, url) {
+ // single items may end in an id number that is 6 digits or more
+ var itemIDURL = /\d{6,}$/;
+ // detailed view of single items ends in /#full
+ var fullRecordURL = /#full$/;
+ if (url.match(itemIDURL) || url.match(fullRecordURL)) {
+ // capture type of material directly from the catalog page, e.g. "undergraduate thesis"
+ var typeOfMaterial = doc.querySelector("button#add-biblioentry-to-shelf").getAttribute("data-mat-type");
+ if (typeOfMaterial) {
+ // use translateItemType function to translate catalog material type into a Zotero
+ // item type, e.g "thesis"
+ var detectItemType = translateItemType(typeOfMaterial);
+ if (detectItemType) {
+ return detectItemType;
+ }
+ // if a catalog item type isn't contained in the hash in translateItemType function,
+ // return Zotero item type 'book', which is by far the most common item type in this catalog.
+ else {
+ return 'book';
+ }
+ }
+ }
+ else if (getSearchResults(doc, true)) {
+ return 'multiple';
+ }
+ return false;
+}
+
+function getSearchResults(doc, checkOnly) {
+ var items = {};
+ var found = false;
+ var rows = doc.querySelectorAll('a.title.value');
+
+ for (let row of rows) {
+ let href = row.href;
+ let title = row.innerText;
+ if (!href || !title) continue;
+ if (checkOnly) return true;
+ found = true;
+ items[href] = title;
+ }
+ return found ? items : false;
+}
+
+function constructRISURL(url) {
+ // catalog page URL: https://plus.cobiss.net/cobiss/si/sl/bib/107937536
+ // RIS URL: https://plus.cobiss.net/cobiss/si/sl/bib/risCit/107937536
+
+ // capture first part of URL, e.g. https://plus.cobiss.net/cobiss/si/sl/bib/
+ const firstRegex = /^(.*?)\/bib\//;
+ let firstUrl = url.match(firstRegex)[0];
+
+ // capture item ID, e.g. /92020483
+ const secondRegex = /\/([^/]+)$/;
+ let secondUrl = url.match(secondRegex)[0];
+
+ // outputs correct RIS URL structure
+ let risURL = firstUrl + "risCit" + secondUrl;
+ return risURL;
+}
+
+function constructEnglishURL(url) {
+ // default catalog page URL: https://plus.cobiss.net/cobiss/si/sl/bib/107937536
+ // page with English metadata: https://plus.cobiss.net/cobiss/si/en/bib/107937536
+ // most COBISS catalogs follow the format where the language code is two characters e.g. "sl"
+ // except ones with three languages, e.g.: https://plus.cobiss.net/cobiss/cg/cnr_cyrl/bib/20926212
+ // where there are language codes for english, latin montenegrin, and cyrillic montenegrin
+ const firstPartRegex = /https:\/\/plus\.cobiss\.net\/cobiss\/[a-z]{2}\//;
+ const endPartRegex = /\/bib\/\S*/;
+
+ const firstPart = url.match(firstPartRegex)[0];
+ const endPart = url.match(endPartRegex)[0];
+ var englishURL = firstPart + "en" + endPart;
+ return englishURL;
+}
+
+// in the catalog, too many items are classified in RIS as either BOOK or ELEC,
+// including many reports, ebooks, etc, that thus are incorrectly assigned itemType "book" or "webpage"
+// when we rely on Zotero RIS translator. This map assigns more accurate itemTypes
+// based on "type of material" classification in English catalog, instead of relying on RIS.
+// this function also assigns itemType for catalog items with no RIS.
+function translateItemType(englishCatalogItemType) {
+ var catalogItemTypeHash = new Map([
+ ['undergraduate thesis', 'thesis'],
+ ['proceedings', 'conferencePaper'],
+ ['novel', 'book'],
+ ['science fiction (prose)', 'book'],
+ ['book', 'book'],
+ ['handbook', 'book'],
+ ['proceedings of conference contributions', 'conferencePaper'],
+ ['professional monograph', 'report'],
+ ['scientific monograph', 'book'],
+ ['textbook', 'book'],
+ ['e-book', 'book'],
+ ['picture book', 'book'],
+ ['treatise, study', 'report'],
+ ['catalogue', 'book'],
+ ['master\u0027s thesis', 'thesis'],
+ ['picture book', 'book'],
+ ['short stories', 'book'],
+ ['research report', 'report'],
+ ['poetry', 'book'],
+ ['dissertation', 'thesis'],
+ ['picture book', 'book'],
+ ['offprint', 'magazineArticle'],
+ ['guide-book', 'book'],
+ ['expertise', 'hearing'], // court testimony, e.g. https://plus.cobiss.net/cobiss/si/en/bib/94791683
+ ['profess. monogr', 'report'],
+ ['project documentation', 'report'],
+ ['antiquarian material', 'book'], // mostly books, e.g. https://plus.cobiss.net/cobiss/si/en/bib/7543093
+ ['other lit.forms', 'book'],
+ ['drama', 'book'],
+ ['strip cartoon', 'book'],
+ ['documentary lit', 'book'],
+ ['encyclopedia', 'book'],
+ ['exercise book', 'book'],
+ ['educational material', 'book'],
+ ['review', 'report'],
+ ['statistics', 'report'],
+ ['legislation', 'statute'],
+ ['essay', 'book'],
+ ['final paper', 'thesis'],
+ ['standard', 'book'],
+ ['specialist thesis', 'book'],
+ ['aphorisms, proverbs', 'book'],
+ ['humour, satire, parody', 'book'],
+ ['examin. paper', 'report'],
+ ['annual', 'report'],
+ ['yearly', 'report'],
+ ['documentary lit', 'book'],
+ ['folk literature', 'book'],
+ ['patent', 'patent'],
+ ['regulations', 'report'],
+ ['conf. materials', 'conferencePaper'],
+ ['radio play', 'book'],
+ ['letters', 'book'],
+ ['literature survey/review', 'report'],
+ ['statute', 'statute'],
+ ['matura paper', 'thesis'],
+ ['seminar paper', 'thesis'],
+ ['habilitation', 'thesis'],
+ ['dramaturgical paper', 'thesis'],
+ ['article, component part', 'journalArticle'],
+ ['e-article', 'journalArticle'],
+ ['periodical', 'book'],
+ ['monogr. series', 'book'],
+ ['audio CD', 'audioRecording'],
+ ['audio cassette', 'audioRecording'],
+ ['disc', 'audioRecording'],
+ ['music, sound recording', 'audioRecording'],
+ ['audio DVD', 'audioRecording'],
+ ['printed and manuscript music', 'audioRecording'],
+ ['graphics', 'artwork'],
+ ['poster', 'artwork'],
+ ['photograph', 'artwork'],
+ ['e-video', 'videoRecording'],
+ ['video DVD', 'videoRecording'],
+ ['video cassette', 'videoRecording'],
+ ['blu-ray', 'videoRecording'],
+ ['motion picture', 'videoRecording'],
+ ['map', 'map'],
+ ['atlas', 'map'],
+ ['electronic resource', 'webpage'],
+ ['computer CD, DVD, USB', 'computerProgram'],
+ ['article, component part ', 'journalArticle']
+ // there are likely other catalog item types in COBISS,
+ // which could be added to this hash later if they're being
+ // imported with the wrong Zotero item type
+
+ ]);
+ return (catalogItemTypeHash.get(englishCatalogItemType));
+}
+
+async function doWeb(doc, url) {
+ if (detectWeb(doc, url) == 'multiple') {
+ let items = await Zotero.selectItems(getSearchResults(doc, false));
+ if (!items) return;
+ for (let url of Object.keys(items)) {
+ await scrape(await requestDocument(url));
+ }
+ }
+ else {
+ await scrape(doc, url);
+ }
+}
+
+async function scrape(doc, url = doc.location.href) {
+ var finalItemType = "";
+ // if url matches /en/bib/, then skip constructing englishURL
+ if (url.match("/en/bib")) {
+ // get catalog item type from page, then translate to Zotero item type using translateItemType()
+ var nativeEnglishItemType = doc.querySelector("button#add-biblioentry-to-shelf").getAttribute("data-mat-type");
+ finalItemType = translateItemType(nativeEnglishItemType);
+ }
+ else {
+ // replace specific language in bib record URL with english to detect item type
+ var englishURL = constructEnglishURL(url);
+ var englishDocument = await requestDocument(englishURL);
+ var englishItemType = englishDocument.querySelector("button#add-biblioentry-to-shelf").getAttribute("data-mat-type");
+ finalItemType = translateItemType(englishItemType);
+ }
+ if (doc.getElementById("unpaywall-link")) {
+ var pdfLink = doc.getElementById("unpaywall-link").href;
+ }
+ if (doc.getElementById('showUrlHref')) {
+ var fullTextLink = doc.getElementById('showUrlHref').href;
+ }
+
+ const risURL = constructRISURL(url);
+ const risText = await requestText(risURL);
+ // case for catalog items with RIS (95%+ of items)
+ if (risText) {
+ // RIS always has an extraneous OK## at the beginning, remove it
+ let fixedRisText = risText.replace(/^OK##/, '');
+ // PY tag sometimes has 'cop.' at the end - remove it or it makes the date parser return '0000' for some reason
+ fixedRisText = fixedRisText.replace(/^(PY\s*-\s*.+)cop\.$/m, '$1');
+ const translator = Zotero.loadTranslator('import');
+ translator.setTranslator('32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7'); // RIS
+ translator.setString(fixedRisText);
+ translator.setHandler('itemDone', (_obj, item) => {
+ if (pdfLink) {
+ item.attachments.push({
+ url: pdfLink,
+ title: 'Full Text PDF',
+ mimeType: 'application/pdf'
+ });
+ }
+ else if (fullTextLink) {
+ if (fullTextLink.match(/.pdf$/)) {
+ item.attachments.push({
+ url: fullTextLink,
+ title: 'Full Text PDF',
+ mimeType: 'application/pdf'
+ });
+ }
+ else {
+ item.attachments.push({
+ url: fullTextLink,
+ title: 'Full Text',
+ mimeType: 'text/html'
+ });
+ }
+ }
+
+ // if finalItemType is found from the catalog page, override itemType from RIS with it.
+ // if "Type of material" from catalog page isn't in catalogItemTypeHash, finalItemType will return as undefined.
+ // in this case, default Type from RIS will remain.
+ if (finalItemType) {
+ item.itemType = finalItemType;
+ }
+
+ // some items have tags in RIS KW field and are captured by
+ // RIS translator, e.g. https://plus.cobiss.net/cobiss/si/en/bib/78691587.
+ // don't add dupliicate tags from the page to these items.
+ if (item.tags.length === 0) {
+ // other items e.g. https://plus.cobiss.net/cobiss/si/sl/bib/82789891 have tags,
+ // but they're not in the RIS. In this case, add tags from catalog page.
+ var pageTags = doc.querySelectorAll('a[href^="bib/search?c=su="]');
+ for (let tagElem of pageTags) {
+ item.tags.push(tagElem.innerText);
+ }
+ }
+ item.url = url;
+ item.complete();
+ });
+ await translator.translate();
+ }
+
+ // case for catalog items with no RIS (remaining 5% or so of items) where we can't use the RIS import translator
+ else {
+ // construct correct fullRecord URL from basic catalog URL or #full URL
+ // base URL: https://plus.cobiss.net/cobiss/si/sl/bib/93266179
+ // JSON URL: https://plus.cobiss.net/cobiss/si/sl/bib/COBIB/93266179/full
+ var jsonUrl = url.replace(/\/bib\/(\d+)/, "/bib/COBIB/$1/full");
+ var fullRecord = await requestJSON(jsonUrl);
+ var noRISItem = new Zotero.Item(finalItemType);
+ noRISItem.title = fullRecord.titleCard.value;
+ var creatorsJson = fullRecord.author700701.value;
+ var brSlashRegex = /
/;
+ var creators = creatorsJson.split(brSlashRegex).map(value => value.trim());
+ for (let creator of creators) {
+ // creator role isn't defined in metadata, so assign everyone "author" role
+ let role = "author";
+ noRISItem.creators.push(ZU.cleanAuthor(creator, role, true));
+ }
+ if (fullRecord.languageCard) noRISItem.language = fullRecord.languageCard.value;
+ if (fullRecord.publishDate) noRISItem.date = fullRecord.publishDate.value;
+ if (fullRecord.edition) noRISItem.edition = fullRecord.edition.value;
+ if (fullRecord.isbnCard) noRISItem.ISBN = fullRecord.isbnCard.value;
+
+ if (fullRecord.publisherCard) {
+ var placePublisher = fullRecord.publisherCard.value;
+ // example string for publisherCard.value: "Ljubljana : Intelego, 2022"
+ const colonIndex = placePublisher.indexOf(":");
+ const commaIndex = placePublisher.indexOf(",");
+ noRISItem.place = placePublisher.slice(0, colonIndex).trim();
+ noRISItem.publisher = placePublisher.slice(colonIndex + 2, commaIndex).trim();
+ }
+
+ if (fullRecord.notesCard) {
+ var notesJson = fullRecord.notesCard.value;
+ var brRegex = /
/;
+ var notes = notesJson.split(brRegex).map(value => value.trim());
+ for (let note of notes) {
+ noRISItem.notes.push(note);
+ }
+ }
+
+ // add subjects from JSON as tags. There are three fields that contain tags,
+ // sgcHeadings, otherSubjects and subjectCardUncon with
+ // different separators. sgcHeadings and otherSubjects use
, subjectCardUncon uses /
+ if (fullRecord.sgcHeadings) {
+ var sgcHeadingsJson = fullRecord.sgcHeadings.value;
+ var sgcHeadingTags = sgcHeadingsJson.split(brRegex).map(value => value.trim());
+ for (let sgcHeadingTag of sgcHeadingTags) {
+ noRISItem.tags.push(sgcHeadingTag);
+ }
+ }
+
+ if (fullRecord.otherSubjects) {
+ var otherSubjectsJson = fullRecord.otherSubjects.value;
+ var otherSubjectsTags = otherSubjectsJson.split(brRegex).map(value => value.trim());
+ for (let otherSubjectsTag of otherSubjectsTags) {
+ noRISItem.tags.push(otherSubjectsTag);
+ }
+ }
+
+ if (fullRecord.subjectCardUncon) {
+ var subjectCardUnconJson = fullRecord.subjectCardUncon.value;
+ const slashRegex = /\//;
+ var subjectCardUnconTags = subjectCardUnconJson.split(slashRegex).map(value => value.trim());
+ for (let subjectCardUnconTag of subjectCardUnconTags) {
+ noRISItem.tags.push(subjectCardUnconTag);
+ }
+ }
+ // add attachments to RIS items
+ if (pdfLink) {
+ noRISItem.attachments.push({
+ url: pdfLink,
+ title: 'Full Text PDF',
+ mimeType: 'application/pdf'
+ });
+ }
+ else if (fullTextLink) {
+ if (fullTextLink.match(/.pdf$/)) {
+ noRISItem.attachments.push({
+ url: fullTextLink,
+ title: 'Full Text PDF',
+ mimeType: 'application/pdf'
+ });
+ }
+ else {
+ noRISItem.attachments.push({
+ url: fullTextLink,
+ title: 'Full Text',
+ mimeType: 'text/html'
+ });
+ }
+ }
+ noRISItem.complete();
+ }
+}
+
+/** BEGIN TEST CASES **/
+var testCases = [
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/92020483",
+ "items": [
+ {
+ "itemType": "videoRecording",
+ "title": "Nauk o barvah po Goetheju. DVD 2/3, Poglobitev vsebine nauka o barvah, še posebej poglavja \"Fizične barve\" s prikazom eksperimentov",
+ "creators": [
+ {
+ "lastName": "Kühl",
+ "firstName": "Johannes",
+ "creatorType": "director"
+ }
+ ],
+ "date": "2022",
+ "ISBN": "9789619527542",
+ "libraryCatalog": "COBISS",
+ "place": "Hvaletinci",
+ "studio": "NID Sapientia",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/92020483",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Antropozofija"
+ },
+ {
+ "tag": "Barve"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Dialogi v slov. in nem. s konsekutivnim prevodom v slov.
"
+ },
+ {
+ "note": "Tisk po naročilu
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/search?q=*&db=cobib&mat=allmaterials&cof=0_105b-p&pdfrom=01.01.2023",
+ "items": "multiple"
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/115256576",
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Angel z zahodnega okna",
+ "creators": [
+ {
+ "lastName": "Meyrink",
+ "firstName": "Gustav",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2001",
+ "ISBN": "9789616400107",
+ "libraryCatalog": "COBISS",
+ "numPages": "2 zv. (216; 203 )",
+ "place": "Ljubljana",
+ "publisher": "Založniški atelje Blodnjak",
+ "series": "Zbirka Blodnjak",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/115256576",
+ "attachments": [],
+ "tags": [],
+ "notes": [
+ {
+ "note": "Prevod dela: Der Engel vom westlichen Fenster
"
+ },
+ {
+ "note": "Gustav Meyrink / Herman Hesse: str. 198-200
"
+ },
+ {
+ "note": "Magični stekleni vrtovi judovske kulture / Jorge Luis Borges: str. 201-203
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/139084803",
+ "detectedItemType": "book",
+ "items": [
+ {
+ "itemType": "report",
+ "title": "Poročilo analiz vzorcev odpadnih vod na vsebnost prepovedanih in dovoljenih drog na področju centralne čistilne naprave Kranj (2022)",
+ "creators": [
+ {
+ "lastName": "Heath",
+ "firstName": "Ester",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Verovšek",
+ "firstName": "Taja",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2023",
+ "institution": "Institut Jožef Stefan",
+ "libraryCatalog": "COBISS",
+ "pages": "1 USB-ključ",
+ "place": "Ljubljana",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/139084803",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "dovoljene droge"
+ },
+ {
+ "tag": "nedovoljene droge"
+ },
+ {
+ "tag": "odpadne vode"
+ },
+ {
+ "tag": "čistilna naprava"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Nasl. z nasl. zaslona
"
+ },
+ {
+ "note": "Opis vira z dne 11. 1. 2023
"
+ },
+ {
+ "note": "Bibliografija: str. 13
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/84534787",
+ "detectedItemType": "book",
+ "items": [
+ {
+ "itemType": "journalArticle",
+ "title": "Flood legislation and land policy framework of EU and non-EU countries in Southern Europe",
+ "creators": [
+ {
+ "lastName": "Kapović-Solomun",
+ "firstName": "Marijana",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Ferreira",
+ "firstName": "Carla S.S.",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Zupanc",
+ "firstName": "Vesna",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Ristić",
+ "firstName": "Ratko",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Drobnjak",
+ "firstName": "Aleksandar",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Kalantari",
+ "firstName": "Zahra",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2022",
+ "ISSN": "2049-1948",
+ "issue": "1",
+ "journalAbbreviation": "WIREs",
+ "libraryCatalog": "COBISS",
+ "pages": "1-14",
+ "publicationTitle": "WIREs",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/84534787",
+ "volume": "9",
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "mimeType": "application/pdf"
+ }
+ ],
+ "tags": [
+ {
+ "tag": "EU legislation"
+ },
+ {
+ "tag": "Južna Evropa"
+ },
+ {
+ "tag": "Southern Europe"
+ },
+ {
+ "tag": "floods"
+ },
+ {
+ "tag": "land governance"
+ },
+ {
+ "tag": "policy framework"
+ },
+ {
+ "tag": "politika"
+ },
+ {
+ "tag": "poplave"
+ },
+ {
+ "tag": "upravljanje zemljišč"
+ },
+ {
+ "tag": "zakonodaja EU"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Nasl. z nasl. zaslona
"
+ },
+ {
+ "note": "Opis vira z dne 11. 11. 2021
"
+ },
+ {
+ "note": "Bibliografija: str. 12-14
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/5815649",
+ "detectedItemType": "book",
+ "items": [
+ {
+ "itemType": "thesis",
+ "title": "Rangiranje cest po metodologiji EuroRAP ; Elektronski vir: diplomska naloga = Rating roads using EuroRAP procedures",
+ "creators": [
+ {
+ "lastName": "Pešec",
+ "firstName": "Katja",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2012",
+ "libraryCatalog": "COBISS",
+ "place": "Ljubljana",
+ "shortTitle": "Rangiranje cest po metodologiji EuroRAP ; Elektronski vir",
+ "university": "[K. Pešec]",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/5815649",
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "mimeType": "application/pdf"
+ }
+ ],
+ "tags": [
+ {
+ "tag": "EuroRAP"
+ },
+ {
+ "tag": "EuroRAP"
+ },
+ {
+ "tag": "VSŠ"
+ },
+ {
+ "tag": "cesta in obcestje"
+ },
+ {
+ "tag": "diplomska dela"
+ },
+ {
+ "tag": "economic efficiency"
+ },
+ {
+ "tag": "ekonomska učinkovitost"
+ },
+ {
+ "tag": "gradbeništvo"
+ },
+ {
+ "tag": "graduation thesis"
+ },
+ {
+ "tag": "pilot project"
+ },
+ {
+ "tag": "pilotski projekt"
+ },
+ {
+ "tag": "predlagani (proti)ukrepi"
+ },
+ {
+ "tag": "rangiranje cest"
+ },
+ {
+ "tag": "road and roadside"
+ },
+ {
+ "tag": "star rating"
+ },
+ {
+ "tag": "suggested countermeasure"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Diplomsko delo visokošolskega strokovnega študija gradbeništva, Prometna smer
"
+ },
+ {
+ "note": "Nasl. z nasl. zaslona
"
+ },
+ {
+ "note": "Publikacija v pdf formatu obsega 103 str.
"
+ },
+ {
+ "note": "Bibliografija: str. 85-87
"
+ },
+ {
+ "note": "Izvleček ; Abstract
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/82789891",
+ "detectedItemType": "book",
+ "items": [
+ {
+ "itemType": "conferencePaper",
+ "title": "Posvet Avtomatizacija strege in montaže 2021/2021 - ASM '21/22, Ljubljana, 11. 05. 2022: zbornik povzetkov s posveta",
+ "creators": [
+ {
+ "lastName": "Posvet Avtomatizacija strege in montaže",
+ "creatorType": "author",
+ "fieldMode": 1
+ },
+ {
+ "lastName": "Herakovič",
+ "firstName": "Niko",
+ "creatorType": "editor"
+ },
+ {
+ "lastName": "Debevec",
+ "firstName": "Mihael",
+ "creatorType": "editor"
+ },
+ {
+ "lastName": "Pipan",
+ "firstName": "Miha",
+ "creatorType": "editor"
+ },
+ {
+ "lastName": "Adrović",
+ "firstName": "Edo",
+ "creatorType": "editor"
+ }
+ ],
+ "date": "2022",
+ "ISBN": "9789616980821",
+ "libraryCatalog": "COBISS",
+ "pages": "141",
+ "place": "Ljubljana",
+ "publisher": "Fakulteta za strojništvo",
+ "shortTitle": "Posvet Avtomatizacija strege in montaže 2021/2021 - ASM '21/22, Ljubljana, 11. 05. 2022",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/82789891",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Avtomatizacija"
+ },
+ {
+ "tag": "Posvetovanja"
+ },
+ {
+ "tag": "Strojništvo"
+ }
+ ],
+ "notes": [
+ {
+ "note": "180 izv.
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/78691587",
+ "items": [
+ {
+ "itemType": "thesis",
+ "title": "Modeliranje obratovanja transformatorskih postaj z metodami strojnega učenja: diplomsko delo: visokošolski strokovni študijski program prve stopnje Računalništvo in informatika",
+ "creators": [
+ {
+ "lastName": "Čuš",
+ "firstName": "Tibor",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2022",
+ "libraryCatalog": "COBISS",
+ "numPages": "55",
+ "place": "Ljubljana",
+ "shortTitle": "Modeliranje obratovanja transformatorskih postaj z metodami strojnega učenja",
+ "university": "[T. Čuš]",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/78691587",
+ "attachments": [
+ {
+ "title": "Full Text",
+ "mimeType": "text/html"
+ }
+ ],
+ "tags": [
+ {
+ "tag": "computer science"
+ },
+ {
+ "tag": "diploma"
+ },
+ {
+ "tag": "diplomske naloge"
+ },
+ {
+ "tag": "electrical power system"
+ },
+ {
+ "tag": "elektroenergetski sistem"
+ },
+ {
+ "tag": "forecasting models"
+ },
+ {
+ "tag": "indikatorji preobremenitev"
+ },
+ {
+ "tag": "machine learning"
+ },
+ {
+ "tag": "napovedni modeli"
+ },
+ {
+ "tag": "overload indicators"
+ },
+ {
+ "tag": "transformer station"
+ },
+ {
+ "tag": "visokošolski strokovni študij"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Bibliografija: str. 53-55
"
+ },
+ {
+ "note": "Povzetek ; Abstract: Modeling transformer station operation with machine learning methods
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/94705155#full",
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Ljubezen v pismih: dopisovanje med Felicito Koglot in Francem Pericem: Aleksandrija-Bilje: 1921-1931",
+ "creators": [
+ {
+ "lastName": "Koglot",
+ "firstName": "Felicita",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Peric",
+ "firstName": "Franc",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Vončina",
+ "firstName": "Lara",
+ "creatorType": "editor"
+ },
+ {
+ "lastName": "Orel",
+ "firstName": "Maja",
+ "creatorType": "editor"
+ },
+ {
+ "lastName": "Koren",
+ "firstName": "Manca",
+ "creatorType": "editor"
+ },
+ {
+ "lastName": "Mihurko Poniž",
+ "firstName": "Katja",
+ "creatorType": "editor"
+ }
+ ],
+ "date": "2022",
+ "ISBN": "9789617025224",
+ "libraryCatalog": "COBISS",
+ "numPages": "235",
+ "place": "V Novi Gorici",
+ "publisher": "Založba Univerze",
+ "shortTitle": "Ljubezen v pismih",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/94705155#full",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Primorska"
+ },
+ {
+ "tag": "Slovenke"
+ },
+ {
+ "tag": "emigracija"
+ },
+ {
+ "tag": "pisma"
+ },
+ {
+ "tag": "ženske"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Potiskane notr. str. ov.
"
+ },
+ {
+ "note": "250 izv.
"
+ },
+ {
+ "note": "Kdo sta bila Felicita Koglot in Franc Peric in o knjižni izdaji njunega dopisovanja / Manca Koren, Maja Orel, Lara Vončina: str. 5-6
"
+ },
+ {
+ "note": "Kratek oris zgodovinskih razmer v Egiptu in na Primorskem v obdobju med obema vojnama / Manca Koren: str. 185-195
"
+ },
+ {
+ "note": "Franc Peric in Felicita Koglot: večkratne migracije v družinski korespondenci / Mirjam Milharčič Hladnik: str. 197-209
"
+ },
+ {
+ "note": "Družinsko življenje in doživljanje aleksandrinstva v pismih / Manca Koren: str. 211-228
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/78691587",
+ "items": [
+ {
+ "itemType": "thesis",
+ "title": "Modeliranje obratovanja transformatorskih postaj z metodami strojnega učenja: diplomsko delo: visokošolski strokovni študijski program prve stopnje Računalništvo in informatika",
+ "creators": [
+ {
+ "lastName": "Čuš",
+ "firstName": "Tibor",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2022",
+ "libraryCatalog": "COBISS",
+ "numPages": "55",
+ "place": "Ljubljana",
+ "shortTitle": "Modeliranje obratovanja transformatorskih postaj z metodami strojnega učenja",
+ "university": "[T. Čuš]",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/78691587",
+ "attachments": [
+ {
+ "title": "Full Text",
+ "mimeType": "text/html"
+ }
+ ],
+ "tags": [
+ {
+ "tag": "computer science"
+ },
+ {
+ "tag": "diploma"
+ },
+ {
+ "tag": "diplomske naloge"
+ },
+ {
+ "tag": "electrical power system"
+ },
+ {
+ "tag": "elektroenergetski sistem"
+ },
+ {
+ "tag": "forecasting models"
+ },
+ {
+ "tag": "indikatorji preobremenitev"
+ },
+ {
+ "tag": "machine learning"
+ },
+ {
+ "tag": "napovedni modeli"
+ },
+ {
+ "tag": "overload indicators"
+ },
+ {
+ "tag": "transformer station"
+ },
+ {
+ "tag": "visokošolski strokovni študij"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Bibliografija: str. 53-55
"
+ },
+ {
+ "note": "Povzetek ; Abstract: Modeling transformer station operation with machine learning methods
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/search?q=*&db=cobib&mat=allmaterials&cof=0_105b-mb16",
+ "items": "multiple"
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/101208835",
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Fizika. Zbirka maturitetnih nalog z rešitvami 2012-2017 / [avtorji Vitomir Babič ... [et al.] ; urednika Aleš Drolc, Joži Trkov]",
+ "creators": [
+ {
+ "firstName": "Vito",
+ "lastName": "Babič",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Ruben",
+ "lastName": "Belina",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Peter",
+ "lastName": "Gabrovec",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Marko",
+ "lastName": "Jagodič",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Aleš",
+ "lastName": "Mohorič",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Mirijam",
+ "lastName": "Pirc",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Gorazd",
+ "lastName": "Planinšič",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Mitja",
+ "lastName": "Slavinec",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Ivica",
+ "lastName": "Tomić",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2022",
+ "ISBN": "9789616899420",
+ "edition": "3. ponatis",
+ "language": "Slovenian",
+ "libraryCatalog": "COBISS",
+ "place": "Ljubljana",
+ "publisher": "Državni izpitni center",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Fizika -- Matura -- 2012-2017 -- Vaje za srednje šole"
+ },
+ {
+ "tag": "Fizika -- Vaje za maturo"
+ },
+ {
+ "tag": "izpitne naloge za srednje šole"
+ },
+ {
+ "tag": "naloge"
+ },
+ {
+ "tag": "rešitve"
+ },
+ {
+ "tag": "testi znanja"
+ },
+ {
+ "tag": "učbeniki za srednje šole"
+ }
+ ],
+ "notes": [
+ "Nasl. na hrbtu: Fizika 2012-2017",
+ "Avtorji navedeni v kolofonu",
+ "600 izv."
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/sl/bib/93266179",
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Matematika na splošni maturi : 2022 : vprašanja in odgovori za ustni izpit iz matematike na splošni maturi za osnovno raven / Bojana Dvoržak",
+ "creators": [
+ {
+ "firstName": "Bojana",
+ "lastName": "Dvoržak",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2022",
+ "ISBN": "9789616558624",
+ "edition": "1. izd.",
+ "language": "slovenski",
+ "libraryCatalog": "COBISS",
+ "place": "Ljubljana",
+ "publisher": "Intelego",
+ "shortTitle": "Matematika na splošni maturi",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Matematika"
+ },
+ {
+ "tag": "Matematika -- Katalogi znanja za srednje šole"
+ },
+ {
+ "tag": "Matematika -- Matura -- Vaje za srednje šole"
+ },
+ {
+ "tag": "Matematika -- Vaje za maturo"
+ },
+ {
+ "tag": "Matura"
+ },
+ {
+ "tag": "Naloge, vaje itd."
+ },
+ {
+ "tag": "izpitne naloge za srednje šole"
+ },
+ {
+ "tag": "odgovori"
+ },
+ {
+ "tag": "osnovna raven"
+ },
+ {
+ "tag": "rešitve"
+ },
+ {
+ "tag": "testi znanja"
+ },
+ {
+ "tag": "učbeniki za srednje šole"
+ },
+ {
+ "tag": "vprašanja"
+ },
+ {
+ "tag": "zaključni izpiti"
+ }
+ ],
+ "notes": [
+ "Dodatek k nasl. v kolofonu in CIP-u: Vprašanja in odgovori za ustni izpit iz matematike na splošni maturi 2022 za osnovno raven",
+ "1.000 izv."
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/143385859",
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Fizika. Zbirka maturitetnih nalog z rešitvami 2012-2017 / [avtorji Vitomir Babič ... [et al.] ; urednika Aleš Drolc, Joži Trkov]",
+ "creators": [
+ {
+ "firstName": "Vito",
+ "lastName": "Babič",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Ruben",
+ "lastName": "Belina",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Peter",
+ "lastName": "Gabrovec",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Marko",
+ "lastName": "Jagodič",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Aleš",
+ "lastName": "Mohorič",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Mirijam",
+ "lastName": "Pirc",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Gorazd",
+ "lastName": "Planinšič",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Mitja",
+ "lastName": "Slavinec",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Ivica",
+ "lastName": "Tomić",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2023",
+ "ISBN": "9789616899420",
+ "edition": "4. ponatis",
+ "language": "Slovenian",
+ "libraryCatalog": "COBISS",
+ "place": "Ljubljana",
+ "publisher": "Državni izpitni center",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Fizika -- Matura -- 2012-2017 -- Priročniki"
+ },
+ {
+ "tag": "Fizika -- Vaje za maturo"
+ },
+ {
+ "tag": "izpitne naloge za srednje šole"
+ },
+ {
+ "tag": "naloge"
+ },
+ {
+ "tag": "rešitve"
+ },
+ {
+ "tag": "učbeniki za srednje šole"
+ },
+ {
+ "tag": "vaje za srednje šole"
+ }
+ ],
+ "notes": [
+ "Hrbtni nasl.: Fizika 2012-2017",
+ "Avtorji navedeni v kolofonu",
+ "300 izv."
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/70461955",
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Napredna znanja za kakovostno mentorstvo v zdravstveni negi: znanstvena monografija",
+ "creators": [
+ {
+ "lastName": "Filej",
+ "firstName": "Bojana",
+ "creatorType": "editor"
+ },
+ {
+ "lastName": "Kaučič",
+ "firstName": "Boris Miha",
+ "creatorType": "editor"
+ }
+ ],
+ "date": "2023",
+ "ISBN": "9789616889377",
+ "edition": "1. izd.",
+ "libraryCatalog": "COBISS",
+ "place": "Celje",
+ "publisher": "Fakulteta za zdravstvene vede",
+ "shortTitle": "Napredna znanja za kakovostno mentorstvo v zdravstveni negi",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/70461955",
+ "attachments": [
+ {
+ "title": "Full Text",
+ "mimeType": "text/html"
+ }
+ ],
+ "tags": [
+ {
+ "tag": "Izobrževanje"
+ },
+ {
+ "tag": "Mentorstvo"
+ },
+ {
+ "tag": "Mentorstvo"
+ },
+ {
+ "tag": "Praktična znanja"
+ },
+ {
+ "tag": "Vzgoja in izobraževanje"
+ },
+ {
+ "tag": "Zborniki"
+ },
+ {
+ "tag": "Zdravstvena nega"
+ },
+ {
+ "tag": "Zdravstvena nega"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Nasl. z nasl. zaslona
"
+ },
+ {
+ "note": "Dokument v pdf formatu obsega 94 str.
"
+ },
+ {
+ "note": "Opis vira z dne 1. 2. 2023
"
+ },
+ {
+ "note": "Bibliografija pri posameznih poglavjih
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/105123075",
+ "items": [
+ {
+ "itemType": "report",
+ "title": "Storitveni sektor in siva ekonomija v času epidemije COVID-19: raziskovalno delo: področje: ekonomija in turizem",
+ "creators": [
+ {
+ "lastName": "Hochkraut",
+ "firstName": "Nataša",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Verbovšek",
+ "firstName": "Lea",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2022",
+ "institution": "Osnovna šola Primoža Trubarja",
+ "libraryCatalog": "COBISS",
+ "place": "Laško",
+ "shortTitle": "Storitveni sektor in siva ekonomija v času epidemije COVID-19",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/105123075",
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "mimeType": "application/pdf"
+ }
+ ],
+ "tags": [
+ {
+ "tag": "COVID 19"
+ },
+ {
+ "tag": "SARS-Cov-2"
+ },
+ {
+ "tag": "izvajalci storitev"
+ },
+ {
+ "tag": "korelacija"
+ },
+ {
+ "tag": "koronavirus"
+ },
+ {
+ "tag": "potrošniki"
+ },
+ {
+ "tag": "raziskovalne naloge"
+ },
+ {
+ "tag": "siva ekonomija"
+ },
+ {
+ "tag": "statistika"
+ },
+ {
+ "tag": "storitveni sektor"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Raziskovalna naloga v okviru projekta Mladi za Celje 2022
"
+ },
+ {
+ "note": "Povzetek v slov in angl.
"
+ },
+ {
+ "note": "Bibliografija: f. 35-36
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/84576259",
+ "items": [
+ {
+ "itemType": "audioRecording",
+ "title": "Reforma: tribute to Laibach",
+ "creators": [
+ {
+ "lastName": "Noctiferia",
+ "creatorType": "composer",
+ "fieldMode": 1
+ }
+ ],
+ "date": "2021",
+ "label": "Nika",
+ "libraryCatalog": "COBISS",
+ "place": "Ljubljana",
+ "shortTitle": "Reforma",
+ "url": "https://plus.cobiss.net/cobiss/si/en/bib/84576259",
+ "attachments": [
+ {
+ "title": "Full Text",
+ "mimeType": "text/html"
+ }
+ ],
+ "tags": [
+ {
+ "tag": "avantgardna glasba"
+ },
+ {
+ "tag": "avantgardni rock"
+ },
+ {
+ "tag": "black metal"
+ },
+ {
+ "tag": "death metal"
+ },
+ {
+ "tag": "extreme metal"
+ },
+ {
+ "tag": "heavy metal"
+ },
+ {
+ "tag": "industrial metal"
+ },
+ {
+ "tag": "metal"
+ },
+ {
+ "tag": "priredbe"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Leto posnetja 2021
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/al/sq/bib/334906368",
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Trëndafili i mesnatës",
+ "creators": [
+ {
+ "lastName": "Riley",
+ "firstName": "Lucinda",
+ "creatorType": "author"
+ }
+ ],
+ "date": "[2022]",
+ "ISBN": "9789928366108",
+ "libraryCatalog": "COBISS",
+ "numPages": "603 f.",
+ "place": "[Tiranë]",
+ "publisher": "Dituria",
+ "series": "Letërsi e huaj bashkëkohore",
+ "url": "https://plus.cobiss.net/cobiss/al/sq/bib/334906368",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "letërsia irlandeze"
+ },
+ {
+ "tag": "romane"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Tit. i origj.: The midnight rose
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/bh/sr/bib/47388678",
+ "detectedItemType": "book",
+ "items": [
+ {
+ "itemType": "thesis",
+ "title": "The influence of negative transfer on the use of collocations in high school student's writing = Utjecaj negativnog transfera na korištenje kolokacija u pismenim zadaćama učenika srednjih škola",
+ "creators": [
+ {
+ "lastName": "Đapo",
+ "firstName": "Amra",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2022",
+ "libraryCatalog": "COBISS",
+ "numPages": "76 listova",
+ "place": "Tuzla",
+ "university": "[A. Đapo]",
+ "url": "https://plus.cobiss.net/cobiss/bh/sr/bib/47388678",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "acquisition"
+ },
+ {
+ "tag": "collocations"
+ },
+ {
+ "tag": "engleski kao drugi jezik"
+ },
+ {
+ "tag": "errors"
+ },
+ {
+ "tag": "greške"
+ },
+ {
+ "tag": "kolokacije"
+ },
+ {
+ "tag": "magistarski rad"
+ },
+ {
+ "tag": "transfer"
+ },
+ {
+ "tag": "transfer"
+ },
+ {
+ "tag": "usvajanje"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Bibliografija: listovi 73-76
"
+ },
+ {
+ "note": "Sažetak ; Summary
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/rs/sr/bib/57790729",
+ "detectedItemType": "book",
+ "items": [
+ {
+ "itemType": "statute",
+ "nameOfAct": "Закон о Централном регистру обавезног социјалног осигурања, са подзаконским актима",
+ "creators": [
+ {
+ "lastName": "Србија",
+ "creatorType": "author",
+ "fieldMode": 1
+ },
+ {
+ "lastName": "Мартић",
+ "firstName": "Вера",
+ "creatorType": "editor"
+ }
+ ],
+ "dateEnacted": "2022",
+ "pages": "II, 74 стр.",
+ "url": "https://plus.cobiss.net/cobiss/rs/sr/bib/57790729",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Београд"
+ },
+ {
+ "tag": "Законски прописи"
+ },
+ {
+ "tag": "Централни регистар обавезног социјалног осигурања"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Тираж 300
"
+ },
+ {
+ "note": "Напомене и библиографске референце уз текст.
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/bg/en/bib/51193608",
+ "items": [
+ {
+ "itemType": "thesis",
+ "title": "Хирургични аспекти на аноректалните абсцеси при деца и възрастни: дисертационен труд за присъждане на образователна и научна степен \"доктор\", област на висше образование 7. Здравеопазване и спорт, професионално направление 7.1 Медицина, научна специалност: 03.01.37 Обща хирургия",
+ "creators": [
+ {
+ "lastName": "Хаджиева",
+ "firstName": "Елена Божидарова",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Hadžieva",
+ "firstName": "Elena Božidarova",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2022",
+ "libraryCatalog": "COBISS",
+ "numPages": "198 л.",
+ "place": "Пловдив",
+ "shortTitle": "Хирургични аспекти на аноректалните абсцеси при деца и възрастни",
+ "university": "[Е. Хаджиева]",
+ "url": "https://plus.cobiss.net/cobiss/bg/en/bib/51193608",
+ "attachments": [],
+ "tags": [],
+ "notes": [
+ {
+ "note": "Библиогр.: л. 175-190
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/ks/sq/bib/120263427",
+ "detectedItemType": "book",
+ "items": [
+ {
+ "itemType": "conferencePaper",
+ "title": "Kumtesat nga konferenca shkencore ndërkombëtare: (17 dhe 18 nëntor 2021): Ndikimi i COVID-19 në humbjet mësimore - pasojat në rritjen e pabarazive në mësim dhe sfidat e përmbushjes/kompensimit",
+ "creators": [
+ {
+ "lastName": "Instituti Pedagogjik i Kosovës",
+ "firstName": "Konferenca shkencore ndërkombëtare",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Koliqi",
+ "firstName": "Hajrullah",
+ "creatorType": "editor"
+ }
+ ],
+ "date": "2021",
+ "ISBN": "9789951591560",
+ "libraryCatalog": "COBISS",
+ "pages": "190 f.",
+ "place": "Prishtinë",
+ "publisher": "Instituti Pedagogjik i Kosovës",
+ "shortTitle": "Kumtesat nga konferenca shkencore ndërkombëtare",
+ "url": "https://plus.cobiss.net/cobiss/ks/sq/bib/120263427",
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "mimeType": "application/pdf"
+ }
+ ],
+ "tags": [
+ {
+ "tag": "covid-19"
+ },
+ {
+ "tag": "mësimi online"
+ },
+ {
+ "tag": "përmbledhjet e punimeve"
+ },
+ {
+ "tag": "sistemet arsimore"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Përmbledhjet në gjuhën shqipe dhe angleze
"
+ },
+ {
+ "note": "Bibliografia në fund të çdo punimi
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/mk/en/bib/search?q=*&db=cobib&mat=allmaterials&tyf=1_gla_cd",
+ "items": "multiple"
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/mk/mk/bib/57036037",
+ "detectedItemType": "book",
+ "items": [
+ {
+ "itemType": "audioRecording",
+ "title": "Крени ме",
+ "creators": [
+ {
+ "lastName": "Кајшаров",
+ "firstName": "Константин",
+ "creatorType": "composer"
+ }
+ ],
+ "date": "2022",
+ "label": "К. Кајшаров",
+ "libraryCatalog": "COBISS",
+ "place": "Скопје",
+ "url": "https://plus.cobiss.net/cobiss/mk/mk/bib/57036037",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "CD-a"
+ },
+ {
+ "tag": "Вокално-инструментални композиции"
+ },
+ {
+ "tag": "Духовна музика"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/cg/cnr_cyrl/bib/20926212",
+ "detectedItemType": "book",
+ "items": [
+ {
+ "itemType": "thesis",
+ "title": "Menadžment ljudskih resursa: diplomski rad",
+ "creators": [
+ {
+ "lastName": "Obradović",
+ "firstName": "Nikoleta",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2022",
+ "libraryCatalog": "COBISS",
+ "place": "Podgorica",
+ "shortTitle": "Menadžment ljudskih resursa",
+ "university": "[N. Obradović]",
+ "url": "https://plus.cobiss.net/cobiss/cg/cnr_cyrl/bib/20926212",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Diplomski radovi"
+ },
+ {
+ "tag": "Menadžment ljudskih resursa"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Nasl. sa nasl. ekrana
"
+ },
+ {
+ "note": "Bibliografija
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/sr/sr_latn/bib/search?q=*&db=cobib&mat=allmaterials",
+ "items": "multiple"
+ },
+ {
+ "type": "web",
+ "url": "https://plus.cobiss.net/cobiss/sr/sr_latn/bib/15826441",
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Zanosni",
+ "creators": [
+ {
+ "lastName": "Prince",
+ "creatorType": "author",
+ "fieldMode": 1
+ },
+ {
+ "lastName": "Принс",
+ "creatorType": "author",
+ "fieldMode": 1
+ },
+ {
+ "lastName": "Božić",
+ "firstName": "Aleksandar",
+ "creatorType": "editor"
+ },
+ {
+ "lastName": "Божић",
+ "firstName": "Александар",
+ "creatorType": "editor"
+ }
+ ],
+ "date": "2022",
+ "ISBN": "9788664630160",
+ "libraryCatalog": "COBISS",
+ "numPages": "281",
+ "place": "Beograd",
+ "publisher": "IPC Media",
+ "series": "Edicija (B)io",
+ "url": "https://plus.cobiss.net/cobiss/sr/sr_latn/bib/15826441",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Аутобиографија"
+ },
+ {
+ "tag": "Принс, 1958-2016"
+ }
+ ],
+ "notes": [
+ {
+ "note": "Prevod dela: The beautiful ones / Prince
"
+ },
+ {
+ "note": "Autorove slike
"
+ },
+ {
+ "note": "Tiraž 1.000
"
+ },
+ {
+ "note": "Str. 4-49: Predgovor / Den Pajpenbring
"
+ },
+ {
+ "note": "O autorima: str. [282].
"
+ }
+ ],
+ "seeAlso": []
+ }
+ ]
+ }
+]
+/** END TEST CASES **/
diff --git a/Cairn.info.js b/Cairn.info.js
index 19aa2510b48..411382cc93a 100644
--- a/Cairn.info.js
+++ b/Cairn.info.js
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
- "lastUpdated": "2022-05-31 18:42:02"
+ "lastUpdated": "2023-10-23 08:08:57"
}
/*
@@ -80,11 +80,9 @@ function getSearchResults(doc, checkOnly) {
async function doWeb(doc, url) {
if (await detectWeb(doc, url) == 'multiple') {
let items = await Zotero.selectItems(getSearchResults(doc, false));
- if (items) {
- await Promise.all(
- Object.keys(items)
- .map(url => requestDocument(url).then(scrape))
- );
+ if (!items) return;
+ for (let url of Object.keys(items)) {
+ await scrape(await requestDocument(url));
}
}
else {
@@ -125,7 +123,7 @@ async function scrape(doc) {
if (pdfLink) {
item.attachments.push({
- url: pdfLink.href,
+ url: pdfLink,
title: 'Full Text PDF',
mimeType: 'application/pdf'
});
diff --git a/Camara Brasileira do Livro ISBN.js b/Camara Brasileira do Livro ISBN.js
new file mode 100644
index 00000000000..be20df316f8
--- /dev/null
+++ b/Camara Brasileira do Livro ISBN.js
@@ -0,0 +1,842 @@
+{
+ "translatorID": "cdb5c893-ab69-4e96-9b5c-f4456d49ddd8",
+ "label": "Câmara Brasileira do Livro ISBN",
+ "creator": "Abe Jellinek",
+ "target": "",
+ "minVersion": "5.0",
+ "maxVersion": "",
+ "priority": 98,
+ "inRepository": true,
+ "translatorType": 8,
+ "lastUpdated": "2023-09-26 16:11:18"
+}
+
+/*
+ ***** BEGIN LICENSE BLOCK *****
+
+ Copyright © 2023 Abe Jellinek
+
+ This file is part of Zotero.
+
+ Zotero is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Zotero is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with Zotero. If not, see .
+
+ ***** END LICENSE BLOCK *****
+*/
+
+function detectSearch(items) {
+ items = cleanData(items);
+ return !!items.length;
+}
+
+async function doSearch(items) {
+ items = cleanData(items);
+ for (let { ISBN } of items) {
+ let search = ISBN;
+ if (ISBN.length == 10) {
+ search += ' OR ' + ZU.toISBN13(ISBN);
+ }
+ let body = {
+ count: true,
+ facets: [],
+ filter: '',
+ orderby: null,
+ queryType: 'full',
+ search,
+ searchFields: 'FormattedKey,RowKey',
+ searchMode: 'any',
+ select: '*',
+ skip: 0,
+ top: 1
+ };
+ let response = await requestJSON('https://isbn-search-br.search.windows.net/indexes/isbn-index/docs/search?api-version=2016-09-01', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json; charset=UTF-8',
+ 'api-key': '100216A23C5AEE390338BBD19EA86D29',
+ Origin: 'https://www.cblservicos.org.br',
+ Referer: 'https://www.cblservicos.org.br/'
+ },
+ body: JSON.stringify(body)
+ });
+ let results = response.value;
+ for (let result of results) {
+ translateResult(result);
+ }
+ }
+}
+
+function translateResult(result) {
+ Z.debug(result)
+ let item = new Zotero.Item('book');
+ item.title = result.Title;
+ if (result.Subtitle && !item.title.includes(':') && !result.Subtitle.includes(':')) {
+ item.title += ': ' + result.Subtitle;
+ }
+ item.title = fixCase(item.title);
+ item.abstractNote = result.Sinopse;
+ item.series = fixCase(result.Colection);
+ // TODO: Need example data for:
+ // item.seriesNumber
+ // item.volume
+ // item.numberOfVolumes
+ item.edition = result.Edicao;
+ if (item.edition == '1') {
+ item.edition = '';
+ }
+ item.place = (result.Cidade || '') + (result.UF ? ', ' + result.UF : '');
+ item.publisher = fixCase(result.Imprint);
+ item.date = ZU.strToISO(result.Date);
+ item.numPages = result.Paginas;
+ if (item.numPages == '0') {
+ item.numPages = '';
+ }
+ item.language = (result.IdiomasObra && result.IdiomasObra[0]) || 'pt-BR';
+ if (item.language == 'português (Brasil)') {
+ item.language = 'pt-BR';
+ }
+ item.ISBN = ZU.cleanISBN(result.FormattedKey);
+ for (let [i, author] of result.Authors.entries()) {
+ if (author == author.toUpperCase()) {
+ author = ZU.capitalizeName(author);
+ }
+ let creatorType;
+ if (result.Profissoes && result.Profissoes.length === result.Authors.length) {
+ switch (result.Profissoes[i]) {
+ case 'Coordenador':
+ case 'Autor':
+ case 'Roteirista':
+ creatorType = 'author';
+ break;
+ case 'Revisor':
+ case 'Organizador':
+ case 'Editor':
+ creatorType = 'editor';
+ break;
+ case 'Tradutor':
+ creatorType = 'translator';
+ break;
+ case 'Ilustrador': // TODO: Used?
+ case 'Projeto Gráfico':
+ creatorType = 'illustrator';
+ break;
+ default:
+ // First creator is probably an author,
+ // even if the Profissoes string is something weird
+ creatorType = i == 0 ? 'author' : 'contributor';
+ break;
+ }
+ }
+ // No/mismatched-length Profissoes array, so we have to guess that this non-primary creator
+ // is a contributor
+ else if (i > 0) {
+ creatorType = 'contributor';
+ }
+ // No/mismatched-length Profissoes array, so we have to guess that this primary creator
+ // is an author
+ else {
+ creatorType = 'author';
+ }
+ // Brazilian names often contain many surnames, but determining which names are surnames
+ // and which are given names is outside the scope of this translator.
+ // Chicago indexes by the final element of the name alone, and so will we:
+ // https://en.wikipedia.org/wiki/Portuguese_name#Indexing
+ let creator = ZU.cleanAuthor(author, creatorType, author.includes(','));
+ if (!creator.firstName) creator.fieldMode = 1;
+
+ // That said, we will handle name suffixes, which should be combined with the last "middle"
+ // name particle in the last name
+ if (creator.firstName && creator.lastName
+ && ['filho', 'junior', 'neto', 'sobrinho', 'segundo', 'terceiro']
+ .includes(ZU.removeDiacritics(creator.lastName.toLowerCase()))) {
+ let firstNameSplit = creator.firstName.split(/\s+/);
+ if (firstNameSplit.length) {
+ let lastParticleFirstName = firstNameSplit[firstNameSplit.length - 1];
+ creator.lastName = lastParticleFirstName + ' ' + creator.lastName;
+ creator.firstName = firstNameSplit.slice(0, firstNameSplit.length - 1).join(' ');
+ }
+ }
+ item.creators.push(creator);
+ }
+ if (result.Subject) {
+ item.tags.push({ tag: result.Subject });
+ }
+ for (let tag of result.PalavrasChave) {
+ item.tags.push({ tag });
+ }
+ item.complete();
+}
+
+function fixCase(s) {
+ if (s && s == s.toUpperCase()) {
+ s = ZU.capitalizeTitle(s, true);
+ }
+ return s;
+}
+
+function cleanData(items) {
+ if (!Array.isArray(items)) {
+ items = [items];
+ }
+ return items
+ .map((item) => {
+ if (typeof item === 'string') {
+ item = { ISBN: item };
+ }
+ if (item.ISBN) {
+ item.ISBN = ZU.cleanISBN(item.ISBN);
+ }
+ return item;
+ })
+ .filter(item => item.ISBN && (
+ item.ISBN.startsWith('97865')
+ || item.ISBN.startsWith('65')
+ || item.ISBN.startsWith('97885')
+ || item.ISBN.startsWith('85')));
+}
+
+/** BEGIN TEST CASES **/
+var testCases = [
+ {
+ "type": "search",
+ "input": {
+ "ISBN": "9786599594755"
+ },
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Mercadores da Insegurança: conjuntura e riscos do hacking governamental no Brasil",
+ "creators": [
+ {
+ "firstName": "André",
+ "lastName": "Ramiro",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Pedro",
+ "lastName": "Amaral",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Mariana",
+ "lastName": "Canto",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Marcos César M.",
+ "lastName": "Pereira",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Raquel",
+ "lastName": "Saraiva",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Clara",
+ "lastName": "Guimarães",
+ "creatorType": "contributor"
+ }
+ ],
+ "date": "2022-10-11",
+ "ISBN": "9786599594755",
+ "abstractNote": "Em políticas públicas, o debate sobre como as técnicas de investigações criminais devem responder à digitalização das dinâmicas sociais tem se sobressaído e caminha em uma linha tênue entre otimização dos processos administrativos e possíveis transgressões em relação aos direitos fundamentais. Nesse sentido, técnicas de hacking governamental, ou seja, de superação de recursos de segurança em dispositivos pessoais, vem ganhando uma escalabilidade crescente e envolve a ampliação de fabricantes, revendedores e contratos com a administração pública, ao passo em que seus efeitos colaterais aos direitos fundamentais, sobretudo em relação à sociedade civil, vêm sendo denunciados internacionalmente.",
+ "language": "pt-BR",
+ "libraryCatalog": "Câmara Brasileira do Livro ISBN",
+ "place": "Recife, PE",
+ "publisher": "IP.rec",
+ "shortTitle": "Mercadores da Insegurança",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Digital"
+ },
+ {
+ "tag": "Direito"
+ },
+ {
+ "tag": "Governamental"
+ },
+ {
+ "tag": "Insegurança"
+ },
+ {
+ "tag": "dados"
+ },
+ {
+ "tag": "hacking"
+ },
+ {
+ "tag": "vazamento"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "search",
+ "input": {
+ "ISBN": "8532511015"
+ },
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Harry Potter E a Pedra Filosofal",
+ "creators": [
+ {
+ "firstName": "J. K.",
+ "lastName": "Rowling",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2000-05-29",
+ "ISBN": "9788532511010",
+ "language": "pt-BR",
+ "libraryCatalog": "Câmara Brasileira do Livro ISBN",
+ "publisher": "Rocco",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Biblioteconomia e ciência da informação"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "search",
+ "input": {
+ "ISBN": "9786555320275"
+ },
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Harry Potter e o Prisioneiro de Azkaban",
+ "creators": [
+ {
+ "firstName": "J. K.",
+ "lastName": "Rowling",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Lia",
+ "lastName": "Wyler",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Arch",
+ "lastName": "Apolar",
+ "creatorType": "contributor"
+ }
+ ],
+ "date": "2020-03-04",
+ "ISBN": "9786555320275",
+ "language": "pt-BR",
+ "libraryCatalog": "Câmara Brasileira do Livro ISBN",
+ "publisher": "Rocco",
+ "series": "Harry Potter",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Harry-Potter"
+ },
+ {
+ "tag": "Literatura infanto-juvenil"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "search",
+ "input": {
+ "ISBN": "9786587233956"
+ },
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Einstein Socialista: Entrevistas, manifestos e artigos do maior cientista do século XX",
+ "creators": [
+ {
+ "firstName": "Albert",
+ "lastName": "Einstein",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Hugo",
+ "lastName": "Albuquerque",
+ "creatorType": "editor"
+ },
+ {
+ "firstName": "Lígia Magalhães",
+ "lastName": "Marinho",
+ "creatorType": "translator"
+ }
+ ],
+ "date": "2023-04-12",
+ "ISBN": "9786587233956",
+ "abstractNote": "Por serem supostamente purgadas da “ideologia”, as ciências exatas alcançaram entre nós um status de demasiada confiabilidade, objetividade e verdade, Entretanto, Albert Einstein, o maior físico do século XX, não compactuava com essa crença e defendia abertamente os valores socialistas, colocando a própria narrativa cientificista, quase sempre favorável à ordem capitalista, em curto-circuito.\n\nEinstein era um militante e não se calou diante das falaciosas equiparações entre a Alemanha Nazista e a União Soviética. Nem se calou, como judeu, diante das violências cometidas contra os palestinos, pouco depois do Holocausto, pelos colonos judeus no nascente Estado de Israel. Tampouco poupou críticas à segregação racial nos Estados Unidos, onde foi lecionar em seus últimos anos.\n\nQuando a Guerra Fria estava a todo vapor, Einstein escreveu “Por que o Socialismo?” –, um de seus artigos mais conhecidos sobre política e frequentemente esquecido e dissociado de sua imagem. Não à toa, este texto, vez ou outra, é apresentado como “novidade” e não cansa de surpreender geração após geração. E que não se diga que era uma forma atenuada de socialismo que Einstein estava falando:\n\n“Numa economia planificada, em que a produção é ajustada às necessidades da comunidade, o trabalho a ser feito seria distribuído entre todas as pessoas aptas ao trabalho e garantiria condições de vida a todo homem, mulher e criança.”\n\nOu mesmo que, especificamente sobre a Revolução Russa, ele tenha confessado a Viereck que: \n\n“O bolchevismo é uma experiência extraordinária. Não é impossível que a deriva da evolução social daqui para a frente seja em direção ao comunismo. O experimento bolchevista talvez valha a pena.”\n\nCom uma certa dose de utopismo e um enorme enigma de como o socialismo pode ser alcançado e mantido, Einstein Socialista nos apresenta uma série de artigos, entrevistas e manifestos que revelam um lado muitas vezes negligenciado e “esquecido” de um dos maiores cientistas do mundo.",
+ "language": "pt-BR",
+ "libraryCatalog": "Câmara Brasileira do Livro ISBN",
+ "numPages": "96",
+ "place": "São Paulo, SP",
+ "publisher": "Autonomia Literaria",
+ "shortTitle": "Einstein Socialista",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Ciências sociais"
+ },
+ {
+ "tag": "einstein"
+ },
+ {
+ "tag": "nazismo"
+ },
+ {
+ "tag": "relatividade"
+ },
+ {
+ "tag": "socialismo"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "search",
+ "input": {
+ "ISBN": "9788565053082"
+ },
+ "items": [
+ {
+ "itemType": "book",
+ "title": "State of the Art in Health and Knowledge",
+ "creators": [
+ {
+ "firstName": "Sociedade Beneficente Israelita Brasileira Albert",
+ "lastName": "Einstein",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Juliana",
+ "lastName": "Samel",
+ "creatorType": "translator"
+ }
+ ],
+ "date": "2023-02-02",
+ "ISBN": "9788565053082",
+ "abstractNote": "The book presents the Albert Einstein Teaching and Research Center - Campus Cecilia and Abram Szajman, an architectural work in the city of São Paulo, created to be one of the most advanced teaching and research centers in the world. Students and researchers interact in this building to generate knowledge, with the aim of boosting Brazilian research and all this in an environment integrated with greenery, with the use of natural light and renewable energy technology.",
+ "language": "Inglês (EUA)",
+ "libraryCatalog": "Câmara Brasileira do Livro ISBN",
+ "numPages": "58",
+ "place": "São Paulo, SP",
+ "publisher": "Sociedade Beneficente Israelita Brasileira Albert Einstein",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Arquitetura"
+ },
+ {
+ "tag": "Landscaping"
+ },
+ {
+ "tag": "architecture"
+ },
+ {
+ "tag": "health"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "search",
+ "input": {
+ "ISBN": "9786580341221"
+ },
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Filipson: Memórias de uma menina na primeira colônia judaica no Rio Grande do Sul (1904-1920)",
+ "creators": [
+ {
+ "firstName": "Frida",
+ "lastName": "Alexandr",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Regina",
+ "lastName": "Zilberman",
+ "creatorType": "contributor"
+ }
+ ],
+ "date": "2023-05-11",
+ "ISBN": "9786580341221",
+ "abstractNote": "“Já ouviram falar de Filipson? Um nome esquisito. Nem parece brasileiro. Mas, dentro do Brasil imenso, constituía um pontinho minúsculo que ficava lá nas bandas do Sul, perdido no meio de diversas colônias prósperas compostas em sua maioria de imigrantes espanhóis, italianos e alemães e uma ou outra fazenda de brasileiros.”\n\nDesde a primeira linha, Frida Alexandr surpreende o leitor, interpelando-o com uma pergunta. Mesmo em 1967, quando suas memórias foram publicadas em edição restrita, provavelmente poucos responderiam afirmativamente à sua questão.\n\nFilipson foi a primeira colônia judaica oficial do Brasil, formada por imigrantes judeus provenientes da Bessarábia (na região onde atualmente se localiza a Moldávia). Os pais e irmãos mais velhos de Frida chegaram ao Brasil com o grupo pioneiro, em 1904, e em \"Filipson: memórias de uma menina na primeira colônia judaica no Rio Grande do Sul (1904-1920)\". Frida deixa um registro que vai dos primeiros dias da colônia à melancólica despedida, em 1920, quando sua família decide partir novamente.\n\nEntre os dois pontos, desliza a memória de Frida, que organiza os fatos sem a preocupação de ordená-los no tempo. O importante é como essas cenas — que envolvem seus familiares, sua passagem pela escola, as dificuldades financeiras da família, as ameaças representadas por uma natureza nem sempre hospitaleira — repercutem em sua sensibilidade. Frida se vale da linguagem para transmitir a emoção na forma como a vivenciou.\n\n\"Filipson\", com posfácio da pesquisadora e escritora Regina Zilberman, é um testemunho de uma etapa do processo de adaptação e preservação dos judeus do leste da Europa no Brasil. Mas esse caráter documental é acompanhado pela recuperação sensível daqueles momentos fundadores, como se a autora, à maneira de Proust, fosse em busca das vivências daquele tempo, para transmiti-lo a um leitor que pouco conhece sobre o período.",
+ "language": "pt-BR",
+ "libraryCatalog": "Câmara Brasileira do Livro ISBN",
+ "numPages": "360",
+ "place": "SÃO PAULO, SP",
+ "publisher": "Chão Editora",
+ "shortTitle": "Filipson",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Biografias"
+ },
+ {
+ "tag": "judeus"
+ },
+ {
+ "tag": "memórias"
+ },
+ {
+ "tag": "mulheres"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "search",
+ "input": {
+ "ISBN": "9786555250053"
+ },
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Ilíada = Ἰλιάς",
+ "creators": [
+ {
+ "firstName": "",
+ "lastName": "Homero",
+ "creatorType": "author",
+ "fieldMode": 1
+ },
+ {
+ "firstName": "Trajano",
+ "lastName": "Vieira",
+ "creatorType": "translator"
+ }
+ ],
+ "date": "2020-03-23",
+ "ISBN": "9786555250053",
+ "abstractNote": "Composta no século VIII a.C., a Ilíada é considerada o marco inaugural da literatura ocidental. Tradicionalmente atribuída a Homero, a obra aborda o período de algumas semanas no último ano da Guerra de Troia, durante o cerco final dos contingentes gregos à cidadela do rei Príamo, na Ásia Menor. Com seus mais de 15 mil versos, a Ilíada ganha agora uma nova tradução — das mãos de Trajano Vieira, professor livre-docente da Unicamp e premiado tradutor da Odisseia —, rigorosamente metrificada, que busca recriar em nossa língua a excelência do original, com seus símiles e invenções vocabulares. A presente edição, bilíngue, traz ainda uma série de aparatos, como um índice onomástico completo, um posfácio do tradutor, excertos da crítica, e o célebre ensaio de Simone Weil, “A Ilíada ou o poema da força”.",
+ "language": "pt-BR",
+ "libraryCatalog": "Câmara Brasileira do Livro ISBN",
+ "numPages": "1048",
+ "place": "São Paulo, SP",
+ "publisher": "Editora 34",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Literatura grega"
+ },
+ {
+ "tag": "Literatura."
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "search",
+ "input": {
+ "ISBN": "9786556752631"
+ },
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Manual de Sentença Trabalhista: Compreendendo a técnica da setença trabalhista para concurso",
+ "creators": [
+ {
+ "firstName": "Aline",
+ "lastName": "Leporaci",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Adriana Leandro de Sousa",
+ "lastName": "Freitas",
+ "creatorType": "contributor"
+ }
+ ],
+ "date": "2023-03-02",
+ "ISBN": "9786556752631",
+ "abstractNote": "Nesse livro sobre sentença trabalhista, fase tão concorrida do concurso para a Magistratura do Trabalho, procuramos trazer os aspectos mais importantes a serem observados pelo candidato. O leitor poderá verificar a ordem de julgamento a seguir e a importância da fixação da prejudicialidade entre as matérias a serem analisadas. Além disso, também aprenderá as técnicas de distribuição do ônus da prova, e suas diversas teorias, sempre ressaltando qual deva ser de aplicação preferencial pelo candidato. O livro traz diversos aspectos teóricos, que são essenciais para a preparação de todos os interessados em efetivamente aprender a técnica da elaboração da sentença trabalhista, sempre com leitura fácil e direta. E não nos esquecemos dos aspectos práticos, pois o leitor terá exercícios de fixação de jornada de trabalho, e sentenças inéditas elaboradas pelas Autoras, com os respectivos gabaritos e sugestão de redação.",
+ "edition": "2",
+ "language": "pt-BR",
+ "libraryCatalog": "Câmara Brasileira do Livro ISBN",
+ "numPages": "232",
+ "place": "Rio de Janeiro, RJ",
+ "publisher": "Freitas Bastos Editora",
+ "shortTitle": "Manual de Sentença Trabalhista",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Direito"
+ },
+ {
+ "tag": "Elaboração"
+ },
+ {
+ "tag": "Jornada"
+ },
+ {
+ "tag": "Magistratura"
+ },
+ {
+ "tag": "Trabalhista"
+ },
+ {
+ "tag": "Trabalho"
+ },
+ {
+ "tag": "Técnica"
+ },
+ {
+ "tag": "concurso"
+ },
+ {
+ "tag": "juiz"
+ },
+ {
+ "tag": "modelos"
+ },
+ {
+ "tag": "sentença"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "search",
+ "input": {
+ "ISBN": "9786559602513"
+ },
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Batman",
+ "creators": [
+ {
+ "firstName": "John",
+ "lastName": "Ridley",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "James Tynion",
+ "lastName": "IV",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Dandara",
+ "lastName": "Palankof",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Pedro",
+ "lastName": "Catarino",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Travel",
+ "lastName": "Foreman",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Riccardo",
+ "lastName": "Federici",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Jorge",
+ "lastName": "Jimenez",
+ "creatorType": "contributor"
+ }
+ ],
+ "date": "2022-03-11",
+ "ISBN": "9786559602513",
+ "abstractNote": "Aventuras do Batman",
+ "language": "pt-BR",
+ "libraryCatalog": "Câmara Brasileira do Livro ISBN",
+ "numPages": "100",
+ "place": "Barueri, SP",
+ "publisher": "Panini Comics",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Cartoons; caricaturas e quadrinhos"
+ },
+ {
+ "tag": "quadrinhos"
+ },
+ {
+ "tag": "super-herois"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "search",
+ "input": {
+ "ISBN": "9786559605101"
+ },
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Superman",
+ "creators": [
+ {
+ "firstName": "Sean",
+ "lastName": "Lewis",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Phillip Kennedy",
+ "lastName": "Johnson",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Gabriel",
+ "lastName": "Faria",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Rodrigo",
+ "lastName": "Barros",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Sami",
+ "lastName": "Basri",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Phil",
+ "lastName": "Hester",
+ "creatorType": "contributor"
+ },
+ {
+ "firstName": "Daniel",
+ "lastName": "Sampere",
+ "creatorType": "contributor"
+ }
+ ],
+ "date": "2022-03-10",
+ "ISBN": "9786559605101",
+ "abstractNote": "Aventuras do Superman",
+ "language": "pt-BR",
+ "libraryCatalog": "Câmara Brasileira do Livro ISBN",
+ "numPages": "100",
+ "place": "Barueri, SP",
+ "publisher": "Panini Comics",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Cartoons; caricaturas e quadrinhos"
+ },
+ {
+ "tag": "quadrinhos"
+ },
+ {
+ "tag": "super-herois"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "search",
+ "input": {
+ "ISBN": "8576664984"
+ },
+ "items": [
+ {
+ "itemType": "book",
+ "title": "A Religião Nos Limites Da Simples Razão",
+ "creators": [],
+ "date": "2006-01-02",
+ "ISBN": "9788576664987",
+ "language": "pt-BR",
+ "libraryCatalog": "Câmara Brasileira do Livro ISBN",
+ "publisher": "Escala Educacional",
+ "series": "Série Filosofar",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Literatura"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "search",
+ "input": {
+ "ISBN": "9788591597512"
+ },
+ "items": [
+ {
+ "itemType": "book",
+ "title": "Visões da áfrica: angola e moçambiqueJorge Alves de Lima Filho",
+ "creators": [
+ {
+ "firstName": "Jorge Alves de",
+ "lastName": "Lima Filho",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2015-09-29",
+ "ISBN": "9788591597512",
+ "language": "pt-BR",
+ "libraryCatalog": "Câmara Brasileira do Livro ISBN",
+ "publisher": "Jorge Alves de Lima Filho",
+ "shortTitle": "Visões da áfrica",
+ "attachments": [],
+ "tags": [
+ {
+ "tag": "Coleções de obras diversas sem assunto específico"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ }
+]
+/** END TEST CASES **/
diff --git a/Cambridge Engage Preprints.js b/Cambridge Engage Preprints.js
index 82c29cb314a..f2127e9338b 100644
--- a/Cambridge Engage Preprints.js
+++ b/Cambridge Engage Preprints.js
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
- "lastUpdated": "2022-12-08 18:55:55"
+ "lastUpdated": "2023-10-23 08:35:07"
}
/*
@@ -52,7 +52,7 @@ function detectWeb(doc, url) {
function getSearchResults(doc, checkOnly) {
var items = {};
var found = false;
- var rows = doc.querySelectorAll('.MatchResult > a');
+ var rows = doc.querySelectorAll('.MatchResult article a');
for (let row of rows) {
let href = row.href;
@@ -68,11 +68,9 @@ function getSearchResults(doc, checkOnly) {
async function doWeb(doc, url) {
if (detectWeb(doc, url) == 'multiple') {
let items = await Zotero.selectItems(getSearchResults(doc, false));
- if (items) {
- await Promise.all(
- Object.keys(items)
- .map(url => requestDocument(url).then(scrape))
- );
+ if (!items) return;
+ for (let url of Object.keys(items)) {
+ await scrape(await requestDocument(url));
}
}
else {
@@ -89,6 +87,9 @@ async function scrape(doc, url = doc.location.href) {
translator.setHandler('itemDone', (_obj, item) => {
item.publisher = attr(doc, 'meta[property="og:site_name"]', 'content');
item.libraryCatalog = "Cambridge Engage Preprints";
+ if (item.date) {
+ item.date = ZU.strToISO(item.date);
+ }
item.complete();
});
@@ -102,6 +103,7 @@ var testCases = [
{
"type": "web",
"url": "https://chemrxiv.org/engage/chemrxiv/search-dashboard?text=acid",
+ "defer": true,
"items": "multiple"
},
{
@@ -123,7 +125,7 @@ var testCases = [
"creatorType": "author"
}
],
- "date": "2021/10/08",
+ "date": "2021-10-08",
"DOI": "10.26434/chemrxiv-2021-mjpkz",
"abstractNote": "Conversion of readily available feedstocks to valuable platform chemicals via a sustainable catalytic pathway has always been one of the key focuses of synthetic chemists. Cheaper, less toxic, and more abundant base metals as a catalyst for performing such transformations provide an additional boost. In this context, herein, we report a reformation of readily available feedstock, ethylene glycol, to value-added platform molecules, glycolic acid, and lactic acid. A bench stable base metal complex {[HN(C2H4PPh2)2]Mn(CO)2Br}, Mn-I, known as Mn-PhMACHO, catalyzed the reformation of ethylene glycol to glycolic acid at 140 oC in high selectivity with a turnover number TON = 2400, surpassing previously used homogeneous catalysts for such a reaction. Pure hydrogen gas is evolved without the need for an acceptor. On the other hand, a bench stable Mn(I)-complex, {(iPrPN5P)Mn(CO)2Br}, Mn-III, with a triazine backbone, efficiently catalyzed the acceptorless dehydrogenative coupling of ethylene glycol and methanol for the synthesis of lactic acid, even at a ppm level of catalyst loading, reaching the TON of 11,500. Detailed mechanistic studies were performed to elucidate the involvements of different manganese(I)-species during the catalysis.",
"language": "en",
@@ -180,7 +182,7 @@ var testCases = [
"creatorType": "author"
}
],
- "date": "2019/10/02",
+ "date": "2019-10-03",
"DOI": "10.33774/apsa-2019-if2he-v2",
"abstractNote": "The discipline of political science has been engaged in discussion about when, why, and how to make scholarship more transparent for at least three decades. This piece argues that qualitative researchers can achieve transparency in diverse ways, using techniques and strategies that allow them to balance and optimize among competing considerations that affect the pursuit of transparency.. We begin by considering the “state of the debate,” briefly outlining the contours of the scholarship on transparency in political and other social sciences, which so far has focussed mostly on questions of “whether” and “what” to share. We investigate competing considerations that researchers have to consider when working towards transparent research. The heart of the piece considers various strategies, illustrated by exemplary applications, for making qualitative research more transparent.",
"language": "en",
@@ -238,7 +240,7 @@ var testCases = [
"creatorType": "author"
}
],
- "date": "2021/07/20",
+ "date": "2021-07-20",
"DOI": "10.33774/miir-2021-7cdx1",
"abstractNote": "This report addresses the construction of carbon fibre wing boxes and the problems associated with using carbon fibre sheets rather than individual carbon fibre tapes. In the case that the wing boxes are developable surfaces the lay up of carbon fibre sheets is straightforward, since the fibres can follow the contours of the surface without any need for shearing or extension of the fibres. To further expand the potential design space for the wing boxes, this report investigates the lay up of sheets over non-developable surfaces where some shearing of the sheet is required to achieve the desired results. In this report, three analytical approaches are considered, driven by the results from numerical studies on different surface geometries. Each of the approaches offers insights as to the type of geometric perturbations achievable when constrained by a maximum shear angle.",
"language": "en",
diff --git a/Climate Change and Human Health Literature Portal.js b/Climate Change and Human Health Literature Portal.js
index 3ee89a2bcd6..ed4b318fe43 100644
--- a/Climate Change and Human Health Literature Portal.js
+++ b/Climate Change and Human Health Literature Portal.js
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
- "lastUpdated": "2022-11-10 02:47:43"
+ "lastUpdated": "2023-08-22 04:14:33"
}
/*
@@ -40,9 +40,16 @@ function detectWeb(doc, url) {
if (url.includes('/index.cfm/detail/')) {
return 'journalArticle';
}
- else if (getSearchResults(doc, true)) {
+
+ let appRoot = doc.querySelector("#app"); // Ajax app "mount point"
+ if (appRoot) {
+ // Watch for live filtering of search results)
+ Z.monitorDOMChanges(appRoot);
+ }
+ if (getSearchResults(doc, true)) {
return 'multiple';
}
+
return false;
}
@@ -64,11 +71,9 @@ function getSearchResults(doc, checkOnly) {
async function doWeb(doc, url) {
if (detectWeb(doc, url) == 'multiple') {
let items = await Zotero.selectItems(getSearchResults(doc, false));
- if (items) {
- await Promise.all(
- Object.keys(items)
- .map(url => requestDocument(url).then(scrape))
- );
+ if (!items) return;
+ for (let url of Object.keys(items)) {
+ await scrape(await requestDocument(url));
}
}
else {
@@ -76,7 +81,7 @@ async function doWeb(doc, url) {
}
}
-function scrape(doc) {
+async function scrape(doc) {
var pmid = text(doc, 'li>a[href*="www.ncbi.nlm.nih.gov/pubmed"]');
var doi = text(doc, 'li>a[href*="doi.org/10."]');
var abstract = text(doc, '#cchh-detail-abstract');
@@ -185,6 +190,7 @@ var testCases = [
{
"type": "web",
"url": "https://tools.niehs.nih.gov/cchhl/index.cfm/main/search#/params?searchTerm=heat%20pump&selectedFacets=&selectedResults=",
+ "defer": true,
"items": "multiple"
},
{
diff --git a/DOI Content Negotiation.js b/DOI Content Negotiation.js
index 2a83e024012..fa4e9a090b8 100644
--- a/DOI Content Negotiation.js
+++ b/DOI Content Negotiation.js
@@ -3,13 +3,12 @@
"label": "DOI Content Negotiation",
"creator": "Sebastian Karcher",
"target": "",
- "minVersion": "4.0.29.11",
+ "minVersion": "5.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 8,
- "browserSupport": "gcs",
- "lastUpdated": "2020-04-20 20:04:00"
+ "lastUpdated": "2023-09-22 09:54:11"
}
/*
@@ -58,145 +57,255 @@ function filterQuery(items) {
return dois;
}
-function doSearch(items) {
- var dois = filterQuery(items);
- if (!dois.length) return;
- processDOIs(dois);
+async function doSearch(items) {
+ for (let doi of filterQuery(items)) {
+ await processDOI(doi);
+ }
}
-function processDOIs(dois) {
- var doi = dois.pop();
+async function processDOI(doi) {
+ let response = await requestText(
+ `https://doi.org/${encodeURIComponent(doi)}`,
+ { headers: { Accept: "application/vnd.datacite.datacite+json, application/vnd.crossref.unixref+xml, application/vnd.citationstyles.csl+json" } }
+ );
// by content negotiation we asked for datacite or crossref format, or CSL JSON
- ZU.doGet('https://doi.org/' + encodeURIComponent(doi), function (text) {
- if (!text) {
- return;
- }
- Z.debug(text);
-
- var trans = Zotero.loadTranslator('import');
- trans.setString(text);
- if (text.includes("Other\nLe code est accompagné de commentaires de F. A. Vogel, qui signe l'épitre dédicatoireOther
\nReliure 18è siècleOther
\nEx-libris manuscrit \"Ex libris Dufour\""
+ ]
+ }
+ ]
+ },
+ {
+ "type": "search",
+ "input": {
+ "DOI": "10.7336/academicus.2014.09.05"
},
- {
- "firstName": "",
- "lastName": "Université De Lorraine-Direction De La Documentation Et De L'Edition",
- "creatorType": "contributor"
- }
- ],
- "tags": [
- "Droit"
- ],
- "relations": [],
- "attachments": [],
- "notes": [
- "Other
\nLe code est accompagné de commentaires de F. A. Vogel, qui signe l'épitre dédicatoireOther
\nReliure 18è siècleOther
\nEx-libris manuscrit \"Ex libris Dufour\""
+ "items": [
+ {
+ "itemType": "journalArticle",
+ "title": "Second world war, communism and post-communism in Albania, an equilateral triangle of a tragic trans-Adriatic story. The Eftimiadi’s Saga",
+ "creators": [
+ {
+ "firstName": "Muner",
+ "lastName": "Paolo",
+ "creatorType": "author"
+ }
+ ],
+ "date": "01/2014",
+ "DOI": "10.7336/academicus.2014.09.05",
+ "ISSN": "20793715",
+ "accessDate": "2019-02-02T03:28:48Z",
+ "libraryCatalog": "DOI.org (Crossref)",
+ "pages": "69-78",
+ "publicationTitle": "Academicus International Scientific Journal",
+ "relations": [],
+ "url": "http://academicus.edu.al/?subpage=volumes&nr=9",
+ "volume": "9",
+ "attachments": [],
+ "tags": [],
+ "notes": []
+ }
]
- }]
-},
-{
- "type": "search",
- "input": {
- "DOI": "10.7336/academicus.2014.09.05"
},
- "items": [{
- "itemType": "journalArticle",
- "url": "http://academicus.edu.al/?subpage=volumes&nr=9",
- "volume": "9",
- "pages": "69-78",
- "publicationTitle": "Academicus International Scientific Journal",
- "ISSN": "20793715",
- "date": "01/2014",
- "DOI": "10.7336/academicus.2014.09.05",
- "accessDate": "2019-02-02T03:28:48Z",
- "libraryCatalog": "DOI.org (Crossref)",
- "title": "Second world war, communism and post-communism in Albania, an equilateral triangle of a tragic trans-Adriatic story. The Eftimiadi’s Saga",
- "creators": [{
- "firstName": "Muner",
- "lastName": "Paolo",
- "creatorType": "author"
- }],
- "tags": [],
- "relations": [],
- "attachments": [],
- "notes": []
- }]
-}
+ {
+ "type": "search",
+ "input": [
+ {
+ "DOI": "10.5555/12345678"
+ },
+ {
+ "DOI": "10.1109/TPS.1987.4316723"
+ },
+ {
+ "DOI": "10.5555/666655554444"
+ }
+ ],
+ "items": [
+ {
+ "itemType": "journalArticle",
+ "title": "Toward a Unified Theory of High-Energy Metaphysics: Silly String Theory",
+ "creators": [
+ {
+ "creatorType": "author",
+ "firstName": "Josiah",
+ "lastName": "Carberry"
+ },
+ {
+ "creatorType": "contributor",
+ "fieldMode": 1,
+ "lastName": "Friends of Josiah Carberry"
+ }
+ ],
+ "date": "2008-08-14",
+ "DOI": "10.5555/12345678",
+ "ISSN": "0264-3561",
+ "abstractNote": "The characteristic theme of the works of Stone is the bridge between culture and society. Several narratives concerning the fatal !aw, and subsequent dialectic, of semioticist class may be found. Thus, Debord uses the term ‘the subtextual paradigm of consensus’ to denote a cultural paradox. The subject is interpolated into a neocultural discourse that includes sexuality as a totality. But Marx’s critique of prepatriarchialist nihilism states that consciousness is capable of signi\"cance. The main theme of Dietrich’s[1]model of cultural discourse is not construction, but neoconstruction. Thus, any number of narratives concerning the textual paradigm of narrative exist. Pretextual cultural theory suggests that context must come from the collective unconscious.",
+ "issue": "11",
+ "journalAbbreviation": "Journal of Psychoceramics",
+ "language": "en",
+ "libraryCatalog": "DOI.org (Crossref)",
+ "pages": "1-3",
+ "publicationTitle": "Journal of Psychoceramics",
+ "shortTitle": "Toward a Unified Theory of High-Energy Metaphysics",
+ "url": "https://ojs33.crossref.publicknowledgeproject.org/index.php/test/article/view/2",
+ "volume": "5",
+ "attachments": [],
+ "tags": [],
+ "notes": [],
+ "seeAlso": []
+ },
+ {
+ "itemType": "journalArticle",
+ "title": "Bulk and Surface Plasmons in Artificially Structured Materials",
+ "creators": [
+ {
+ "creatorType": "author",
+ "firstName": "John J.",
+ "lastName": "Quinn"
+ },
+ {
+ "creatorType": "author",
+ "firstName": "Josiah S.",
+ "lastName": "Carberry"
+ }
+ ],
+ "date": "1987",
+ "DOI": "10.1109/TPS.1987.4316723",
+ "ISSN": "0093-3813",
+ "issue": "4",
+ "journalAbbreviation": "IEEE Trans. Plasma Sci.",
+ "libraryCatalog": "DOI.org (Crossref)",
+ "pages": "394-410",
+ "publicationTitle": "IEEE Transactions on Plasma Science",
+ "url": "http://ieeexplore.ieee.org/document/4316723/",
+ "volume": "15",
+ "attachments": [],
+ "tags": [],
+ "notes": [],
+ "seeAlso": []
+ },
+ {
+ "itemType": "journalArticle",
+ "title": "The Memory Bus Considered Harmful",
+ "creators": [
+ {
+ "creatorType": "author",
+ "firstName": "Josiah",
+ "lastName": "Carberry"
+ }
+ ],
+ "date": "2012-10-11",
+ "DOI": "10.5555/666655554444",
+ "ISSN": "0264-3561",
+ "issue": "11",
+ "journalAbbreviation": "Journal of Psychoceramics",
+ "language": "en",
+ "libraryCatalog": "DOI.org (Crossref)",
+ "pages": "1-3",
+ "publicationTitle": "Journal of Psychoceramics",
+ "url": "https://ojs33.crossref.publicknowledgeproject.org/index.php/test/article/view/8",
+ "volume": "9",
+ "attachments": [],
+ "tags": [],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ }
]
/** END TEST CASES **/
diff --git a/DOI.js b/DOI.js
index dba25c54a0d..1637c397de5 100644
--- a/DOI.js
+++ b/DOI.js
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
- "lastUpdated": "2023-03-12 01:46:07"
+ "lastUpdated": "2023-10-18 11:11:59"
}
/*
@@ -151,7 +151,7 @@ function detectWeb(doc, url) {
return "journalArticle"; // A decent guess
}
-function retrieveDOIs(doiOrDOIs) {
+async function retrieveDOIs(doiOrDOIs) {
let showSelect = Array.isArray(doiOrDOIs);
let dois = showSelect ? doiOrDOIs : [doiOrDOIs];
let items = {};
@@ -214,14 +214,14 @@ function retrieveDOIs(doiOrDOIs) {
// Don't throw on error
translate.setHandler("error", function () {});
- translate.translate();
+ await translate.translate();
}
}
-function doWeb(doc, url) {
+async function doWeb(doc, url) {
let doiOrDOIs = getDOIs(doc, url);
Z.debug(doiOrDOIs);
- retrieveDOIs(doiOrDOIs);
+ await retrieveDOIs(doiOrDOIs);
}
/** BEGIN TEST CASES **/
diff --git a/DSpace Intermediate Metadata.js b/DSpace Intermediate Metadata.js
new file mode 100644
index 00000000000..3f02ce18f3c
--- /dev/null
+++ b/DSpace Intermediate Metadata.js
@@ -0,0 +1,208 @@
+{
+ "translatorID": "2c05e2d1-a533-448f-aa20-e919584864cb",
+ "label": "DSpace Intermediate Metadata",
+ "creator": "Sebastian Karcher",
+ "target": "xml",
+ "minVersion": "5.0",
+ "maxVersion": "",
+ "priority": 100,
+ "inRepository": true,
+ "translatorType": 1,
+ "lastUpdated": "2022-12-24 19:29:02"
+}
+
+/*
+ ***** BEGIN LICENSE BLOCK *****
+
+ Copyright © 2022 Sebastian Karcher
+
+ This file is part of Zotero.
+
+ Zotero is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Zotero is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with Zotero. If not, see .
+
+ ***** END LICENSE BLOCK *****
+*/
+
+function detectImport() {
+ var text = Zotero.read(1000);
+ return text.includes("http://www.dspace.org/xmlns/dspace/dim");
+}
+
+function getType(string) {
+ string = string.toLowerCase();
+ if (string.includes("book_section") || string.includes("chapter")) {
+ return "bookSection";
+ }
+ else if (string.includes("book") || string.includes("monograph")) {
+ return "book";
+ }
+ else if (string.includes("report")) {
+ return "report";
+ }
+ else if (string.includes("proceedings") || string.includes("conference")) {
+ return "conferencePaper";
+ }
+ else {
+ return "journalArticle"; // default -- most of the catalog
+ }
+}
+function doImport() {
+ var xml = Zotero.getXML();
+ var ns = {
+ dim: 'http://www.dspace.org/xmlns/dspace/dim',
+ mets: 'http://www.loc.gov/METS/',
+ xlink: 'http://www.w3.org/TR/xlink/'
+ };
+
+ let type = ZU.xpathText(xml, '//dim:field[@element="type"]', ns);
+ var item = new Zotero.Item("journalArticle");
+ if (type) {
+ item.itemType = getType(type);
+ }
+
+ item.title = ZU.trimInternal(ZU.xpathText(xml, '//dim:field[@element="title"]', ns));
+ let abstract = ZU.xpath(xml, '//dim:field[@qualifier="abstract"]', ns);
+ if (abstract.length) {
+ item.abstractNote = abstract[0].textContent;
+ }
+ item.date = ZU.xpathText(xml, '//dim:field[@element="date" and @qualifier="issued"]', ns);
+ item.language = ZU.xpathText(xml, '//dim:field[@element="language"]', ns);
+ item.issue = ZU.xpathText(xml, '//dim:field[@element="bibliographicCitation" and @qualifier="issue"]', ns);
+ item.volume = ZU.xpathText(xml, '//dim:field[@element="bibliographicCitation" and @qualifier="volume"]', ns);
+ item.publicationTitle = ZU.xpathText(xml, '//dim:field[@element="title" and @qualifier="parent"]', ns);
+ if (!item.publicationTitle) {
+ item.publicationTitle = ZU.xpathText(xml, '//dim:field[@element="bibliographicCitation" and @qualifier="title"]', ns);
+ }
+ item.conferenceName = ZU.xpathText(xml, '//dim:field[@element="bibliographicCitation" and @qualifier="conferencename"]', ns);
+ item.publisher = ZU.xpathText(xml, '//dim:field[@element="publisher" and not(@qualifier="place")]', ns);
+ item.place = ZU.xpathText(xml, '//dim:field[@element="publisher" and @qualifier="place"]', ns);
+ item.series = ZU.xpathText(xml, '//dim:field[@element="relation" and @qualifier="ispartofseries"]', ns);
+ item.ISSN = ZU.xpathText(xml, '//dim:field[@element="identifier" and @qualifier="issn"]', ns);
+ let pages = ZU.xpathText(xml, '//dim:field[@element="format" and @qualifier="pagerange"]', ns);
+ if (pages) {
+ item.pages = pages.replace(/pp?\./i, "");
+ }
+ else if (ZU.xpathText(xml, '//dim:field[@element="bibliographicCitation" and @qualifier="stpage"]', ns)) {
+ item.pages = ZU.xpathText(xml, '//dim:field[@element="bibliographicCitation" and @qualifier="stpage"]', ns)
+ + "-" + ZU.xpathText(xml, '//dim:field[@element="bibliographicCitation" and @qualifier="endpage"]', ns);
+ }
+ let numPages = ZU.xpathText(xml, '//dim:field[@element="format" and @qualifier="pages"]', ns);
+ if (numPages) {
+ item.numPages = numPages.replace(/pp?\.?/i, "");
+ }
+ item.url = ZU.xpathText(xml, '//dim:field[@element="identifier" and @qualifier="uri"]', ns); // using the handle
+
+ let authors = ZU.xpath(xml, '//dim:field[@element="contributor" and @qualifier="author"]', ns);
+ for (let author of authors) {
+ item.creators.push(ZU.cleanAuthor(author.textContent, "author", true));
+ }
+
+ let tags = ZU.xpath(xml, '//dim:field[@element="subject"]', ns);
+ for (let tag of tags) {
+ item.tags.push(tag.textContent);
+ }
+ // getting only the first PDF
+ let pdfURL = ZU.xpathText(xml, '//mets:file[@MIMETYPE="application/pdf"][1]/mets:FLocat/@xlink:href', ns);
+ if (pdfURL) {
+ item.attachments.push({ url: pdfURL, title: "Full Text PDF", mimeType: "application/pdf" });
+ }
+ item.complete();
+}
+
+/** BEGIN TEST CASES **/
+var testCases = [
+ {
+ "type": "import",
+ "input": "\r\n \r\n \r\n \r\n \r\n \r\n Schittone, Joe\r\n Franklin, Erik C.\r\n Hudson, J. Harold\r\n Anderson, Jeff\r\n 2021-06-24T15:18:40Z\r\n 2021-06-24T15:18:40Z\r\n 2006\r\n http://hdl.handle.net/1834/20117\r\n This document presents the results of the monitoring of a repaired coral reef injured by the M/V Connected vessel grounding incident of March 27, 2001. This groundingoccurred in Florida state waters within the boundaries of the Florida Keys National Marine Sanctuary (FKNMS). The National Oceanic and Atmospheric Administration (NOAA) and the Board of Trustees of the Internal Improvement Trust Fund of the State of Florida, (“State of Florida” or “state”) are the co-trustees for the natural resourceswithin the FKNMS and, thus, are responsible for mediating the restoration of the damaged marine resources and monitoring the outcome of the restoration actions. Therestoration monitoring program tracks patterns of biological recovery, determines the success of restoration measures, and assesses the resiliency to environmental andanthropogenic disturbances of the site over time.The monitoring program at the Connected site was to have included an assessment of the structural stability of installed restoration modules and biological condition of reattached corals performed on the following schedule: immediately (i.e., baseline), 1, 3, and 6 years after restoration and following a catastrophic event. Restoration of this site was completed on July 20, 2001. Due to unavoidable delays in the settlement of the case, the“baseline” monitoring event for this site occurred in July 2004. The catastrophic monitoring event occurred on August 31, 2004, some 2 ½ weeks after the passage of Hurricane Charley which passed nearby, almost directly over the Dry Tortugas. In September 2005, the year one monitoring event occurred shortly after the passage of Hurricane Katrina, some 70 km to the NW. This report presents the results of all three monitoring events. (PDF contains 37 pages.)\r\n application/pdf\r\n application/pdf\r\n en\r\n NOAA/National Ocean Service/National Marine Sanctuary Program\r\n Marine Sanctuaries Conservation Series\r\n http://sanctuaries.noaa.gov/science/conservation/pdfs/connected.pdf\r\n Ecology\r\n Management\r\n Environment\r\n Florida Keys National Marine Sanctuary\r\n Coral\r\n Grounding\r\n Restoration\r\n Monitoring\r\n Hurricane Charley\r\n Hurricane Katrina\r\n Acropora palmata\r\n M/V CONNECTED Coral Reef Restoration Monitoring Report,\r\n Monitoring Events 2004-2005. Florida Keys National Marine Sanctuary Monroe County, Florida\r\n monograph\r\n NMSP-0\r\n Silver Spring, MD\r\n 2021-06-24T15:18:40Z\r\n http://aquaticcommons.org/id/eprint/2312\r\n 403\r\n 2011-09-29 19:16:51\r\n 2312\r\n United States National Ocean Service\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ",
+ "items": [
+ {
+ "itemType": "book",
+ "title": "M/V CONNECTED Coral Reef Restoration Monitoring Report, Monitoring Events 2004-2005. Florida Keys National Marine Sanctuary Monroe County, Florida",
+ "creators": [
+ {
+ "firstName": "Joe",
+ "lastName": "Schittone",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Erik C.",
+ "lastName": "Franklin",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "J. Harold",
+ "lastName": "Hudson",
+ "creatorType": "author"
+ },
+ {
+ "firstName": "Jeff",
+ "lastName": "Anderson",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2006",
+ "abstractNote": "This document presents the results of the monitoring of a repaired coral reef injured by the M/V Connected vessel grounding incident of March 27, 2001. This groundingoccurred in Florida state waters within the boundaries of the Florida Keys National Marine Sanctuary (FKNMS). The National Oceanic and Atmospheric Administration (NOAA) and the Board of Trustees of the Internal Improvement Trust Fund of the State of Florida, (“State of Florida” or “state”) are the co-trustees for the natural resourceswithin the FKNMS and, thus, are responsible for mediating the restoration of the damaged marine resources and monitoring the outcome of the restoration actions. Therestoration monitoring program tracks patterns of biological recovery, determines the success of restoration measures, and assesses the resiliency to environmental andanthropogenic disturbances of the site over time.The monitoring program at the Connected site was to have included an assessment of the structural stability of installed restoration modules and biological condition of reattached corals performed on the following schedule: immediately (i.e., baseline), 1, 3, and 6 years after restoration and following a catastrophic event. Restoration of this site was completed on July 20, 2001. Due to unavoidable delays in the settlement of the case, the“baseline” monitoring event for this site occurred in July 2004. The catastrophic monitoring event occurred on August 31, 2004, some 2 ½ weeks after the passage of Hurricane Charley which passed nearby, almost directly over the Dry Tortugas. In September 2005, the year one monitoring event occurred shortly after the passage of Hurricane Katrina, some 70 km to the NW. This report presents the results of all three monitoring events. (PDF contains 37 pages.)",
+ "language": "en",
+ "place": "Silver Spring, MD",
+ "publisher": "NOAA/National Ocean Service/National Marine Sanctuary Program",
+ "series": "Marine Sanctuaries Conservation Series",
+ "url": "http://hdl.handle.net/1834/20117",
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "mimeType": "application/pdf"
+ }
+ ],
+ "tags": [
+ {
+ "tag": "Acropora palmata"
+ },
+ {
+ "tag": "Coral"
+ },
+ {
+ "tag": "Ecology"
+ },
+ {
+ "tag": "Environment"
+ },
+ {
+ "tag": "Florida Keys National Marine Sanctuary"
+ },
+ {
+ "tag": "Grounding"
+ },
+ {
+ "tag": "Hurricane Charley"
+ },
+ {
+ "tag": "Hurricane Katrina"
+ },
+ {
+ "tag": "Management"
+ },
+ {
+ "tag": "Monitoring"
+ },
+ {
+ "tag": "Restoration"
+ }
+ ],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ }
+]
+/** END TEST CASES **/
diff --git a/Datacite JSON.js b/Datacite JSON.js
index d2602037bce..508230703bf 100644
--- a/Datacite JSON.js
+++ b/Datacite JSON.js
@@ -8,7 +8,7 @@
"priority": 100,
"inRepository": true,
"translatorType": 1,
- "lastUpdated": "2022-08-25 10:25:41"
+ "lastUpdated": "2023-07-06 12:34:43"
}
/*
@@ -35,19 +35,25 @@
*/
+const datasetType = ZU.fieldIsValidForType('title', 'dataset')
+ ? 'dataset'
+ : 'document';
+
// copied from CSL JSON
function parseInput() {
var str, json = "";
- // Read in the whole file at once, since we can't easily parse a JSON stream. The
+ // Read in the whole file at once, since we can't easily parse a JSON stream. The
// chunk size here is pretty arbitrary, although larger chunk sizes may be marginally
// faster. We set it to 1MB.
while ((str = Z.read(1048576)) !== false) json += str;
try {
return JSON.parse(json);
- } catch(e) {
+ }
+ catch (e) {
Zotero.debug(e);
+ return false;
}
}
@@ -59,37 +65,41 @@ function detectImport() {
return false;
}
-
+/* eslint-disable camelcase*/
var mappingTypes = {
- "book": "book",
- "chapter": "bookSection",
+ book: "book",
+ chapter: "bookSection",
"article-journal": "journalArticle",
"article-magazine": "magazineArticle",
"article-newspaper": "newspaperArticle",
- "thesis": "thesis",
+ thesis: "thesis",
"entry-encyclopedia": "encyclopediaArticle",
"entry-dictionary": "dictionaryEntry",
"paper-conference": "conferencePaper",
- "personal_communication": "letter",
- "manuscript": "manuscript",
- "interview": "interview",
- "motion_picture": "film",
- "graphic": "artwork",
- "webpage": "webpage",
- "report": "report",
- "bill": "bill",
- "legal_case": "case",
- "patent": "patent",
- "legislation": "statute",
- "map": "map",
+ personal_communication: "letter",
+ manuscript: "manuscript",
+ interview: "interview",
+ motion_picture: "film",
+ graphic: "artwork",
+ webpage: "webpage",
+ report: "report",
+ bill: "bill",
+ legal_case: "case",
+ patent: "patent",
+ legislation: "statute",
+ map: "map",
"post-weblog": "blogPost",
- "post": "forumPost",
- "song": "audioRecording",
- "speech": "presentation",
- "broadcast": "radioBroadcast",
- "dataset": "document"
+ post: "forumPost",
+ song: "audioRecording",
+ speech: "presentation",
+ broadcast: "radioBroadcast",
+ dataset: "dataset"
};
-
+/* eslint-enable camelcase*/
+// pre-6.0.26 releases don't have a dataset item type
+if (datasetType == "document") {
+ mappingTypes.dataset = 'document';
+}
function doImport() {
@@ -104,7 +114,7 @@ function doImport() {
}
var item = new Zotero.Item(type);
- if (data.types.citeproc == "dataset") {
+ if (data.types.citeproc == "dataset" && datasetType == "document") {
item.extra = "Type: dataset";
}
var title = "";
@@ -114,27 +124,27 @@ function doImport() {
}
if (!titleElement.titleType) {
title = titleElement.title + title;
- } else if (titleElement.titleType.toLowerCase() == "subtitle") {
- title = title + ": " + titleElement["title"];
}
-
+ else if (titleElement.titleType.toLowerCase() == "subtitle") {
+ title = title + ": " + titleElement.title;
+ }
}
item.title = title;
if (data.creators) {
for (let creator of data.creators) {
- if (creator.nameType == "Personal") {
- if (creator.familyName && creator.givenName) {
- item.creators.push({
- "lastName": creator.familyName,
- "firstName": creator.givenName,
- "creatorType": "author"
- });
- } else {
- item.creators.push(ZU.cleanAuthor(creator.name, "author", true));
- }
- } else {
- item.creators.push({"lastName": creator.name, "creatorType": "author", "fieldMode": true});
+ if (creator.familyName && creator.givenName) {
+ item.creators.push({
+ lastName: creator.familyName,
+ firstName: creator.givenName,
+ creatorType: "author"
+ });
+ }
+ else if (creator.nameType == "Personal") {
+ item.creators.push(ZU.cleanAuthor(creator.name, "author", true));
+ }
+ else {
+ item.creators.push({ lastName: creator.name, creatorType: "author", fieldMode: 1 });
}
}
}
@@ -142,7 +152,7 @@ function doImport() {
for (let contributor of data.contributors) {
let role = "contributor";
if (contributor.contributorRole) {
- switch(contributor.contributorRole.toLowerCase()) {
+ switch (contributor.contributorRole.toLowerCase()) {
case "editor":
role = "editor";
break;
@@ -153,18 +163,18 @@ function doImport() {
// use the already assigned value
}
}
- if (contributor.nameType == "Personal") {
- if (contributor.familyName && contributor.givenName) {
- item.creators.push({
- "lastName": contributor.familyName,
- "firstName": contributor.givenName,
- "creatorType": role
- });
- } else {
- item.creators.push(ZU.cleanAuthor(contributor.name, role));
- }
- } else {
- item.creators.push({"lastName": contributor.name, "creatorType": role, "fieldMode": true});
+ if (contributor.familyName && contributor.givenName) {
+ item.creators.push({
+ lastName: contributor.familyName,
+ firstName: contributor.givenName,
+ creatorType: role
+ });
+ }
+ else if (contributor.nameType == "Personal") {
+ item.creators.push(ZU.cleanAuthor(contributor.name, role));
+ }
+ else {
+ item.creators.push({ lastName: contributor.name, creatorType: role, fieldMode: 1 });
}
}
}
@@ -176,15 +186,16 @@ function doImport() {
for (let date of data.dates) {
dates[date.dateType] = date.date;
}
- item.date = dates["Issued"] || dates["Updated"] || dates["Available"] || dates["Accepted"] || dates["Submitted"] || dates["Created"] || data.publicationYear;
+ item.date = dates.Issued || dates.Updated || dates.Available || dates.Accepted || dates.Submitted || dates.Created || data.publicationYear;
}
item.DOI = data.doi;
//add DOI to extra for unsupported items
if (item.DOI && !ZU.fieldIsValidForType("DOI", item.itemType)) {
- if (item.extra){
+ if (item.extra) {
item.extra += "\nDOI: " + item.DOI;
- } else {
+ }
+ else {
item.extra = "DOI: " + item.DOI;
}
}
@@ -211,13 +222,14 @@ function doImport() {
for (let description of data.descriptions) {
if (description.descriptionType == "Abstract") {
item.abstractNote = description.description;
- } else {
+ }
+ else {
descriptionNote += "" + description.descriptionType + "
\n" + description.description;
}
}
}
if (descriptionNote !== "") {
- item.notes.push({"note": descriptionNote});
+ item.notes.push({ note: descriptionNote });
}
if (data.container) {
if (data.container.type == "Series") {
@@ -423,7 +435,7 @@ var testCases = [
"input": "{\n \"id\": \"https://doi.org/10.17171/2-3-12-1\",\n \"doi\": \"10.17171/2-3-12-1\",\n \"url\": \"http://repository.edition-topoi.org/collection/MAGN/single/0012/0\",\n \"types\": {\n \"resourceTypeGeneral\": \"Dataset\",\n \"resourceType\": \"3D Data\",\n \"schemaOrg\": \"Dataset\",\n \"citeproc\": \"dataset\",\n \"bibtex\": \"misc\",\n \"ris\": \"DATA\"\n },\n \"creators\": [\n {\n \"nameType\": \"Personal\",\n \"name\": \"Fritsch, Bernhard\",\n \"givenName\": \"Bernhard\",\n \"familyName\": \"Fritsch\"\n }\n ],\n \"titles\": [\n {\n \"title\": \"3D model of object V 1.2-71\"\n },\n {\n \"title\": \"Structured-light Scan, Staatliche Museen zu Berlin - Antikensammlung\",\n \"titleType\": \"Subtitle\"\n }\n ],\n \"publisher\": \"Edition Topoi\",\n \"container\": {\n \"type\": \"DataRepository\",\n \"identifier\": \"10.17171/2-3-1\",\n \"identifierType\": \"DOI\",\n \"title\": \"Architectural Fragments from Magnesia on the Maeander\"\n },\n \"subjects\": [\n {\n \"subject\": \"101 Ancient Cultures\"\n },\n {\n \"subject\": \"410-01 Building and Construction History\"\n }\n ],\n \"contributors\": [\n\n ],\n \"dates\": [\n {\n \"date\": \"2016\",\n \"dateType\": \"Updated\"\n },\n {\n \"date\": \"2016\",\n \"dateType\": \"Issued\"\n }\n ],\n \"publicationYear\": \"2016\",\n \"identifiers\": [\n {\n \"identifierType\": \"DOI\",\n \"identifier\": \"https://doi.org/10.17171/2-3-12-1\"\n }\n ],\n \"sizes\": [\n\n ],\n \"formats\": [\n \"nxs\"\n ],\n \"rightsList\": [\n\n ],\n \"descriptions\": [\n {\n \"description\": \"Architectural Fragments from Magnesia on the Maeander\",\n \"descriptionType\": \"SeriesInformation\"\n }\n ],\n \"geoLocations\": [\n\n ],\n \"fundingReferences\": [\n\n ],\n \"relatedIdentifiers\": [\n {\n \"relatedIdentifier\": \"10.17171/2-3-1\",\n \"relatedIdentifierType\": \"DOI\",\n \"relationType\": \"IsPartOf\"\n },\n {\n \"relatedIdentifier\": \"10.17171/2-3\",\n \"relatedIdentifierType\": \"DOI\",\n \"relationType\": \"IsPartOf\"\n }\n ],\n \"schemaVersion\": \"http://datacite.org/schema/kernel-3\",\n \"providerId\": \"tib\",\n \"clientId\": \"tib.topoi\",\n \"agency\": \"DataCite\",\n \"state\": \"findable\"\n}",
"items": [
{
- "itemType": "document",
+ "itemType": "dataset",
"title": "3D model of object V 1.2-71: Structured-light Scan, Staatliche Museen zu Berlin - Antikensammlung",
"creators": [
{
@@ -433,8 +445,9 @@ var testCases = [
}
],
"date": "2016",
- "extra": "Type: dataset\nDOI: 10.17171/2-3-12-1",
- "publisher": "Edition Topoi",
+ "DOI": "10.17171/2-3-12-1",
+ "format": "nxs",
+ "repository": "Edition Topoi",
"url": "http://repository.edition-topoi.org/collection/MAGN/single/0012/0",
"attachments": [],
"tags": [
diff --git a/Duke University Press Books.js b/Duke University Press Books.js
index 27165fdbe4d..cce82f4c214 100644
--- a/Duke University Press Books.js
+++ b/Duke University Press Books.js
@@ -9,30 +9,30 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
- "lastUpdated": "2022-10-05 02:33:49"
+ "lastUpdated": "2023-10-23 09:05:55"
}
/*
- ***** BEGIN LICENSE BLOCK *****
+ ***** BEGIN LICENSE BLOCK *****
- Copyright © 2022 Sebastian Karcher
+ Copyright © 2022 Sebastian Karcher
- This file is part of Zotero.
+ This file is part of Zotero.
- Zotero is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
+ Zotero is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- Zotero is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
+ Zotero is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
- You should have received a copy of the GNU Affero General Public License
- along with Zotero. If not, see .
+ You should have received a copy of the GNU Affero General Public License
+ along with Zotero. If not, see .
- ***** END LICENSE BLOCK *****
+ ***** END LICENSE BLOCK *****
*/
@@ -64,11 +64,9 @@ function getSearchResults(doc, checkOnly) {
async function doWeb(doc, url) {
if (detectWeb(doc, url) == 'multiple') {
let items = await Zotero.selectItems(getSearchResults(doc, false));
- if (items) {
- await Promise.all(
- Object.keys(items)
- .map(url => requestDocument(url).then(scrape))
- );
+ if (!items) return;
+ for (let url of Object.keys(items)) {
+ await scrape(await requestDocument(url));
}
}
else {
@@ -213,6 +211,40 @@ var testCases = [
"type": "web",
"url": "https://www.dukeupress.edu/books/browse?sortid=7",
"items": "multiple"
+ },
+ {
+ "type": "web",
+ "url": "https://www.dukeupress.edu/beyond-this-narrow-now",
+ "items": [
+ {
+ "itemType": "book",
+ "title": "\"Beyond This Narrow Now\": Or, Delimitations, of W. E. B. Du Bois",
+ "creators": [
+ {
+ "firstName": "Nahum Dimitri",
+ "lastName": "Chandler",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2022",
+ "ISBN": "9781478014805",
+ "abstractNote": "In “Beyond This Narrow Now” Nahum Dimitri Chandler shows that the premises of W. E. B. Du Bois's thinking at the turn of the twentieth century stand as fundamental references for the whole itinerary of his thought. Opening with a distinct approach to the legacy of Du Bois, Chandler proceeds through a series of close readings of Du Bois's early essays, previously unpublished or seldom studied, with discrete annotations of The Souls of Black Folk: Essays and Sketches of 1903, elucidating and elaborating basic epistemological terms of his thought. With theoretical attention to how the African American stands as an example of possibility for Du Bois and renders problematic traditional ontological thought, Chandler also proposes that Du Bois's most well-known phrase—“the problem of the color line”—sustains more conceptual depth than has yet been understood, with pertinence for our accounts of modern systems of enslavement and imperial colonialism and the incipient moments of modern capitalization. Chandler's work exemplifies a more profound engagement with Du Bois, demonstrating that he must be re-read, appreciated, and studied anew as a philosophical writer and thinker contemporary to our time.",
+ "libraryCatalog": "Duke University Press Books",
+ "numPages": "328",
+ "place": "Durham, NC",
+ "publisher": "Duke University Press",
+ "shortTitle": "\"Beyond This Narrow Now\"",
+ "attachments": [
+ {
+ "title": "Snapshot",
+ "mimeType": "text/html"
+ }
+ ],
+ "tags": [],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
}
]
/** END TEST CASES **/
diff --git a/E-periodica Switzerland.js b/E-periodica Switzerland.js
new file mode 100644
index 00000000000..03763d6293e
--- /dev/null
+++ b/E-periodica Switzerland.js
@@ -0,0 +1,347 @@
+{
+ "translatorID": "dbfd99e3-6925-4b71-92b8-12b02aa875fc",
+ "label": "E-periodica Switzerland",
+ "creator": "Alain Borel",
+ "target": "^https?://(www|news?)\\.e-periodica\\.ch",
+ "minVersion": "5.0",
+ "maxVersion": "",
+ "priority": 100,
+ "inRepository": true,
+ "translatorType": 4,
+ "browserSupport": "gcsibv",
+ "lastUpdated": "2023-08-15 20:15:50"
+}
+
+/*
+ ***** BEGIN LICENSE BLOCK *****
+
+ Copyright © 2023 Alain Borel
+
+ This file is part of Zotero.
+
+ Zotero is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Zotero is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with Zotero. If not, see .
+
+ ***** END LICENSE BLOCK *****
+*/
+
+function detectWeb(doc, url) {
+ if (url.includes('/digbib/view')) {
+ return "journalArticle";
+ }
+ else if (getSearchResults(doc, true)) {
+ return "multiple";
+ }
+ else {
+ return false;
+ }
+}
+
+function getSearchResults(doc, checkOnly) {
+ var items = {};
+ // Zotero.debug(items);
+ var found = false;
+ var rows = doc.querySelectorAll('h2.ep-result__title > a');
+ for (let row of rows) {
+ //Zotero.debug(row.textContent);
+ let href = row.href;
+ //Zotero.debug(href);
+ let title = ZU.trimInternal(row.textContent);
+ if (!href || !title) continue;
+ if (checkOnly) return true;
+ found = true;
+ items[href] = title;
+ // Zotero.debug(items[href]);
+ }
+ return found ? items : false;
+}
+
+async function doWeb(doc, url) {
+ if (detectWeb(doc, url) == 'multiple') {
+ let items = await Zotero.selectItems(getSearchResults(doc, false));
+ if (!items) return;
+ for (let resultUrl of Object.keys(items)) {
+ await scrape(resultUrl);
+ }
+ }
+ else {
+ // The journalArticle type will be applicable in general unless we find multiple refs.
+ await scrape(url);
+ }
+}
+
+async function scrape(url) {
+ // In general the article ID is given the pid parameter in the URL
+ // If the URL ends with a hash/fragment identifier,
+ // the final digits of the pid parameter (after a double colon) must be replaced with the hash ID
+ // e.g. alp-001:1907:2::332#375 => alp-001:1907:2::375
+ let articleURL = new URL(url);
+ let articleID = articleURL.searchParams.get("pid");
+ let articleViewFragment = articleURL.hash.replace(/^#/, ""); // trim leading #
+ if (/\d+/.test(articleViewFragment)) {
+ // Normalize article ID by replacing the last segment with the real
+ // page id if any
+ articleID = articleID.replace(/::\d+$/, "::" + articleViewFragment);
+ }
+ let pageinfoUrl = "https://www.e-periodica.ch/digbib/ajax/pageinfo?pid=" + encodeURIComponent(articleID);
+
+ //Zotero.debug('JSON URL ' + pageinfoUrl);
+ let epJSON = await requestJSON(pageinfoUrl);
+ //Zotero.debug(epJSON);
+ let risURL;
+ if (epJSON.articles.length == 0) {
+ // Fallback for non-article content, listed as Werbung, Sonstiges and various others:
+ // this information is unfortunately not included in the JSON metadata => let's add a reasonable pseudo-title
+ epJSON.articles = [{ title: "Untitled" }];
+ }
+ if (epJSON.articles["0"].hasRisLink) {
+ risURL = '/view/' + epJSON.articles["0"].risLink;
+ }
+
+ // Zotero.debug(risURL);
+ var pdfURL = null;
+ if (epJSON.articles["0"].hasPdfLink) {
+ pdfURL = epJSON.articles["0"].pdfLink;
+ }
+ // Zotero.debug(pdfURL);
+ if (risURL) {
+ let risText = await requestText(risURL);
+ processRIS(risText, pdfURL);
+ }
+ else {
+ var item = new Zotero.Item("journalArticle");
+ item.title = epJSON.articles["0"].title.replace(' : ', ': ');
+ item.publicationTitle = epJSON.journalTitle.replace(' : ', ': ');
+ var numyear = epJSON.volumeNumYear.split(/[ ()]/).filter(element => element);
+ if (numyear.length > 1) {
+ item.date = numyear.slice(-1);
+ }
+ if (numyear.length > 0) {
+ item.volume = numyear[0];
+ }
+ if (epJSON.issueNumber) {
+ item.issue = epJSON.issueNumber;
+ }
+ if (epJSON.viewerLink.length > 0) {
+ if (epJSON.viewerLink.indexOf("http") == 0) {
+ item.url = epJSON.viewerLink;
+ }
+ else {
+ item.url = "https://www.e-periodica.ch" + epJSON.viewerLink;
+ }
+ }
+ if (epJSON.pdfLink) {
+ if (epJSON.pdfLink.indexOf("http") == 0) {
+ pdfURL = epJSON.pdfLink;
+ }
+ else {
+ pdfURL = "https://www.e-periodica.ch" + epJSON.pdfLink;
+ }
+ }
+ if (pdfURL) {
+ item.attachments.push({
+ url: pdfURL,
+ title: "Full Text PDF",
+ type: "application/pdf"
+ });
+ }
+ item.complete();
+ }
+}
+
+function processRIS(risText, pdfURL) {
+ // load translator for RIS
+ var translator = Zotero.loadTranslator("import");
+ translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
+ // Z.debug(text);
+
+ translator.setString(risText);
+ translator.setHandler("itemDone", function (obj, item) {
+ // Don't save HTML snapshot from 'UR' tag
+ item.attachments = [];
+
+ // change colon spacing in title and publicationTitle
+ item.title = item.title.replace(' : ', ': ');
+
+ if (item.publicationTitle) {
+ item.publicationTitle = item.publicationTitle.replace(' : ', ': ');
+ }
+
+ if (item.title == item.title.toUpperCase()) {
+ item.title = ZU.capitalizeTitle(item.title.toLowerCase(), true);
+ }
+
+ // Retrieve fulltext
+ if (pdfURL !== null) {
+ item.attachments.push({
+ url: pdfURL,
+ title: "Full Text PDF",
+ type: "application/pdf"
+ });
+ }
+
+ // DB in RIS maps to archive; we don't want that
+ delete item.archive;
+
+ item.complete();
+ });
+
+ translator.getTranslatorObject(function (trans) {
+ trans.doImport();
+ });
+}/** BEGIN TEST CASES **/
+var testCases = [
+ {
+ "type": "web",
+ "url": "https://www.e-periodica.ch/digbib/view?pid=enh-006%3A2018%3A11::121#133",
+ "detectedItemType": "journalArticle",
+ "items": [
+ {
+ "itemType": "journalArticle",
+ "title": "Untersuchungen zur aktuellen Verbreitung der schweizerischen Laufkäfer (Coleoptera: Carabidae): Zwischenbilanz",
+ "creators": [
+ {
+ "lastName": "Hoess",
+ "firstName": "René",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Chittaro",
+ "firstName": "Yannick",
+ "creatorType": "author"
+ },
+ {
+ "lastName": "Walter",
+ "firstName": "Thomas",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2018",
+ "DOI": "10.5169/seals-986030",
+ "ISSN": "1662-8500",
+ "libraryCatalog": "E-periodica Switzerland",
+ "pages": "129",
+ "publicationTitle": "Entomo Helvetica: entomologische Zeitschrift der Schweiz",
+ "shortTitle": "Untersuchungen zur aktuellen Verbreitung der schweizerischen Laufkäfer (Coleoptera",
+ "volume": "11",
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "type": "application/pdf"
+ }
+ ],
+ "tags": [],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://www.e-periodica.ch/digbib/view?pid=bts-004%3A2011%3A137%3A%3A254&referrer=search#251",
+ "detectedItemType": "journalArticle",
+ "items": [
+ {
+ "itemType": "journalArticle",
+ "title": "Décentralisation, opportunités et contraintes",
+ "creators": [
+ {
+ "lastName": "Fignolé",
+ "firstName": "Jean-Claude",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2011",
+ "DOI": "10.5169/seals-144646",
+ "ISSN": "0251-0979",
+ "issue": "05-06",
+ "libraryCatalog": "E-periodica Switzerland",
+ "pages": "14",
+ "publicationTitle": "Tracés: bulletin technique de la Suisse romande",
+ "volume": "137",
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "type": "application/pdf"
+ }
+ ],
+ "tags": [],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://www.e-periodica.ch/digbib/view?pid=alp-001%3A1907%3A2%3A%3A332#375",
+ "detectedItemType": "journalArticle",
+ "items": [
+ {
+ "itemType": "journalArticle",
+ "title": "Stimmen und Meinungen: schweizerisches Nationaldrama?",
+ "creators": [
+ {
+ "lastName": "Falke",
+ "firstName": "Konrad",
+ "creatorType": "author"
+ }
+ ],
+ "date": "1907-1908",
+ "DOI": "10.5169/seals-747870",
+ "issue": "12",
+ "libraryCatalog": "E-periodica Switzerland",
+ "pages": "364",
+ "publicationTitle": "Berner Rundschau: Halbmonatsschrift für Dichtung, Theater, Musik und bildende Kunst in der Schweiz",
+ "shortTitle": "Stimmen und Meinungen",
+ "volume": "2",
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "type": "application/pdf"
+ }
+ ],
+ "tags": [],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://www.e-periodica.ch/digbib/view?pid=bts-004%3A2011%3A137%3A%3A262#262",
+ "detectedItemType": "journalArticle",
+ "items": [
+ {
+ "itemType": "journalArticle",
+ "title": "Untitled",
+ "creators": [],
+ "date": "2011",
+ "issue": "05-06",
+ "libraryCatalog": "E-periodica Switzerland",
+ "publicationTitle": "Tracés: bulletin technique de la Suisse romande",
+ "url": "https://www.e-periodica.ch/digbib/view?pid=bts-004%3A2011%3A137%3A%3A262",
+ "volume": "137",
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "type": "application/pdf"
+ }
+ ],
+ "tags": [],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ }
+]
+/** END TEST CASES **/
diff --git a/EBSCO Discovery Layer.js b/EBSCO Discovery Layer.js
index 73c05a9375f..579c60763f6 100644
--- a/EBSCO Discovery Layer.js
+++ b/EBSCO Discovery Layer.js
@@ -2,14 +2,14 @@
"translatorID": "660fcf3e-3414-41b8-97a5-e672fc2e491d",
"label": "EBSCO Discovery Layer",
"creator": "Sebastian Karcher",
- "target": "^https?://discovery\\.ebsco\\.com/",
+ "target": "^https?://(discovery|research)\\.ebsco\\.com/",
"minVersion": "5.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
- "lastUpdated": "2023-02-12 03:36:07"
+ "lastUpdated": "2023-11-27 04:12:52"
}
/*
@@ -35,7 +35,7 @@
***** END LICENSE BLOCK *****
*/
-const itemRegex = /\/c\/([^/]+)\/(?:details|viewer\/pdf)\/([^?]+)/;
+const itemRegex = /\/c\/([^/]+)(?:\/search)?\/(?:details|viewer\/pdf)\/([^?]+)/;
function detectWeb(doc, url) {
if (itemRegex.test(url)) {
if (url.includes("/viewer/pdf")) {
diff --git a/ERIC.js b/ERIC.js
index aed4ae5de9f..7ab177cc3e7 100644
--- a/ERIC.js
+++ b/ERIC.js
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 12,
"browserSupport": "gcsibv",
- "lastUpdated": "2022-11-09 21:08:42"
+ "lastUpdated": "2023-08-22 04:49:47"
}
/*
@@ -89,11 +89,9 @@ function getSearchResults(doc, checkOnly) {
async function doWeb(doc, url) {
if (detectWeb(doc, url) == 'multiple') {
let items = await Zotero.selectItems(getSearchResults(doc, false));
- if (items) {
- await Promise.all(
- Object.keys(items)
- .map(url => requestDocument(url).then(scrape))
- );
+ if (!items) return;
+ for (let url of Object.keys(items)) {
+ await scrape(await requestDocument(url));
}
}
else {
diff --git a/Electronic Colloquium on Computational Complexity.js b/Electronic Colloquium on Computational Complexity.js
index 43fe337d059..3191947f5fc 100644
--- a/Electronic Colloquium on Computational Complexity.js
+++ b/Electronic Colloquium on Computational Complexity.js
@@ -1,116 +1,120 @@
{
"translatorID": "09a9599e-c20e-a405-d10d-35ad4130a426",
"label": "Electronic Colloquium on Computational Complexity",
- "creator": "Jonas Schrieb",
- "target": "^https?://eccc\\.weizmann\\.ac\\.il/",
+ "creator": "Jonas Schrieb and Morgan Shirley",
+ "target": "^https?://eccc\\.weizmann\\.ac\\.il/(title|year|keyword|report|search)",
"minVersion": "1.0.0b3.r1",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
- "browserSupport": "gcsib",
- "lastUpdated": "2017-01-05 17:11:41"
+ "browserSupport": "gcsibv",
+ "lastUpdated": "2023-08-14 06:03:23"
}
-function detectWeb(doc, url) {
- var singleRe = /^https?:\/\/eccc\.weizmann\.ac\.il\/report\/\d{4}\/\d{3}/;
- var multipleRe = /^https?:\/\/eccc\.weizmann\.ac\.il\/(title|year|keyword)\//;
- if (singleRe.test(url)) {
- return "report";
- } else if (multipleRe.test(url)) {
- return "multiple";
- }
-}
+/*
+ ***** BEGIN LICENSE BLOCK *****
-function scrape(doc) {
- var newItem = new Zotero.Item("report");
+ Copyright © 2023 Jonas Schrieb and Morgan Shirley
- var url = doc.location.href;
- var tmp = url.match(/\/(\d{4})\/(\d{3})\/$/);
- newItem.date = tmp[1];
- newItem.reportNumber = tmp[2];
- newItem.url = url;
-
+ This file is part of Zotero.
+ Zotero is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- var titleXPath = "id('box')//h4";
- newItem.title = doc.evaluate(titleXPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent;
+ Zotero is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+ You should have received a copy of the GNU Affero General Public License
+ along with Zotero. If not, see .
+ ***** END LICENSE BLOCK *****
+*/
- var authorsXPath = "id('box')//a[contains(@href,'author')]";
- var authors = doc.evaluate(authorsXPath, doc, null, XPathResult.ANY_TYPE, null);
- var nextAuthor;
- while (nextAuthor = authors.iterateNext()) {
- newItem.creators.push(Zotero.Utilities.cleanAuthor(nextAuthor.textContent, "author"));
- }
+const preprintType = ZU.fieldIsValidForType('title', 'preprint')
+ ? 'preprint'
+ : 'report';
-
-
- var keywordsXPath = "id('box')//a[contains(@href,'keyword')]";
- var keywords = doc.evaluate(keywordsXPath, doc, null, XPathResult.ANY_TYPE, null);
- var nextKeyword;
- var i = 0;
- while (nextKeyword = keywords.iterateNext()) {
- newItem.tags[i++] = nextKeyword.textContent;
+function getSearchResults(doc, checkOnly) {
+ var items = {};
+ var found = false;
+ var rows = doc.querySelectorAll('a[href^="/report/"]');
+ for (let row of rows) {
+ let href = row.href;
+ let title = text(row, "h4");
+ if (!href || !title) continue;
+ if (checkOnly) return true;
+ found = true;
+ items[href] = title;
}
+ return found ? items : false;
+}
-
-
- var abstractXPath = "id('box')/text()";
- var abstractLines = doc.evaluate(abstractXPath, doc, null, XPathResult.ANY_TYPE, null);
- newItem.abstractNote = "";
- var nextLine;
- while (nextLine = abstractLines.iterateNext()) {
- newItem.abstractNote += nextLine.textContent;
+function detectWeb(doc, url) {
+ var multipleRe = /^https?:\/\/eccc\.weizmann\.ac\.il\/(title|year|keyword|search)\//;
+ var singleRe = /^https?:\/\/eccc\.weizmann\.ac\.il\/report\//;
+ if (multipleRe.test(url)) {
+ return getSearchResults(doc, true) && "multiple";
+ }
+ else if (singleRe.test(url)) {
+ return preprintType;
}
+ else return false;
+}
+async function scrape(doc, url = doc.location.href) {
+ let translator = Zotero.loadTranslator('web');
+ // Embedded Metadata
+ translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48');
+ translator.setDocument(doc);
+
+ translator.setHandler('itemDone', (_obj, item) => {
+ item.publisher = "Electronic Colloquium on Computational Complexity";
+ // Keywords and abstract are not in the metadata; scrape from webpage
+ var keywords = doc.querySelectorAll("#box a[href^='/keyword/']");
+ for (let i = 0; i < keywords.length; i++) {
+ item.tags[i] = keywords[i].textContent;
+ }
- newItem.attachments = [
- {url:url, title:"ECCC Snapshot", mimeType:"text/html"},
- {url:url+"download", title:"ECCC Full Text PDF", mimeType:"application/pdf"}
- ];
+ var abstractParagraphs = doc.querySelectorAll("#box p");
+ item.abstractNote = "";
+ for (let i = 0; i < abstractParagraphs.length; i++) {
+ item.abstractNote += abstractParagraphs[i].innerText + "\n";
+ }
+ item.complete();
+ });
- newItem.complete();
+ let em = await translator.getTranslatorObject();
+ em.itemType = preprintType;
+ await em.doWeb(doc, url);
}
-function doWeb(doc, url) {
- var articles = new Array();
- var items = new Object();
- var nextTitle;
-
- if (detectWeb(doc, url) == "multiple") {
- var titleXPath = "//a[starts-with(@href,'/report/')]/h4";
- var linkXPath = "//a[starts-with(@href,'/report/')][h4]";
-
- var titles = doc.evaluate(titleXPath, doc, null, XPathResult.ANY_TYPE, null);
- var links = doc.evaluate(linkXPath, doc, null, XPathResult.ANY_TYPE, null);
- while (nextTitle = titles.iterateNext()) {
- nextLink = links.iterateNext();
- items[nextLink.href] = nextTitle.textContent;
+async function doWeb(doc, url) {
+ if (detectWeb(doc, url) == 'multiple') {
+ let items = await Zotero.selectItems(getSearchResults(doc, false));
+ if (!items) return;
+ for (let url of Object.keys(items)) {
+ await scrape(await requestDocument(url));
}
- Zotero.selectItems(items, function (items) {
- if (!items) {
- Zotero.done();
- }
- for (var i in items) {
- articles.push(i);
- }
- ZU.processDocuments(articles, scrape);
- });
- } else {
- scrape(doc, url)
}
-}
-/** BEGIN TEST CASES **/
+ else {
+ await scrape(doc, url);
+ }
+}/** BEGIN TEST CASES **/
var testCases = [
{
"type": "web",
"url": "https://eccc.weizmann.ac.il/report/2006/067/",
+ "detectedItemType": "preprint",
"items": [
{
- "itemType": "report",
+ "itemType": "preprint",
+ "title": "On the Impact of Combinatorial Structure on Congestion Games",
"creators": [
{
"firstName": "Heiner",
@@ -128,39 +132,98 @@ var testCases = [
"creatorType": "author"
}
],
- "notes": [],
+ "date": "2006/5/28",
+ "abstractNote": "We study the impact of combinatorial structure in congestion games on the complexity of computing pure Nash equilibria and the convergence time of best response sequences. In particular, we investigate which properties of the strategy spaces of individual players ensure a polynomial convergence time. We show, if the strategy space of each player consists of the bases of a matroid over the set of resources, then the lengths of all best response sequences are polynomially bounded in the number of players and resources. We can also prove that this result is tight, that is, the matroid property is a necessary and sufficient condition on the players' strategy spaces for guaranteeing polynomial time convergence to a Nash equilibrium. In addition, we present an approach that enables us to devise hardness proofs for various kinds of combinatorial games, including first results about the hardness of market sharing games and congestion games for overlay network design. Our approach also yields a short proof for the PLS-completeness of network congestion games.",
+ "archiveID": "TR06-067",
+ "language": "en",
+ "libraryCatalog": "eccc.weizmann.ac.il",
+ "repository": "Electronic Colloquium on Computational Complexity",
+ "url": "https://eccc.weizmann.ac.il/report/2006/067/",
+ "attachments": [
+ {
+ "title": "Full Text PDF",
+ "mimeType": "application/pdf"
+ }
+ ],
"tags": [
- "Combinatorial Structure",
- "Congestion Games",
- "Convergence Time",
- "PLS-Completeness"
+ {
+ "tag": "Combinatorial Structure"
+ },
+ {
+ "tag": "Congestion Games"
+ },
+ {
+ "tag": "Convergence Time"
+ },
+ {
+ "tag": "PLS-Completeness"
+ }
],
- "seeAlso": [],
+ "notes": [],
+ "seeAlso": []
+ }
+ ]
+ },
+ {
+ "type": "web",
+ "url": "https://eccc.weizmann.ac.il/report/2007/112/",
+ "detectedItemType": "preprint",
+ "items": [
+ {
+ "itemType": "preprint",
+ "title": "Unbounded-Error Communication Complexity of Symmetric Functions",
+ "creators": [
+ {
+ "firstName": "Alexander A.",
+ "lastName": "Sherstov",
+ "creatorType": "author"
+ }
+ ],
+ "date": "2007/11/12",
+ "abstractNote": "The sign-rank of a real matrix M is the least rank\nof a matrix R in which every entry has the same sign as the\ncorresponding entry of M. We determine the sign-rank of every\nmatrix of the form M=[ D(|x AND y|) ]_{x,y}, where\nD:{0,1,...,n}->{-1,+1} is given and x and y range over {0,1}^n.\nSpecifically, we prove that the sign-rank of M equals\n2^{\\tilde Theta(k)}, where k is the number of times D changes\nsign in {0,1,...,n}.\nPut differently, we prove an optimal lower bound\non the unbounded-error communication complexity of every\nsymmetric function, i.e., a function of the form\nf(x,y)=D(|x AND y|) for some D. The unbounded-error model is\nessentially the most powerful of all models of communication\n(both classical and quantum), and proving lower bounds in it\nis a substantial challenge. The only previous nontrivial lower\nbounds for this model appear in the groundbreaking work of\nForster (2001) and its extensions. As corollaries to our\nresult, we give new lower bounds for PAC learning and for\nthreshold-of-majority circuits.\nThe technical content of our proof is diverse and\nfeatures random walks on (Z_2)^n, discrete approximation theory,\nthe Fourier transform on (Z_2)^n, linear-programming duality,\nand matrix analysis.",
+ "archiveID": "TR07-112",
+ "language": "en",
+ "libraryCatalog": "eccc.weizmann.ac.il",
+ "repository": "Electronic Colloquium on Computational Complexity",
+ "url": "https://eccc.weizmann.ac.il/report/2007/112/",
"attachments": [
{
- "url": "https://eccc.weizmann.ac.il/report/2006/067/",
- "title": "ECCC Snapshot",
- "mimeType": "text/html"
+ "title": "Full Text PDF",
+ "mimeType": "application/pdf"
+ }
+ ],
+ "tags": [
+ {
+ "tag": "Communication complexity"
},
{
- "url": "https://eccc.weizmann.ac.il/report/2006/067/download",
- "title": "ECCC Full Text PDF",
- "mimeType": "application/pdf"
+ "tag": "Sign-rank"
+ },
+ {
+ "tag": "Unbounded-error communication complexity"
}
],
- "date": "2006",
- "reportNumber": "067",
- "url": "https://eccc.weizmann.ac.il/report/2006/067/",
- "title": "On the Impact of Combinatorial Structure on Congestion Games",
- "abstractNote": "",
- "libraryCatalog": "Electronic Colloquium on Computational Complexity",
- "accessDate": "CURRENT_TIMESTAMP"
+ "notes": [],
+ "seeAlso": []
}
]
},
{
"type": "web",
- "url": "https://eccc.weizmann.ac.il/keyword/13486/",
+ "url": "https://eccc.weizmann.ac.il/search/?search=combinatorial",
+ "detectedItemType": "multiple",
+ "items": "multiple"
+ },
+ {
+ "type": "web",
+ "url": "https://eccc.weizmann.ac.il/search/?search=asdf",
+ "detectedItemType": false,
+ "items": []
+ },
+ {
+ "type": "web",
+ "url": "https://eccc.weizmann.ac.il/keyword/14114/",
+ "detectedItemType": "multiple",
"items": "multiple"
}
]
diff --git a/Embedded Metadata.js b/Embedded Metadata.js
index 5b7f264aac9..36d6fd3bba1 100644
--- a/Embedded Metadata.js
+++ b/Embedded Metadata.js
@@ -9,7 +9,7 @@
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
- "lastUpdated": "2023-04-24 14:42:56"
+ "lastUpdated": "2023-08-16 15:18:29"
}
/*
@@ -179,7 +179,13 @@ function getContentText(doc, name, strict, all) {
}
function getContent(doc, name, strict) {
- var xpath = '/x:html/x:head/x:meta['
+ var xpath = '/x:html/'
+ + (
+ exports.searchForMetaTagsInBody
+ ? '*[local-name() = "head" or local-name() = "body"]'
+ : 'x:head' // default
+ )
+ + '/x:meta['
+ (strict ? '@name' : 'substring(@name, string-length(@name)-' + (name.length - 1) + ')')
+ '="' + name + '"]/';
return ZU.xpath(doc, xpath + '@content | ' + xpath + '@contents', namespaces);
@@ -234,10 +240,14 @@ function detectWeb(doc, url) {
function init(doc, url, callback, forceLoadRDF) {
getPrefixes(doc);
- var metaTags = doc.head.getElementsByTagName("meta");
+ let metaSelector
+ = exports.searchForMetaTagsInBody
+ ? "head > meta, body > meta"
+ : "head > meta"; // default
+ var metaTags = doc.querySelectorAll(metaSelector);
Z.debug("Embedded Metadata: found " + metaTags.length + " meta tags.");
if (forceLoadRDF /* check if this is called from doWeb */ && !metaTags.length) {
- if (doc.head) {
+ if (!exports.searchForMetaTagsInBody && doc.head) {
Z.debug(doc.head.innerHTML
.replace(/