From 450efe2d873be12131e33f78e37084264ccf6ed0 Mon Sep 17 00:00:00 2001 From: Emiliano Heyns Date: Wed, 27 Dec 2023 11:28:32 +0100 Subject: [PATCH 001/158] stock eslint support (#3177) --- .../bin/teslint.js | 136 +-------- .ci/eslint-plugin-zotero-translator/index.js | 4 +- .../lib/processor/index.js | 15 - .../lib/rules/header-last-updated.js | 55 ++++ .../lib/rules/header-translator-id.js | 65 +++++ .../lib/rules/header-translator-type.js | 72 +++++ .../lib/rules/header-valid-json.js | 13 +- .../lib/rules/last-updated.js | 56 ---- .../lib/rules/license.js | 94 +++---- .../lib/rules/no-for-each.js | 3 +- .../lib/rules/not-executable.js | 7 +- .../lib/rules/prefer-index-of.js | 2 +- .../lib/rules/robust-query-selector.js | 4 +- .../lib/rules/test-cases-valid-json.js | 30 -- .../lib/rules/test-cases.js | 165 ++++++----- .../lib/rules/translator-framework.js | 21 +- .../lib/rules/translator-id.js | 69 ----- .../lib/rules/translator-type.js | 72 ----- .../lib/translators.js | 257 ------------------ .../processor.js | 241 ++++++++++++++++ .eslintrc | 13 +- package-lock.json | 18 ++ package.json | 7 +- 23 files changed, 626 insertions(+), 793 deletions(-) delete mode 100644 .ci/eslint-plugin-zotero-translator/lib/processor/index.js create mode 100644 .ci/eslint-plugin-zotero-translator/lib/rules/header-last-updated.js create mode 100644 .ci/eslint-plugin-zotero-translator/lib/rules/header-translator-id.js create mode 100644 .ci/eslint-plugin-zotero-translator/lib/rules/header-translator-type.js delete mode 100644 .ci/eslint-plugin-zotero-translator/lib/rules/last-updated.js delete mode 100644 .ci/eslint-plugin-zotero-translator/lib/rules/test-cases-valid-json.js delete mode 100644 .ci/eslint-plugin-zotero-translator/lib/rules/translator-id.js delete mode 100644 .ci/eslint-plugin-zotero-translator/lib/rules/translator-type.js delete mode 100755 .ci/eslint-plugin-zotero-translator/lib/translators.js create mode 100644 .ci/eslint-plugin-zotero-translator/processor.js diff --git a/.ci/eslint-plugin-zotero-translator/bin/teslint.js b/.ci/eslint-plugin-zotero-translator/bin/teslint.js index dc5680fd2a0..2cfddefa53a 100755 --- a/.ci/eslint-plugin-zotero-translator/bin/teslint.js +++ b/.ci/eslint-plugin-zotero-translator/bin/teslint.js @@ -2,140 +2,8 @@ 'use strict'; -const fs = require('fs'); const path = require('path'); -const find = require('recursive-readdir'); -const { ESLint } = require("eslint"); -const argv = require('commander'); -const translators = require('../lib/translators'); +process.argv = process.argv.map(arg => arg === '--output-json' ? [ '--format', 'json', '--output-file' ] : arg).flat(); -argv - .version(ESLint.version) - .option('-o, --output-json [file | -]', 'Write report to file or stdout as JSON') - .option('-f, --fix', 'Automatically fix problems') - .option('--no-ignore', 'Disable use of ignore files and patterns') - .option('--quiet', 'Report errors only - default: false') - .option('--dump-decorated [file]', 'Dump decorated translator to file for inspection') - .parse(process.argv); - -/* PATCHES */ -// disable the processor so that fixing works -const eslintPluginZoteroTranslator = require('eslint-plugin-zotero-translator'); -delete eslintPluginZoteroTranslator.processors; - -async function main() { - // split sources to lint into regular javascript (handled by lintFiles) and translators (handled by lintText) - const sources = { - javascripts: [], - translators: [], - errors: 0, - }; - - let allResults = []; - - function findIgnore(file, stats) { - if (stats.isDirectory()) return (path.basename(file) == "node_modules" || path.basename(file) == ".ci"); - return !file.endsWith('.js'); - } - for (const target of argv.args) { - if (!fs.existsSync(target)) { - console.error(`Target file '${target}' does not exist; skipping`); // eslint-disable-line no-console - continue; - } - const files = fs.lstatSync(target).isDirectory() ? await find(target, [findIgnore]) : [target]; - for (const file of files) { - if (path.dirname(path.resolve(file)) === translators.cache.repo) { - const translator = translators.cache.get(file); - if (translator.header) { - translator.filename = file; - sources.translators.push(translator); - } - else { - sources.javascripts.push(file); - } - } - else { - sources.javascripts.push(file); - } - } - } - - const eslint = new ESLint({ - cwd: translators.cache.repo, - fix: argv.fix, - ignore: !!argv.ignore, // otherwise you can't lint stuff in hidden dirs - }); - const formatter = await eslint.loadFormatter(); - function showResults(files, results) { - if (argv.quiet) results = ESLint.getErrorResults(results); - for (const res of results) { - sources.errors += res.errorCount; - } - - if (results.length) { - console.log(formatter.format(results)); // eslint-disable-line no-console - } - else { - if (Array.isArray(files)) files = files.join(', '); - if (!argv.quiet) console.log(files, 'OK'); // eslint-disable-line no-console - } - } - - if (sources.javascripts.length) { - const results = await eslint.lintFiles(sources.javascripts); - if (argv.fix) { - for (const result of results) { - if (result.messages.find(msg => msg.ruleId === 'notice/notice' && msg.fix)) { - console.log(`Not safe to apply 'notice/notice' to ${result.filePath}`); // eslint-disable-line no-console - process.exit(1); // eslint-disable-line no-process-exit - } - } - ESLint.outputFixes(results); - } - if (argv.outputJson) { - allResults.push(...results); - } - else { - showResults(sources.javascripts, results); - } - } - - for (const translator of sources.translators) { - if (argv.dumpDecorated) fs.writeFileSync(argv.dumpDecorated, translator.source, 'utf-8'); - const results = await eslint.lintText(translator.source, { filePath: translator.filename }); - if (argv.fix) { - for (const result of results) { - if (result.output) { - try { - fs.writeFileSync(result.filePath, translators.strip(result.output), 'utf-8'); - } - catch (err) { - console.log(`Error writing fixed ${result.filePath}: ${err.message}`); // eslint-disable-line no-console - process.exit(1); // eslint-disable-line no-process-exit - } - } - } - } - if (argv.outputJson) { - allResults.push(...results); - } - else { - showResults(translator.filename, results); - } - } - - if (argv.outputJson) { - if (argv.outputJson === '-') { - process.stdout.write(JSON.stringify(allResults) + '\n'); - } - else { - fs.writeFileSync(argv.outputJson, JSON.stringify(allResults), 'utf-8'); - } - } - else { - process.exit(sources.errors); // eslint-disable-line no-process-exit - } -} - -main(); +require('../../../node_modules/.bin/eslint') diff --git a/.ci/eslint-plugin-zotero-translator/index.js b/.ci/eslint-plugin-zotero-translator/index.js index 38d67664355..9bcce023ba6 100644 --- a/.ci/eslint-plugin-zotero-translator/index.js +++ b/.ci/eslint-plugin-zotero-translator/index.js @@ -10,6 +10,6 @@ const requireDir = require('require-dir'); module.exports = { rules: requireDir('./lib/rules'), processors: { - '.js': require('./lib/processor'), - } + translator: require('./processor'), + }, }; diff --git a/.ci/eslint-plugin-zotero-translator/lib/processor/index.js b/.ci/eslint-plugin-zotero-translator/lib/processor/index.js deleted file mode 100644 index 15eefea39ff..00000000000 --- a/.ci/eslint-plugin-zotero-translator/lib/processor/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const translators = require('../translators').cache; - -module.exports = { - preprocess: function (text, filename) { - const translator = translators.get(filename); - - return [(typeof translator.source === 'string') ? translator.source : text]; - }, - - postprocess: function (messages, _filename) { - return messages[0]; - }, -}; diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/header-last-updated.js b/.ci/eslint-plugin-zotero-translator/lib/rules/header-last-updated.js new file mode 100644 index 00000000000..3d81b0e16d6 --- /dev/null +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/header-last-updated.js @@ -0,0 +1,55 @@ +'use strict'; + +const { parsed, header } = require('../../processor').support; + +module.exports = { + meta: { + type: 'problem', + docs: { + description: 'enforce valid lastUpdated in header', + category: 'Possible Errors', + }, + fixable: 'code', + }, + + create: function (context) { + return { + Program: function (node) { + const filename = context.getFilename(); + const translator = parsed(filename); + if (!translator || !translator.header.fields) return; // regular js source, or header is invalid + + const lastUpdated = header(node).properties.find(p => p.key.value === 'lastUpdated'); + + if (!lastUpdated) { + context.report({ + loc: { start: { line: 1, column: 1 } }, + message: 'Header needs lastUpdated field', + }); + return; + } + + const format = date => date.toISOString().replace('T', ' ').replace(/\..*/, ''); + const now = format(new Date()); + const fix = fixer => fixer.replaceText(lastUpdated.value, `"${now}"`); + + if (typeof lastUpdated.value.value !== 'string' || !lastUpdated.value.value.match(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/)) { + context.report({ + node: lastUpdated.value, + message: `lastUpdated field must be a string in YYYY-MM-DD HH:MM:SS format`, + fix, + }); + return; + } + + if (translator.lastUpdated && translator.lastUpdated > lastUpdated.value.value) { + context.report({ + node: lastUpdated.value, + message: `lastUpdated field must be updated to be > ${translator.lastUpdated} to push to clients`, + fix, + }); + } + } + }; + }, +}; diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/header-translator-id.js b/.ci/eslint-plugin-zotero-translator/lib/rules/header-translator-id.js new file mode 100644 index 00000000000..c323903acbc --- /dev/null +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/header-translator-id.js @@ -0,0 +1,65 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const uuid = require('uuid/v4'); + +const { repo, parsed, header, IDconflict } = require('../../processor').support; + +const deleted = new Set( + fs.readFileSync(path.join(repo, 'deleted.txt'), 'utf-8') + .split('\n') + .map(line => line.split(' ')[0]) + .filter(id => id && id.indexOf('-') > 0) +); + +module.exports = { + meta: { + type: 'problem', + docs: { + description: 'disallows translatorID re-use', + category: 'Potential Problems', + }, + fixable: 'code', + }, + + create: function (context) { + return { + Program: function (node) { + const filename = context.getFilename(); + const translator = parsed(filename); + if (!translator || !translator.header.fields) return; // regular js source, or header is invalid + + const translatorID = header(node).properties.find(p => p.key.value === 'translatorID'); + + if (!translatorID || !translatorID.value.value) { + context.report({ + node: header(node), + message: 'Header has no translator ID', + }); + return; + } + + if (deleted.has(translatorID.value.value)) { + context.report({ + node: translatorID.value, + message: 'Header re-uses translator ID of deleted translator', + fix: function (fixer) { + return fixer.replaceText(translatorID.value, `"${uuid()}"`); + } + }); + return; + } + + const conflict = IDconflict(filename); + if (conflict) { + context.report({ + node: translatorID.value, + message: `re-uses translator ID of ${conflict.label}`, + fix: fixer => fixer.replaceText(translatorID.value, `"${uuid()}"`), + }); + } + } + }; + } +}; diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/header-translator-type.js b/.ci/eslint-plugin-zotero-translator/lib/rules/header-translator-type.js new file mode 100644 index 00000000000..5efbd2dd39a --- /dev/null +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/header-translator-type.js @@ -0,0 +1,72 @@ +'use strict'; + +const { parsed } = require('../../processor').support; + +module.exports = { + meta: { + type: 'problem', + docs: { + description: 'enforce translatorType against handler functions', + category: 'Possible Errors', + }, + }, + + create: function (context) { + return { + Program: function (program) { + const translator = parsed(context.getFilename()); + if (!translator || !translator.header.fields) return; // regular js source, or header is invalid + + const functions = program.body.map((node) => { + if (node.type === 'FunctionDeclaration') return node.id && node.id.name; + if (node.type === 'VariableDeclaration' + && node.declarations.length === 1 + && node.declarations[0].init + && node.declarations[0].init.type === 'FunctionExpression') { + return node.declarations[0].id.name; + } + return null; + }) + .filter(name => name); + + const type = { + import: 1, + export: 2, + web: 4, + search: 8 + }; + + const translatorType = translator.header.fields.translatorType; + const browserSupport = translator.header.fields.browserSupport; + + if (browserSupport && !(translatorType & type.web)) { + context.report({ + loc: { start: { line: 1, column: 1 } }, + message: `browserSupport set, but translatorType (${translatorType}) does not include web (${type.web})`, + }); + return; + } + + for (const name of ['detectWeb', 'doWeb', 'detectImport', 'doImport', 'doExport']) { + const handler = functions.includes(name); + const mode = name.replace(/^(detect|do)/, '').toLowerCase(); + const bit = type[mode]; + if (handler && !(translatorType & bit)) { + context.report({ + loc: { start: { line: 1, column: 1 } }, + message: `${name} present, but translatorType (${translatorType}) does not specify ${mode} (${bit})`, + }); + return; + } + if (!handler && (translatorType & bit)) { + context.report({ + loc: { start: { line: 1, column: 1 } }, + message: `translatorType specifies ${mode} (${bit}), but no ${name} present`, + }); + return; + } + } + } + }; + }, +}; diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/header-valid-json.js b/.ci/eslint-plugin-zotero-translator/lib/rules/header-valid-json.js index e656e1dc1bd..e0aedf5a317 100644 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/header-valid-json.js +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/header-valid-json.js @@ -1,6 +1,6 @@ 'use strict'; -const translators = require('../translators').cache; +const { parsed, json } = require('../../processor').support; module.exports = { meta: { @@ -14,14 +14,15 @@ module.exports = { create: function (context) { return { Program: function (_node) { - const translator = translators.get(context.getFilename()); + const translator = parsed(context.getFilename()); - if (!translator.source) return; // regular js source + if (!translator || translator.header.fields) return; // regular js source, or header is valid json - if (translator.header.error) { + const err = json.try(translator.header.text, { line: 0, position: 1 }); + if (err) { context.report({ - message: `Could not parse header: ${translator.header.error.message}`, - loc: { start: { line: translator.error.line, column: translator.error.column } }, + message: `Could not parse header: ${err.message}`, + loc: { start: { line: err.line, column: err.column } }, }); } } diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/last-updated.js b/.ci/eslint-plugin-zotero-translator/lib/rules/last-updated.js deleted file mode 100644 index da7772b737d..00000000000 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/last-updated.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -const translators = require('../translators').cache; -const getHeaderFromAST = require('../translators').getHeaderFromAST; - -module.exports = { - meta: { - type: 'problem', - docs: { - description: 'enforce valid lastUpdated in header', - category: 'Possible Errors', - }, - fixable: 'code', - }, - - create: function (context) { - return { - Program: function (node) { - const header = getHeaderFromAST(node); - if (!header.declaration) return; - - const translator = translators.get(context.getFilename()); - - const now = new Date() - .toISOString() - .replace('T', ' ') - .replace(/\..*/, ''); - - if (!header.properties.lastUpdated) { - context.report({ - node: header.declaration, - message: 'Header needs lastUpdated field' - }); - } - else if (!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(header.properties.lastUpdated.value)) { - context.report({ - node: header.properties.lastUpdated, - message: `lastUpdated field must be in YYYY-MM-DD HH:MM:SS format`, - fix: function (fixer) { - return fixer.replaceText(header.properties.lastUpdated, `"${now}"`); - }, - }); - } - else if (translator.lastUpdated && translator.lastUpdated >= header.properties.lastUpdated.value) { - context.report({ - node: header.properties.lastUpdated, - message: `lastUpdated field must be updated to be > ${translator.lastUpdated} to push to clients`, - fix: function (fixer) { - return fixer.replaceText(header.properties.lastUpdated, `"${now}"`); - }, - }); - } - } - }; - }, -}; diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/license.js b/.ci/eslint-plugin-zotero-translator/lib/rules/license.js index b972e4d2071..07955e58169 100644 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/license.js +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/license.js @@ -1,6 +1,6 @@ 'use strict'; -const translators = require('../translators'); +const { parsed } = require('../../processor').support; const findRoot = require("find-root"); const fs = require('fs'); const path = require('path'); @@ -18,69 +18,63 @@ module.exports = { create: function (context) { return { Program: function (node) { - const header = translators.getHeaderFromAST(node); - if (!header.body) return; // if there's no file header, assume it's not a translator - if (!header.followingStatement) return; // if there's no following statement, there's more significant problems than just the license missing + const translator = parsed(context.getFilename()); + + if (!translator) return; // regular js source + + if (node.body.length < 2) return; // no body? const options = context.options[0]; - if (!options.mustMatch) throw new Error('mustMatch not set'); + if (!options.mustMatch) throw new Error('license/mustMatch not set'); + if (!options.templateFile) throw new Error('license/templateFile not set'); - let firstComment = null; - let copyright = null; - for (const comment of context.getSourceCode().getAllComments()) { - if (comment.loc.start.line <= header.body.loc.end.line) continue; // skip decorator comments + const license = context.getSourceCode().getAllComments().find((comment) => { + return comment.type === 'Block' && comment.value.match(/(BEGIN LICENSE BLOCK[\s\S]+END LICENSE BLOCK)|(Copyright)/i); + }); - if (comment.value.includes(options.mustMatch)) { - if (firstComment || comment.loc.start.line > header.followingStatement.start.line) { - context.report({ - loc: comment.loc, - message: 'Preferred to have license block at the top' - }); - } - return; + if (!license) { + const properties = translator.header.fields; + const copyright = { + holder: properties.creator || 'Zotero Contributors', + period: `${(new Date).getFullYear()}`, + }; + if (properties.lastUpdated) { + const year = properties.lastUpdated.split('-')[0] || ''; + if (year && year !== copyright.period) copyright.period = `${year}-${copyright.period}`; } - if (comment.value.match(/copyright/i)) { - copyright = comment; - } + const templateFile = fs.existsSync(options.templateFile) + ? options.templateFile + : path.resolve(path.join(findRoot(context.getFilename()), options.templateFile)); + if (!fs.existsSync(templateFile)) throw new Error(`cannot find ${templateFile}`); + const template = fs.readFileSync(templateFile, 'utf-8'); - firstComment = firstComment || comment; - } - if (copyright) { + const licenseText = '\n\n' + template.trim().replace(/\${(.*?)\}/g, (_, id) => { + id = id.trim(); + return copyright[id] || ``; + }) + '\n\n'; context.report({ - loc: copyright.loc, - message: `Copyright preferred to be ${options.mustMatch}`, + message: 'Missing license block', + loc: node.body[1].loc.start, + fix: fixer => fixer.insertTextBefore(node.body[1], licenseText), }); return; } - if (!options.templateFile) throw new Error('templateFile not set'); - const templateFile = fs.existsSync(options.templateFile) - ? options.templateFile - : path.resolve(path.join(findRoot(context.getFilename()), options.templateFile)); - if (!fs.existsSync(templateFile)) throw new Error(`cannot find ${templateFile}`); - const template = fs.readFileSync(templateFile, 'utf-8'); - - copyright = { - holder: header.properties.creator ? header.properties.creator.value : null, - period: `${(new Date).getFullYear()}`, - }; - if (header.properties.lastUpdated) { - const year = header.properties.lastUpdated.value.split('-')[0] || ''; - if (year && year !== copyright.period) copyright.period = `${year}-${copyright.period}`; + if (node.body.length > 2 && node.body[1].loc.start.line < license.loc.start.line) { + context.report({ + loc: license.loc, + message: 'Preferred to have license block at the top' + }); + return; } - const licenseText = '\n\n' + template.trim().replace(/\${(.*?)\}/g, (_, id) => { - id = id.trim(); - return copyright[id] || ``; - }) + '\n\n'; - context.report({ - node: header.followingStatement, - message: "Missing license block", - fix: (firstComment && firstComment.type === 'Block') - ? undefined - : fixer => fixer.insertTextBefore(header.followingStatement, licenseText), - }); + if (!license.value.match(new RegExp(options.mustMatch))) { + context.report({ + loc: license.loc, + message: `Copyright preferred to be ${options.mustMatch}`, + }); + } } }; }, diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/no-for-each.js b/.ci/eslint-plugin-zotero-translator/lib/rules/no-for-each.js index 655ed0b47d7..bf3f8e4f207 100644 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/no-for-each.js +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/no-for-each.js @@ -12,7 +12,7 @@ module.exports = { create: function (context) { return { - Program: function (node) { + Program: function (_node) { let lineno = 0; for (const line of context.getSourceCode().getText().split('\n')) { lineno += 1; @@ -20,7 +20,6 @@ module.exports = { const m = line.match(/for each *\(/); if (m) { context.report({ - node, message: "Deprecated JavaScript 'for each' statement", loc: { start: { line: lineno, column: line.indexOf(m[0]) + 1 } }, }); diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/not-executable.js b/.ci/eslint-plugin-zotero-translator/lib/rules/not-executable.js index 3403a15a4cc..8927c550157 100644 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/not-executable.js +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/not-executable.js @@ -3,7 +3,7 @@ const fs = require('fs'); const path = require('path'); -const translators = require('../translators').cache; +const { parsed } = require('../../processor').support; module.exports = { meta: { @@ -19,11 +19,8 @@ module.exports = { Program: function (node) { if (process.platform == 'win32') return; // X_OK always succeeds on Windows - const translator = translators.get(context.getFilename()); - - if (!translator.source) return; // only check translators - const filename = context.getFilename(); + if (!parsed(filename)) return; // only check translators try { fs.accessSync(filename, fs.constants.X_OK); diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/prefer-index-of.js b/.ci/eslint-plugin-zotero-translator/lib/rules/prefer-index-of.js index fd8a6186478..c534f4cb84b 100644 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/prefer-index-of.js +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/prefer-index-of.js @@ -26,7 +26,7 @@ module.exports = { message: node.callee.property.name === 'indexOf' ? "Unnecessary '.indexOf()', use '.includes()' instead" : "Unnecessary '.search()', use 'RegExp#test()' instead", - *fix(fixer) { + * fix(fixer) { let test = node.callee.property.name === 'indexOf' ? `${source.getText(node.callee.object)}.contains(${source.getText(node.arguments[0])})` : `${source.getText(node.arguments[0])}.test(${source.getText(node.callee.object)})`; diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/robust-query-selector.js b/.ci/eslint-plugin-zotero-translator/lib/rules/robust-query-selector.js index c0838c358f6..542819c3de7 100644 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/robust-query-selector.js +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/robust-query-selector.js @@ -21,7 +21,7 @@ module.exports = { context.report({ node, message: "Prefer #id over [id=\"id\"]", - *fix(fixer) { + * fix(fixer) { yield fixer.replaceText(node.arguments[0], arg.replaceAll(idRe, "#$2")); } }); @@ -31,7 +31,7 @@ module.exports = { context.report({ node, message: "Prefer .class over [class=\"class\"]", - *fix(fixer) { + * fix(fixer) { yield fixer.replaceText(node.arguments[0], arg.replaceAll(classRe, (_, __, name) => `.${name.replaceAll(/\s+/g, '.')}`)); } diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases-valid-json.js b/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases-valid-json.js deleted file mode 100644 index f97bc884b9e..00000000000 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases-valid-json.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -const translators = require('../translators').cache; - -module.exports = { - meta: { - type: 'problem', - docs: { - description: 'disallow invalid JSON in test cases', - category: 'Possible Errors', - }, - }, - - create: function (context) { - return { - Program: function (_node) { - const translator = translators.get(context.getFilename()); - - if (!translator.testCases) return; // regular js or no test cases - - if (translator.testCases.error) { - context.report({ - message: `Could not parse testCases: ${translator.testCases.error.message}`, - loc: { start: { line: translator.testCases.error.line, column: translator.testCases.error.column } }, - }); - } - } - }; - }, -}; diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js b/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js index 5e9a67169e5..de1b97f73c4 100644 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js @@ -1,6 +1,22 @@ 'use strict'; -const translators = require('../translators').cache; +const { parsed, json } = require('../../processor').support; + +function zip(arrays) { + let zipped = null; + for (const [key, array] of Object.entries(arrays)) { + if (!zipped) { + zipped = Array(array.length).fill(null).map((_, i) => ({ _: i })); + } + else if (array.length !== zipped.length) { + throw new Error(`Array length mismatch: ${key} has ${array.length} elements, but ${zipped.length} expected`); + } + for (const [i, value] of array.entries()) { + zipped[i][key] = value; + } + } + return zipped; +} module.exports = { meta: { @@ -15,139 +31,148 @@ module.exports = { create: function (context) { return { Program: function (node) { - const translator = translators.get(context.getFilename()); - - const declaration = node.body.find(node => node.type === 'VariableDeclaration' && node.declarations.length === 1 && node.declarations[0].id.name === 'testCases'); - const testCases = declaration - && declaration.declarations[0].init - && declaration.declarations[0].init.type === 'ArrayExpression' - ? declaration.declarations[0].init.elements - : []; - - if (declaration) { - const sourceCode = context.getSourceCode(); - const token = sourceCode.getLastToken(node); - if (token.type === 'Punctuator' && token.value === ';') { - context.report({ - message: 'testCases should not have trailing semicolon', - loc: declaration.loc.end, - }); - } + const translator = parsed(context.getFilename()); + if (!translator || !translator.testcases.text) return; // regular js source, or no testcases + + const err = json.try(translator.testcases.text, { line: translator.testcases.start, position: 3 }); + if (err) { + context.report({ + message: `Could not parse testcases: ${err.message}`, + loc: { start: { line: err.line, column: err.column } }, + }); + return; + } + + const declaration = node.body.find(node => ( + node.type === 'VariableDeclaration' + && node.declarations.length === 1 + && node.declarations[0].id.name === 'testCases' + )); + if (declaration.followingStatement) { + context.report({ + node: declaration.followingStatement, + message: 'testCases should not have trailing code', + }); } - if (!translator.testCases || translator.testCases.error) return; // regular js or no test cases + const nodes = declaration.declarations[0].init.elements || []; + if (!nodes.length) { + context.report({ + node: declaration, + message: 'testCases must be an array', + }); + return; + } - let caseNo = -1; - for (const testCase of translator.testCases.parsed) { - caseNo += 1; - const prefix = `test case${testCases[caseNo] ? '' : ' ' + (caseNo + 1)}`; - const loc = testCases[caseNo] ? testCases[caseNo].loc.start : { start: { line: translator.testCases.start, column: 1 } }; + const sourceCode = context.getSourceCode(); + const token = sourceCode.getLastToken(node); + if (token.type === 'Punctuator' && token.value === ';') { + context.report({ + message: 'testCases should not have trailing semicolon', + loc: declaration.loc.end, + }); + } + zip({ + testCase: JSON.parse(translator.testcases.text), + node: nodes, + }) + .forEach(({ testCase, node }) => { if (!['web', 'import', 'search'].includes(testCase.type)) { context.report({ - message: `${prefix} has invalid type "${testCase.type}"`, - loc, + node, + message: `test case has invalid type "${testCase.type}"`, }); - continue; + return; } if (!(Array.isArray(testCase.items) || (testCase.type === 'web' && testCase.items === 'multiple'))) { context.report({ - message: `${prefix} of type "${testCase.type}" needs items`, - loc, + node, + message: `test case of type "${testCase.type}" needs items`, }); } if (testCase.type === 'web' && typeof testCase.url !== 'string') { context.report({ - message: `${prefix} of type "${testCase.type}" test needs url`, - loc, + node, + message: `test case of type "${testCase.type}" test needs url`, }); } if (['import', 'search'].includes(testCase.type) && !testCase.input) { context.report({ - message: `${prefix} of type "${testCase.type}" needs a string input`, - loc, + node, + message: `test case of type "${testCase.type}" needs a string input`, }); } else if (testCase.type === 'import' && typeof testCase.input !== 'string') { context.report({ - message: `${prefix} of type "${testCase.type}" needs input`, - loc, + node, + message: `test case of type "${testCase.type}" needs input`, }); } else if (testCase.type === 'search') { - // console.log(JSON.stringify(testCase.input)) const expected = ['DOI', 'ISBN', 'PMID', 'identifiers', 'contextObject', 'adsBibcode', 'ericNumber']; - let keys; - if (Array.isArray(testCase.input)) { - keys = testCase.input.flatMap(Object.keys); - } - else { - keys = Object.keys(testCase.input); - } + const keys = Array.isArray(testCase.input) ? testCase.input.flatMap(Object.keys) : Object.keys(testCase.input); + if (!keys.every(key => expected.includes(key))) { - let invalidKey = keys.find(key => !expected.includes(key)); + const invalidKey = keys.find(key => !expected.includes(key)); context.report({ - message: `${prefix} of type "${testCase.type}" has invalid search term '${invalidKey}' - expected one of ${expected.join(', ')}`, - loc, + node, + message: `test case of type "${testCase.type}" has invalid search term '${invalidKey}' - expected one of ${expected.join(', ')}`, }); } } if (Array.isArray(testCase.items)) { - let itemsNode = testCases[caseNo].properties - .find(prop => prop.key.type == 'Literal' && prop.key.value == 'items') - .value; - for (let [itemIndex, item] of testCase.items.entries()) { - let itemNode = itemsNode.elements[itemIndex]; - let itemLoc = itemNode.loc; - + zip({ + item: testCase.items, + node: node.properties.find(prop => prop.key.type === 'Literal' && prop.key.value === 'items').value.elements, + }) + .forEach(({ item, node }) => { if (!Array.isArray(item.creators)) { context.report({ message: 'creators should be an array', - loc: itemLoc, + node, }); - continue; + return; } - for (let [creatorIndex, creator] of item.creators.entries()) { - let creatorLoc = itemNode.properties - .find(prop => prop.key.type == 'Literal' && prop.key.value == 'creators') - .value - .elements[creatorIndex] - .loc; - + zip({ + creator: item.creators, + node: node.properties.find(prop => prop.key.type === 'Literal' && prop.key.value === 'creators').value.elements, + }) + .forEach(({ creator, node }) => { if (creator.fieldMode !== undefined && creator.fieldMode !== 1) { context.report({ + node, message: 'creator.fieldMode should be omitted or 1', - loc: creatorLoc, }); } else if (creator.fieldMode === 1 && (creator.firstName || !creator.lastName)) { context.report({ + node, message: 'creator with fieldMode == 1 should have lastName and no firstName', - loc: creatorLoc, }); } else if (!creator.firstName && !creator.lastName) { context.report({ + node, message: 'creator has no name', - loc: creatorLoc, }); } if (!creator.creatorType) { context.report({ + node, message: 'creator has no creatorType', - loc: creatorLoc, }); } - } - } + }); + }); } - } + }); } }; }, diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/translator-framework.js b/.ci/eslint-plugin-zotero-translator/lib/rules/translator-framework.js index 46709d02117..bedc63809c3 100644 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/translator-framework.js +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/translator-framework.js @@ -1,6 +1,6 @@ 'use strict'; -const translators = require('../translators'); +const { parsed } = require('../../processor').support; module.exports = { meta: { @@ -14,19 +14,14 @@ module.exports = { create: function (context) { return { - Program: function (node) { - const header = translators.getHeaderFromAST(node); - if (!header.body) return; // if there's no file header, assume it's not a translator + Program: function (_node) { + const translator = parsed(context.getFilename()); + if (!translator || !translator.FW) return; // regular js source, or no FW present - const sourceCode = context.getSourceCode(); - for (const comment of sourceCode.getAllComments()) { - if (comment.value.match(/^\s*FW LINE [0-9]+:/)) { - context.report({ - loc: comment.loc, - message: 'uses deprecated Translator Framework' - }); - } - } + context.report({ + loc: translator.FW.loc, + message: 'uses deprecated Translator Framework' + }); } }; }, diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/translator-id.js b/.ci/eslint-plugin-zotero-translator/lib/rules/translator-id.js deleted file mode 100644 index 7eaa526f3b8..00000000000 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/translator-id.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const path = require('path'); -const uuid = require('uuid/v4'); - -const translators = require('../translators').cache; -const getHeaderFromAST = require('../translators').getHeaderFromAST; - -const deleted = new Set( - fs.readFileSync(path.join(translators.repo, 'deleted.txt'), 'utf-8') - .split('\n') - .map(line => line.split(' ')[0]) - .filter(id => id && id.indexOf('-') > 0) -); - -module.exports = { - meta: { - type: 'problem', - docs: { - description: 'disallows translatorID re-use', - category: 'Potential Problems', - }, - fixable: 'code', - }, - - create: function (context) { - return { - Program: function (node) { - const filename = context.getFilename(); - const header = getHeaderFromAST(node); - if (!header.declaration) return; - - if (!header.properties.translatorID) { - context.report({ - node: header.declaration, - message: 'Header has no translator ID', - }); - } - else if (deleted.has(header.properties.translatorID.value)) { - context.report({ - node: header.properties.translatorID, - message: 'Header re-uses translator ID of deleted translator', - fix: function (fixer) { - return fixer.replaceText(header.properties.translatorID, `"${uuid()}"`); - } - }); - } - else if (!header.properties.translatorID.value) { - context.report({ - node: header.properties.translatorID, - message: 'Header has empty translator ID', - }); - } - else { - const conflict = translators.conflicts(filename, header.properties.translatorID.value); - if (conflict) { - const translator = translators.get(filename); - context.report({ - node: header.properties.translatorID, - message: `Header re-uses translator ID of ${conflict.label}`, - fix: !translator.modified ? undefined : (fixer => fixer.replaceText(header.properties.translatorID, `"${uuid()}"`)), - }); - } - } - } - }; - }, -}; diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/translator-type.js b/.ci/eslint-plugin-zotero-translator/lib/rules/translator-type.js deleted file mode 100644 index 4a83c9d7eff..00000000000 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/translator-type.js +++ /dev/null @@ -1,72 +0,0 @@ -'use strict'; - -const getHeaderFromAST = require('../translators').getHeaderFromAST; - -function getFunction(programNode, name) { - return programNode.body.find((node) => { - if (node.type === 'FunctionDeclaration' && node.id && node.id.name === name) return true; - if (node.type === 'VariableDeclaration' - && node.declarations.length === 1 - && node.declarations[0].id.name === name - && node.declarations[0].init - && node.declarations[0].init.type === 'FunctionExpression' - ) return true; - - return false; - }); -} - -module.exports = { - meta: { - type: 'problem', - docs: { - description: 'enforce translatorType against handler functions', - category: 'Possible Errors', - }, - }, - - create: function (context) { - return { - Program: function (node) { - const header = getHeaderFromAST(node); - if (!header.declaration) return; - - const type = { - import: 1, - export: 2, - web: 4, - search: 8 - }; - - let translatorTypeNode = header.declaration; - let translatorType = 0; - let browserSupportNode = null; - for (const [p, v] of Object.entries(header.properties)) { - switch (p) { - case 'translatorType': - translatorTypeNode = v; - translatorType = v.value; - break; - case 'browserSupport': - browserSupportNode = v; - break; - } - } - - if (browserSupportNode && !(translatorType & type.web)) context.report(browserSupportNode, `browserSupport set, but translatorType (${translatorType}) does not include web (${type.web})`); - - for (const name of ['detectWeb', 'doWeb', 'detectImport', 'doImport', 'doExport']) { - const handler = getFunction(node, name); - const mode = name.replace(/^(detect|do)/, '').toLowerCase(); - const bit = type[mode]; - if (handler && !(translatorType & bit)) { - context.report(handler, `${name} present, but translatorType (${translatorType}) does not specify ${mode} (${bit})`); - } - if (!handler && (translatorType & bit)) { - context.report(translatorTypeNode, `translatorType specifies ${mode} (${bit}), but no ${name} present`); - } - } - } - }; - }, -}; diff --git a/.ci/eslint-plugin-zotero-translator/lib/translators.js b/.ci/eslint-plugin-zotero-translator/lib/translators.js deleted file mode 100755 index 8a0bbfef6c9..00000000000 --- a/.ci/eslint-plugin-zotero-translator/lib/translators.js +++ /dev/null @@ -1,257 +0,0 @@ -'use strict'; - -const fs = require('fs'); -const path = require('path'); -const findRoot = require('find-root'); -const childProcess = require('child_process'); - -let repo; -try { - repo = path.resolve(findRoot(__dirname, dir => fs.existsSync(path.resolve(dir, '.git')))); -} -catch (e) { - console.error('ERROR: Translators can only be linted inside a clone of the zotero/translators repo (not a ZIP downloaded from GitHub)'); - console.error(' git clone https://github.com/zotero/translators.git'); - process.exit(1); -} - -const metaDataRules = [ - 'zotero-translator/header-valid-json', - 'zotero-translator/last-updated', - 'zotero-translator/translator-id', - 'zotero-translator/test-cases-valid-json', - 'zotero-translator/test-cases', - 'zotero-translator/translator-type', - 'zotero-translator/prefer-index-of', - 'zotero-translator/no-for-each', - 'zotero-translator/not-executable', - 'indent', -].join(', '); - -const headerVar = '__eslintZoteroTranslatorHeader'; -const headerPrefix = `/* eslint-disable no-unused-vars */ const ${headerVar} = /* eslint-disable */(/* eslint-enable ${metaDataRules} */`; - -function jsonParseWithErrorInfo(raw, source) { - const target = { raw }; - target.lines = target.raw.split('\n').length; - - try { - target.parsed = JSON.parse(target.raw); - } - catch (err) { - const position = err.message.match(/at position ([0-9]+)/); - const at = position ? parseInt(position[1]) : 0; - target.error = { - message: err.message, - line: source.substring(0, source.indexOf(raw)).split('\n').length // start of raw JSON - + target.raw.substring(0, at).split('\n').length, // line within raw JSON - column: at - target.raw.lastIndexOf('\n', at), - }; - } - - return target; -} - -function escapeRE(string) { - return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); -} -const re = { - undecorated: new RegExp( - /^(\{[\s\S]+?\n\})/.source // the header - + /(\n[\s\S]+?)/.source // the code - + '(?:' // test cases - + /(\/\*\* BEGIN TEST CASES \*\*\/)([\s\S]+?)/.source // var testCases = - + /(\[[\s\S]+\])/.source // the test cases - + /([\s\S]+)/.source // trailing stuff after the test cases - + ')?$' // test cases are optional - ), - - decorated: new RegExp( - /^([\s\S]*?)/.source // anything the fixer might have placed at the top - + escapeRE(headerPrefix) // all the eslint junk we injected - + /(\{[\s\S]+\})/.source // the header - + escapeRE(');/* eslint-enable */') // more eslint stuff we injected - + /([\s\S]+?)/.source // the code - + '(?:' // optional test cases - + /(\/\*\* BEGIN TEST CASES \*\*\/)/.source - + escapeRE('/* eslint-disable */') // more eslint stuff we injected - + /([\s\S]+?)/.source // var testCases = - + escapeRE(`/* eslint-enable ${metaDataRules} */`) - + /([\s\S]+)/.source - + ')?$' - ), -}; - -const tfw = { - rules: [ - 'block-spacing', - 'brace-style', - 'comma-spacing', - 'consistent-return', - 'consistent-this', - 'key-spacing', - 'keyword-spacing', - 'no-array-constructor', - 'no-cond-assign', - 'no-new-object', - 'no-sequences', - 'no-undef', - 'no-unused-expressions', - 'no-void', - 'object-curly-spacing', - 'semi', - 'semi-spacing', - 'space-before-blocks', - 'space-before-function-paren', - 'space-infix-ops', - ] -}; -tfw.disable = ` // eslint-disable-line ${tfw.rules.join(', ')}`; -tfw.disableRe = new RegExp('(\\n' + escapeRE('/* FW LINE 59:b820c6d */') + '[^\\n]+?)(' + escapeRE(tfw.disable) + ')?(\\n)'); - -function decorate(source) { - const decorated = {}; - - if (!source.startsWith('{')) return decorated; - - let m = source.match(re.undecorated); - if (!m) throw new Error('no header'); - - let [, header, code, testCasesPrefix, testCasesVar, testCases, testCasesPostfix] = m; - - code = code.replace(tfw.disableRe, `$1${tfw.disable}$3`); - - // decorate header - decorated.header = jsonParseWithErrorInfo(header, source); - - decorated.source = headerPrefix - + header // the JSON - + ');/* eslint-enable */' - + code; // the actual code - - if (testCasesPrefix) { - decorated.testCases = jsonParseWithErrorInfo(testCases, source); - - decorated.source += testCasesPrefix // the prefix - + '/* eslint-disable */' // disable all the rules - + testCasesVar - + `/* eslint-enable ${metaDataRules} */` // enable JSON rules - + testCases - + testCasesPostfix; - } - - return decorated; -} - -function tryFormatJSON(raw) { - try { - return JSON.stringify(JSON.parse(raw), null, '\t'); - } - catch (_err) { - return raw; - } -} -function strip(source) { - const m = source.match(re.decorated); - if (!m) throw new Error('not decorated'); - - let [, prefix, header, code, testCasesPrefix, testCasesVar, testCases] = m; - - code = code.replace(tfw.disableRe, '$1$3'); - - return tryFormatJSON(header) + (prefix ? '\n\n' + prefix.replace(/^\s*/, '') : '') + code + (testCasesPrefix || '') + tryFormatJSON(testCasesVar || '') + (testCases || ''); -} - -function exec(cmd) { - return childProcess.execSync(cmd, { cwd: repo, encoding: 'utf8' }); -} - -class Cache { - constructor() { - this.decorated = {}; - - this.repo = path.resolve(repo); - for (const translator of fs.readdirSync(this.repo)) { - if (!translator.endsWith('.js')) continue; - this.decorated[path.basename(translator)] = decorate(fs.readFileSync(path.join(repo, translator), 'utf-8')); - } - - const branch = exec('git rev-parse --abbrev-ref HEAD').trim(); - - const hasUpstream = exec('git remote -v').split('\n') - .map(line => line.trim()) - .includes('upstream\thttps://github.com/zotero/translators.git'); - // branch to compare lastUpdated against -- assume that if have upstream/master, you want to compare against that - const master = hasUpstream ? 'upstream/master' : 'master'; - - this.lastUpdated = {}; - if (branch !== master) { - // `git diff --name-status ${master}` will fetch the names of the files that have changed against `${master}` - for (const file of exec(`git diff --name-status ${master}`).split('\n')) { - const m = file.match(/^M\t([^/]+\.js)$/); // js files that are modified but don't have a / in their path to pick out files in the root - if (m && this.decorated[m[1]]) this.decorated[m[1]].modified = true; - } - - /* - We do a `git grep '"lastUpdated"' ${master} *.js` to get the - `lastUpdated` values from the `${master}` branch. For files that are - deemed changed, the lastUpdated is remembered (so the presence of lastUpdated implies modified). - This info is used in the 'last-updated' rule. - */ - for (const lu of exec(`git grep '"lastUpdated"' ${master} *.js`).split('\n')) { - const m = lu.match(/^[a-z/]+:([^:]+):\s*"lastUpdated"\s*:\s*"([-0-9: ]+)"/); - if (!m) continue; - const translator = m[1]; - if (this.decorated[translator] && this.decorated[translator].modified) this.decorated[translator].lastUpdated = m[2]; - } - } - } - - get(filename) { - const basename = path.basename(filename); - - // don't load stuff outside the root dir - if (!this.decorated[basename] && path.dirname(path.resolve(filename)) !== this.repo) this.decorated[basename] = {}; - - return this.decorated[basename]; - } - - conflicts(filename, translatorID) { - filename = path.basename(filename); - for (const [otherFilename, otherHeader] of Object.entries(this.decorated)) { - if (otherFilename !== filename && otherHeader.translatorID === translatorID) { - return otherHeader.parsed; - } - } - return false; - } -} - -function getHeaderFromAST(programNode) { - const declaration = programNode.body[0]; - if (!declaration) return {}; - if (declaration.type !== 'VariableDeclaration' || declaration.declarations.length !== 1 || declaration.declarations[0].id.name !== headerVar) return {}; - - const body = declaration.declarations[0].init; - if (!body || body.type !== 'ObjectExpression') return {}; - - const properties = {}; - for (const property of body.properties) { - properties[property.key.value] = property.value; - } - return { declaration, body, properties, followingStatement: programNode.body[1] }; -} - -module.exports = { - decorate, - strip, - cache: new Cache(), - getHeaderFromAST, -}; - -if (require.main === module) { - const orig = fs.readFileSync(path.join(__dirname, '../../../Amazon.js'), 'utf-8'); - const decorated = decorate(orig); - const stripped = strip(decorated.source); - console.log(stripped === orig); // eslint-disable-line no-console -} diff --git a/.ci/eslint-plugin-zotero-translator/processor.js b/.ci/eslint-plugin-zotero-translator/processor.js new file mode 100644 index 00000000000..f70ea9396be --- /dev/null +++ b/.ci/eslint-plugin-zotero-translator/processor.js @@ -0,0 +1,241 @@ +'use strict'; + +const espree = require('espree'); +const clarinet = require('clarinet'); +const findRoot = require('find-root'); +const path = require('path'); +const fs = require('fs'); +const childProcess = require('child_process'); + +let repo; +try { + repo = path.resolve(findRoot(__dirname, dir => fs.existsSync(path.join(dir, '.git')))); +} +catch (e) { + console.error('ERROR: Translators can only be linted inside a clone of the zotero/translators repo (not a ZIP downloaded from GitHub)'); + console.error(' git clone https://github.com/zotero/translators.git'); + process.exit(1); // eslint-disable-line no-process-exit +} + +function exec(cmd) { + return childProcess.execSync(cmd, { cwd: repo, encoding: 'utf8' }); +} + +// have to pre-load evertyhing to test for conflicting headers +const cache = {}; +for (let filename of fs.readdirSync(repo).sort()) { + if (!filename.endsWith('.js')) continue; + filename = path.join(repo, filename); + + const text = fs.readFileSync(filename, 'utf-8'); + + if (text[0] !== '{') continue; + + // detect header + const prefix = `const ZoteroTranslator${Date.now()} = `; + const decorated = `${prefix}${text}`; + let ast; + try { + ast = espree.parse(decorated, { comment: true, loc: true, ecmaVersion: 2018 }); + } + catch (err) { + console.log(filename, err.message); + process.exit(1); // eslint-disable-line no-process-exit + } + + const header = ((ast.body[0] || {}).declarations[0] || {}).init; + const testcases = ast.body + .filter((node, i) => i === ast.body.length - 1) + .filter(node => node.type === 'VariableDeclaration' && node.declarations.length === 1).map(node => node.declarations[0]) + .filter(node => node.type === 'VariableDeclarator' && node.id.type === 'Identifier' && node.id.name === 'testCases') + .map(node => node.init)[0]; + + const extract = (node) => { + if (!node) return {}; + return { + start: node.loc.start.line, + end: node.loc.end.line, + text: decorated.substring(node.start, node.end), + }; + }; + + cache[filename] = { + header: extract(header), + testcases: extract(testcases), + FW: ast.comments.find(comment => comment.type === 'Block' && comment.value.trim === 'FW LINE 59:b820c6d') + }; + + try { + cache[filename].header.fields = JSON.parse(cache[filename].header.text); + } + catch (err) { + // ignore + } +} + +for (const lu of exec(`git grep '"lastUpdated"' HEAD~1`).split('\n')) { + const m = lu.match(/^HEAD~1:([^:]+):\s*"lastUpdated"\s*:\s*"([-0-9: ]+)"/); + if (!m) continue; + const [, translator, lastUpdated] = m; + const filename = path.join(repo, translator); + if (cache[filename]) cache[filename].lastUpdated = lastUpdated; +} + +function tryJSON(json, offset) { + const parser = clarinet.parser(); + let error; + + const message = e => ({ + message: (e.message || '').split('\n', 1)[0], + line: parser.line + offset.line, + column: parser.column, + position: parser.position + offset.position, + }); + + // trigger the parse error + parser.onerror = function (e) { + error = message(e); + parser.close(); + }; + + try { + parser.write(json).close(); + } + catch (e) { + return error || message(e); + } + + return error; +} + +function JSONTokens(json, offset) { + const parser = clarinet.parser(); + const tokens = []; + + parser.onvalue = function (v) { + tokens.push({ type: 'value', value: v, line: parser.line + offset.line, column: parser.column, position: parser.position + offset.position }); + }; + parser.onopenobject = function (key) { + tokens.push({ type: 'object-open', key, line: parser.line + offset.line, column: parser.column, position: parser.position + offset.position }); + }; + parser.onkey = function (key) { + tokens.push({ type: 'key', key, line: parser.line + offset.line, column: parser.column, position: parser.position + offset.position }); + }; + parser.oncloseobject = function () { + tokens.push({ type: 'object-close', line: parser.line + offset.line, column: parser.column, position: parser.position + offset.position }); + }; + parser.onopenarray = function () { + tokens.push({ type: 'array-open', line: parser.line + offset.line, column: parser.column, position: parser.position + offset.position }); + }; + parser.onclosearray = function () { + tokens.push({ type: 'array-close', line: parser.line + offset.line, column: parser.column, position: parser.position + offset.position }); + }; + + parser.write(json).close(); + return tokens; +} + +function header(program) { + if (!program) return null; + if (program.type !== 'Program') return null; + if (program.body.length === 0) return null; + if (program.body[0].type !== 'ExpressionStatement') return null; + if (program.body[0].expression.type !== 'ObjectExpression') return null; + return program.body[0].expression; +} + +function conflict(filename) { + const translatorID = (((cache[filename] || {}).header || {}).fields || {}).translatorID; + if (!translatorID) return null; + for (const [other, header] of Object.entries(cache)) { + if (other !== filename && header.translatorID === translatorID) { + return header.fields; + } + } + return null; +} + +const junk = new RegExp(`${path.sep}0_`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') + '.*'); +module.exports = { + support: { + repo, + parsed: filename => cache[filename.replace(junk, '')], + header, + IDconflict: conflict, + json: { + try: tryJSON, + tokens: JSONTokens, + } + }, + + supportsAutofix: true, + + preprocess: function (text, filename) { + const parsed = cache[filename]; + if (text[0] !== '{' || !parsed) return [{ text, filename }]; + + if (parsed.header.text) { + return [{ text: `(${text.slice(0, parsed.header.text.length)});${text.slice(parsed.header.text.length)}`, filename }]; + } + else { + return [{ text, filename }]; + } + }, + + postprocess: function (messages, filename) { + messages = [].concat(...messages); + + const parsed = cache[filename]; + + if (parsed) { + const header = parsed.header; + if (header.text) { + messages = messages.filter((m) => { + if (!m.ruleId) return true; + if (m.ruleId.startsWith('zotero-translator/header') && m.line > header.end) return false; + switch (m.ruleId) { + case 'no-unused-expressions': + return m.line !== 1; + case 'quote-props': + return m.line > header.end; + default: + } + return true; + }); + + const adjust = (p) => { + if (p > header.text.length) return p - 3; // remove '(' and ');' + if (p > 1) return p - 1; // remove '(' + return p; + }; + for (const m of messages) { + if (m.fix) m.fix.range = m.fix.range.map(adjust); + if (m.suggestions) { + for (const s of m.suggestions) { + if (s.fix) s.fix.range = s.fix.range.map(adjust); + } + } + } + } + + const testcases = parsed.testcases; + if (testcases && testcases.text) { + messages = messages.filter((m) => { + if (!m.ruleId) return true; + if (m.ruleId.startsWith('zotero-translator/test-cases') && m.line < testcases.start) return false; + + switch (m.ruleId) { + case 'semi': + case 'quote-props': + return m.line < testcases.start || m.line > testcases.end; + case 'lines-around-comment': + return m.line !== testcases.end + 1; + } + return true; + }); + } + } + + return messages; + }, +}; diff --git a/.eslintrc b/.eslintrc index ee878c44589..916ca475da3 100644 --- a/.eslintrc +++ b/.eslintrc @@ -23,23 +23,23 @@ "error", { "argsIgnorePattern": "^_", - "varsIgnorePattern": "^detectWeb$|^doWeb$|^detectImport$|^doImport$|^doExport$|^detectSearch$|^doSearch$|^exports$" + "varsIgnorePattern": "^testCases$|^detectWeb$|^doWeb$|^detectImport$|^doImport$|^doExport$|^detectSearch$|^doSearch$|^exports$" } ], "no-redeclare": ["error", {"builtinGlobals": true}], + "linebreak-style": ["error", "unix"], "zotero-translator/not-executable": "error", "zotero-translator/header-valid-json": "error", - "zotero-translator/translator-id": "error", - "zotero-translator/last-updated": "warn", - "zotero-translator/translator-type": "warn", + "zotero-translator/header-translator-id": "error", + "zotero-translator/header-last-updated": "warn", + "zotero-translator/header-translator-type": "warn", "zotero-translator/no-for-each": "warn", "zotero-translator/prefer-index-of": "warn", "zotero-translator/robust-query-selector": "warn", - "zotero-translator/test-cases-valid-json": "error", "zotero-translator/test-cases": "error", "zotero-translator/translator-framework": "warn", @@ -50,5 +50,6 @@ }, "plugins": [ "zotero-translator" - ] + ], + "processor": "zotero-translator/translator" } diff --git a/package-lock.json b/package-lock.json index 22b4b9033e1..04764cce70a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "devDependencies": { "@zotero/eslint-config": "^1.0.5", "chromedriver": "^115.0.0", + "clarinet": "^0.12.6", "eslint": "^8.38.0", "eslint-plugin-zotero-translator": "file:.ci/eslint-plugin-zotero-translator", "selenium-webdriver": "^4.0.0-alpha.7" @@ -358,6 +359,17 @@ "node": ">=16" } }, + "node_modules/clarinet": { + "version": "0.12.6", + "resolved": "https://registry.npmjs.org/clarinet/-/clarinet-0.12.6.tgz", + "integrity": "sha512-0FR+TrvLbYHLjhzs9oeIbd3yfZmd4u2DzYQEjUTm2dNfh4Y/9RIRWPjsm3aBtrVEpjKI7+lWa4ouqEXoml84mQ==", + "dev": true, + "engines": { + "chrome": ">=16.0.912", + "firefox": ">=0.8.0", + "node": ">=0.3.6" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1902,6 +1914,12 @@ "tcp-port-used": "^1.0.1" } }, + "clarinet": { + "version": "0.12.6", + "resolved": "https://registry.npmjs.org/clarinet/-/clarinet-0.12.6.tgz", + "integrity": "sha512-0FR+TrvLbYHLjhzs9oeIbd3yfZmd4u2DzYQEjUTm2dNfh4Y/9RIRWPjsm3aBtrVEpjKI7+lWa4ouqEXoml84mQ==", + "dev": true + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", diff --git a/package.json b/package.json index 730fe84040a..b4d9eb207fe 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "Continuous integration of Zotero translators", "main": "index.js", "scripts": { - "test": "teslint .", - "lint": "teslint", + "test": "eslint .", + "lint": "eslint", "lint:linter": "eslint --no-ignore .ci", "updateTypes": ".ci/updateTypes.mjs" }, @@ -19,6 +19,7 @@ "chromedriver": "^115.0.0", "eslint": "^8.38.0", "eslint-plugin-zotero-translator": "file:.ci/eslint-plugin-zotero-translator", - "selenium-webdriver": "^4.0.0-alpha.7" + "selenium-webdriver": "^4.0.0-alpha.7", + "clarinet": "^0.12.6" } } From 713999d25c71af0eebdcb54afc61070c9c8b079d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 28 Dec 2023 06:22:33 -0500 Subject: [PATCH 002/158] ScienceDirect: Fix detection on pages with query strings containing "pdf" https://forums.zotero.org/discussion/110434/60091619-sciencedirect-author-and-pdf --- ScienceDirect.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ScienceDirect.js b/ScienceDirect.js index 688d5ceb7e9..7bd5b2066bc 100644 --- a/ScienceDirect.js +++ b/ScienceDirect.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-07-20 00:44:51" + "lastUpdated": "2023-12-28 11:22:13" } function detectWeb(doc, url) { @@ -44,7 +44,7 @@ function detectWeb(doc, url) { return false; } } - if (!url.includes("pdf")) { + if (!new URL(url).pathname.includes("pdf")) { // Book sections have the ISBN in the URL if (url.includes("/B978")) { return "bookSection"; From 8cc91dcff1c38939b228dbe434d1c96167739eae Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Thu, 28 Dec 2023 21:05:25 +0100 Subject: [PATCH 003/158] Run `npm run lint` only when there's any translator change (#3212) --- .ci/lint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/lint.sh b/.ci/lint.sh index 56b2e3c2adf..638af631464 100755 --- a/.ci/lint.sh +++ b/.ci/lint.sh @@ -6,4 +6,6 @@ dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" . "$dir/helper.sh" get_translators_to_check -npm run lint -- "$TRANSLATORS_TO_CHECK" +if [ -n "$TRANSLATORS_TO_CHECK" ]; then + npm run lint -- "$TRANSLATORS_TO_CHECK" +fi From c73db0a6b229abae9e4cfac8fe8c12bd35b5f425 Mon Sep 17 00:00:00 2001 From: Elsa Granger Date: Fri, 5 Jan 2024 20:41:18 +0800 Subject: [PATCH 004/158] Use https when access export.arxiv.org (#3216) --- arXiv.org.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arXiv.org.js b/arXiv.org.js index 4f902d2c9de..aaa63fd5a78 100644 --- a/arXiv.org.js +++ b/arXiv.org.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 12, "browserSupport": "gcsibv", - "lastUpdated": "2022-05-12 01:25:32" + "lastUpdated": "2024-01-05 12:21:40" } /* @@ -111,7 +111,7 @@ function doWeb(doc, url) { var urls = []; for (var id in items) { - urls.push('http://export.arxiv.org/oai2' + urls.push('https://export.arxiv.org/oai2' + '?verb=GetRecord&metadataPrefix=oai_dc' + '&identifier=oai%3AarXiv.org%3A' + encodeURIComponent(id) ); @@ -137,7 +137,7 @@ function doWeb(doc, url) { } if (!id) throw new Error('Could not find arXiv ID on page.'); id = id.trim().replace(/^arxiv:\s*|v\d+|\s+.*$/ig, ''); - var apiurl = 'http://export.arxiv.org/oai2?verb=GetRecord&metadataPrefix=oai_dc' + var apiurl = 'https://export.arxiv.org/oai2?verb=GetRecord&metadataPrefix=oai_dc' + '&identifier=oai%3AarXiv.org%3A' + encodeURIComponent(id); ZU.doGet(apiurl, parseXML); } From 8e3f5722e3a0883178dd6f7fe09ef0936b248a71 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Mon, 8 Jan 2024 23:04:45 -0500 Subject: [PATCH 005/158] Fix Rechtspraak.nl (#3220) https://forums.zotero.org/discussion/110653/zotero-connector-no-longer-working-rechtspraak-nl/p1 --- Rechtspraak.nl.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Rechtspraak.nl.js b/Rechtspraak.nl.js index 3f69bdd9085..484a40112bf 100644 --- a/Rechtspraak.nl.js +++ b/Rechtspraak.nl.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-01-18 18:21:16" + "lastUpdated": "2024-01-09 03:25:57" } /* @@ -75,13 +75,13 @@ function cleanTags(x) { } function detectWeb(doc, url) { - if (url.includes('/#!/details') || url.includes('/front/portal/document-viewer')) { + if (url.includes('.nl/details') || url.includes('/front/portal/document-viewer')) { return "case"; } else if (getSearchResults(doc, true)) { return "multiple"; } - else if (url.includes('/#!/resultaat') && doc.querySelector('app-results')) { + else if (url.includes('/resultaat') && doc.querySelector('app-results')) { Z.monitorDOMChanges(doc.querySelector('app-results'), { childList: true, subtree: true }); } return false; @@ -90,7 +90,7 @@ function detectWeb(doc, url) { function getSearchResults(doc, checkOnly) { var items = {}; var found = false; - var rows = doc.querySelectorAll('.rnl-listresults-item-title > a[href*="#!/details"]'); + var rows = doc.querySelectorAll('.rnl-listresults-item-title > a[href*="/details"]'); for (let row of rows) { let href = row.href; let title = ZU.trimInternal(row.textContent); @@ -117,8 +117,8 @@ async function doWeb(doc, url) { } async function scrape(url) { - let apiURL = url.includes('#!/details') - ? url.replace('#!/details', 'api/document/') + let apiURL = url.includes('/details') + ? url.replace('/details', '/api/document/') : `https://uitspraken.rechtspraak.nl/api/document/?id=${url.match(/ext-id=([^&#]+)/)[1]}`; let json = await requestJSON(apiURL); let item = new Zotero.Item("case"); @@ -163,7 +163,7 @@ async function scrape(url) { var testCases = [ { "type": "web", - "url": "https://uitspraken.rechtspraak.nl/#!/details?id=ECLI:NL:GHDHA:2018:2591", + "url": "https://uitspraken.rechtspraak.nl/details?id=ECLI:NL:GHDHA:2018:2591", "items": [ { "itemType": "case", @@ -194,7 +194,7 @@ var testCases = [ }, { "type": "web", - "url": "https://uitspraken.rechtspraak.nl/#!/details?id=ECLI:NL:PHR:2019:1016", + "url": "https://uitspraken.rechtspraak.nl/details?id=ECLI:NL:PHR:2019:1016", "items": [ { "itemType": "case", @@ -225,7 +225,7 @@ var testCases = [ }, { "type": "web", - "url": "https://uitspraken.rechtspraak.nl/#!/details?id=ECLI:NL:ORBAACM:2020:30&showbutton=true", + "url": "https://uitspraken.rechtspraak.nl/details?id=ECLI:NL:ORBAACM:2020:30&showbutton=true", "items": [ { "itemType": "case", @@ -258,7 +258,7 @@ var testCases = [ }, { "type": "web", - "url": "https://uitspraken.rechtspraak.nl/#!/resultaat?zoekterm=test&inhoudsindicatie=zt0&publicatiestatus=ps1&sort=Relevance", + "url": "https://uitspraken.rechtspraak.nl/resultaat?zoekterm=test&inhoudsindicatie=zt0&publicatiestatus=ps1&sort=Relevance", "items": "multiple" }, { From d24b779808c1d14ab8f5815724b09aac9b9d760c Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Mon, 8 Jan 2024 23:05:06 -0500 Subject: [PATCH 006/158] BnF Fix multiples (#3221) https://forums.zotero.org/discussion/comment/451953#Comment_451953 --- Bibliotheque nationale de France.js | 47 +++++++++++++++-------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/Bibliotheque nationale de France.js b/Bibliotheque nationale de France.js index 9519d8443f3..49e651610ac 100644 --- a/Bibliotheque nationale de France.js +++ b/Bibliotheque nationale de France.js @@ -9,26 +9,31 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-07-28 15:50:57" + "lastUpdated": "2024-01-09 03:40:58" } /* - * Bibliothèque nationale de France Translator - * Copyright (C) 2010 Florian Ziche, ziche@noos.fr - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2010-2024 Florian Ziche, Sylvain Machefert + + 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 ***** +*/ /* Bnf namespace. */ @@ -472,12 +477,8 @@ var BnfClass = function () { for (var i = 0; i < rows.length; i++) { var title = ""; var href = attr(rows[i], 'div[class="notice-synthese"] a', "href"); - try { - title = ZU.trim(text(rows[i], 'div[class="notice-synthese"] a h2')); - } - catch (x) { - title = ZU.trim(text(rows[i], 'div[class="notice-synthese"] a')); - } + title = ZU.trim(text(rows[i], 'div[class="notice-synthese"] a')); + var documentYear = text(rows[i], 'span[class="notice-ordre"]'); if (documentYear.length == 6) { title += " / " + documentYear; From 6b4a4dce60ff4a916da721426a8c54bc76136f0a Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 9 Jan 2024 20:52:26 -0500 Subject: [PATCH 007/158] CI: Use constant extension ID Thanks @saschanaz: https://github.com/zotero/translators/pull/3210#issue-2058323242 --- .ci/pull-request-check/selenium-test.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/.ci/pull-request-check/selenium-test.js b/.ci/pull-request-check/selenium-test.js index 37da3a04c97..b00f7c14f15 100755 --- a/.ci/pull-request-check/selenium-test.js +++ b/.ci/pull-request-check/selenium-test.js @@ -10,6 +10,7 @@ const translatorServer = require('./translator-server'); const chromeExtensionDir = path.join(__dirname, 'connectors', 'build', 'chrome'); const KEEP_BROWSER_OPEN = 'KEEP_BROWSER_OPEN' in process.env; +const ZOTERO_CONNECTOR_EXTENSION_ID = 'ekhagklcjbdpajgpjgmbionohlpdbjgc'; async function getTranslatorsToTest() { const translatorFilenames = process.argv[2].split('\n').filter(filename => filename.trim().length > 0); @@ -111,21 +112,9 @@ var allPassed = false; .setChromeOptions(options) .build(); - // No API to retrieve extension ID. Hacks, sigh. - await driver.get("chrome://system/"); - await driver.wait(until.elementLocated({id: 'btn-extensions-value'}), 60*1000); - // Chrome 89+ has the extension list expanded by default - try { - let extBtn = await driver.findElement({css: '#btn-extensions-value'}); - await extBtn.click(); - } catch (e) {} - let contentElem = await driver.findElement({css: '#content'}); - let text = await contentElem.getText(); - let extId = text.match(/([^\s]*) : Zotero Connector/)[1]; - - // We got the extension ID and test URL, let's test + // We got the test URL, let's test const translatorsToTest = await getTranslatorsToTest(); - let testUrl = `chrome-extension://${extId}/tools/testTranslators/testTranslators.html#translators=${translatorsToTest.join(',')}`; + let testUrl = `chrome-extension://${ZOTERO_CONNECTOR_EXTENSION_ID}/tools/testTranslators/testTranslators.html#translators=${translatorsToTest.join(',')}`; await new Promise((resolve) => setTimeout(() => resolve(driver.get(testUrl)), 500)); await driver.wait(until.elementLocated({id: 'translator-tests-complete'}), 30*60*1000); testResults = await driver.executeScript('return window.seleniumOutput'); From 564c65cb904ca5a56c94f1332f5551d99b7e08b1 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Mon, 15 Jan 2024 23:57:13 -0500 Subject: [PATCH 008/158] DNB Hotfix (#3228) asyncified but left other code like xpaths in place reported: https://forums.zotero.org/discussion/110825/translator-deutsche-nationalbibliothek#latest --- Deutsche Nationalbibliothek.js | 214 ++++++++++++++++++++++++--------- 1 file changed, 156 insertions(+), 58 deletions(-) diff --git a/Deutsche Nationalbibliothek.js b/Deutsche Nationalbibliothek.js index 381ff18e140..4fa53add9fd 100644 --- a/Deutsche Nationalbibliothek.js +++ b/Deutsche Nationalbibliothek.js @@ -2,14 +2,14 @@ "translatorID": "d8341c22-8cf4-428f-be3b-ada9fa8933eb", "label": "Deutsche Nationalbibliothek", "creator": "Philipp Zumstein", - "target": "^https?://portal\\.dnb\\.de/opac\\.htm\\?", + "target": "^https?://portal\\.dnb\\.de/opac(\\.htm|/(enhancedSearch|simpleSearch|showFullRecord)\\?)", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2018-05-14 19:08:02" + "lastUpdated": "2024-01-15 19:48:46" } /* @@ -36,51 +36,55 @@ */ var typeMapping = { - //"Blindendrucke" - "Bücher" : "book", - //"Elektronische Datenträger" - "Filme/Hörbücher" : "videoRecording", - "Karten" : "map", + //"Blindendrucke" + Bücher: "book", + //"Elektronische Datenträger" + "Filme/Hörbücher": "videoRecording", + Karten: "map", //"Medienkombinationen" //"Mikroformen" - "Musiktonträger" : "audioRecording", - //"Musiknoten" - "Artikel" : "journalArticle", + Musiktonträger: "audioRecording", + //"Musiknoten" + Artikel: "journalArticle", //"Online Ressourcen" //"Zeitschriften/Serien" //"Ausgaben/Hefte" - "archivierte Webseiten" : "webpage", + "archivierte Webseiten": "webpage", //"Gesamttitel Sammlung/Nachlass" - "Manuskripte" : "manuscript", - "Briefe" : "letter", + Manuskripte: "manuscript", + Briefe: "letter", //"Lebensdokumente" //"Sammlungen" //"Trägermaterialien (Papiere und Einbände)" - "Bilder/Grafiken" : "artwork" + "Bilder/Grafiken": "artwork" //"Flugblätter" }; function detectWeb(doc, url) { if ( - url.indexOf('method=showFullRecord')>-1 || - (url.indexOf('method=simpleSearch')>-1 && doc.getElementById('fullRecordTable')) + (url.includes('method=showFullRecord') || url.includes('/showFullRecord?')) + || ((url.includes('method=simpleSearch') || url.includes('/simpleSearch?') || url.includes('/enhancedSearch?') || url.includes('method=enhancedSearch')) + && doc.getElementById('fullRecordTable')) ) { - var type=ZU.xpathText(doc, '//table[@id="fullRecordTable"]/tbody/tr/td/img/@alt'); + var type = ZU.xpathText(doc, '//table[@id="fullRecordTable"]/tbody/tr/td/img/@alt'); if (typeMapping[type]) { return typeMapping[type]; - } else { + } + else { return "book"; } - } else if (getSearchResults(doc, true)) { + } + else if (getSearchResults(doc, true)) { return "multiple"; } + return false; } function getSearchResults(doc, checkOnly) { var items = {}; var found = false; var rows = ZU.xpath(doc, '//table[@id="searchresult"]//a[contains(@id, "recordLink")]'); - for (var i=0; i { + finalize(doc, item); + item.complete(); }); - - } else { + await translator.translate(); + } + else { Z.debug("No MARC link found --> Use COinS translator"); - //call COinS translator - var translator = Zotero.loadTranslator("web"); + // call COinS translator + // eslint-disable-next-line no-redeclare + let translator = Zotero.loadTranslator("web"); translator.setTranslator("05d07af9-105a-4572-99f6-a8e231c0daef"); translator.setDocument(doc); - translator.setHandler("itemDone", function (obj, item) { + translator.setHandler("itemDone", (_obj, item) => { finalize(doc, item); item.complete(); }); - translator.translate(); - + await translator.translate(); } -} +} function finalize(doc, item) { var toc = ZU.xpath(doc, '//a[contains(@title, "Inhaltsverzeichnis")]'); if (toc.length) { - item.attachments.push( { - url : toc[0].href, + item.attachments.push({ + url: toc[0].href, title: "Table of Contents PDF", mimeType: "application/pdf" }); @@ -156,8 +154,8 @@ function finalize(doc, item) { var abstract = ZU.xpath(doc, '//a[contains(@title, "Inhaltstext")]'); if (abstract.length) { - item.attachments.push( { - url : abstract[0].href, + item.attachments.push({ + url: abstract[0].href, title: "Abstract", mimeType: "text/html" }); @@ -491,6 +489,106 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://portal.dnb.de/opac/simpleSearch?query=test", + "items": "multiple" + }, + { + "type": "web", + "url": "https://portal.dnb.de/opac/simpleSearch?query=idn%3D1272086992&cqlMode=true", + "items": [ + { + "itemType": "book", + "title": "Den Netten beißen die Hunde: Wie Sie sich Respekt verschaffen, Grenzen setzen und den verdienten Erfolg erlangen - Mit großem \"Bin ich zu nett?\"-Test", + "creators": [ + { + "firstName": "Martin", + "lastName": "Wehrle", + "creatorType": "author" + } + ], + "date": "2024", + "ISBN": "9783442179046", + "language": "ger", + "libraryCatalog": "Deutsche Nationalbibliothek", + "numPages": "320", + "place": "München", + "publisher": "Goldmann", + "shortTitle": "Den Netten beißen die Hunde", + "attachments": [ + { + "title": "Abstract", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "(Produktform)Paperback / softback" + }, + { + "tag": "(VLB-WN)2933: Taschenbuch / Sachbücher/Angewandte Psychologie" + }, + { + "tag": "Business" + }, + { + "tag": "Büro" + }, + { + "tag": "Den Letzten beißen die Hunde" + }, + { + "tag": "Durchsetzungsvermögen" + }, + { + "tag": "Mental Load" + }, + { + "tag": "Nein sagen ohne Schuldgefühle" + }, + { + "tag": "Partnerschaft Kommunikation" + }, + { + "tag": "Sei einzig nicht artig" + }, + { + "tag": "Selbstbewusstsein" + }, + { + "tag": "Selbstbewustsein stärken" + }, + { + "tag": "Selbstrespekt" + }, + { + "tag": "Wenn jeder dich mag nimmt keiner dich ernst" + }, + { + "tag": "Wertschätzung" + }, + { + "tag": "ausgenutzt werden" + }, + { + "tag": "ernst genommen werden" + }, + { + "tag": "fehlende Anerkennung" + }, + { + "tag": "sich durchsetzen" + }, + { + "tag": "spiegel bestseller" + } + ], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 35fc547908c39f842e09b653f9f51f41b7326798 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Mon, 15 Jan 2024 23:57:59 -0500 Subject: [PATCH 009/158] Fix Retsinformation (#3227) after update of internal API. Reported: https://forums.zotero.org/discussion/109451/problems-with-translator-retsinformation#latest --- Retsinformation.js | 100 +++++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 45 deletions(-) diff --git a/Retsinformation.js b/Retsinformation.js index 192953175ca..3c6c0dd3f65 100644 --- a/Retsinformation.js +++ b/Retsinformation.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-06-07 19:48:42" + "lastUpdated": "2024-01-15 18:52:34" } /* @@ -51,7 +51,7 @@ function detectWeb(doc, url) { return false; } -function doWeb(doc, url) { +async function doWeb(doc, url) { if (detectWeb(doc, url) == "multiple") { Z.selectItems(getSearchResults(doc, url), function (selectedItems) { if (!selectedItems) return; @@ -63,7 +63,7 @@ function doWeb(doc, url) { }); } else { - scrape(doc, url); + await scrape(doc, url); } } @@ -80,56 +80,65 @@ function getSearchResults(doc, url, checkOnly) { return items; } -function scrape(doc, url) { - ZU.doGet(url.replace(/\/dan.*/, '').replace('/eli', '/api/document/eli'), function (respText) { - let json = JSON.parse(respText)[0]; - let item = new Zotero.Item(getType(json.shortName)); - - let signingDate; - let admissionDate; - let firstAdmissionDate; +async function scrape(doc, url) { + let jsonURL = url.replace(/\/dan.*/, '').replace('/eli', '/api/document/eli'); + // Z.debug(jsonURL) - for (let { displayName: name, displayValue: value } of json.metadata) { - if (name == 'Dato for underskrift') { - signingDate = value; - } - else if (name == 'Dato for indlæggelse') { - admissionDate = value; - } - else if (name == 'Dato for førstegangsindlæggelse') { - firstAdmissionDate = value; - } - } + let post = '{"isRawHtml":false}'; + let headers = { + 'Content-Type': 'application/json', + Referer: url + }; + let apiJSON = await requestJSON(jsonURL, { method: 'POST', headers: headers, body: post }); + //Z.debug(apiJSON) - item.title = json.title; - item.shortTitle = json.popularTitle; + let json = apiJSON[0]; + let item = new Zotero.Item(getType(json.shortName)); - let number = json.shortName; - let date = ZU.strToISO(signingDate || admissionDate || firstAdmissionDate); + let signingDate; + let admissionDate; + let firstAdmissionDate; - if (item.itemType == 'statute') { - item.codeNumber = number; - item.dateEnacted = date; + for (let { displayName: name, displayValue: value } of json.metadata) { + if (name == 'Dato for underskrift') { + signingDate = value; } - else if (item.itemType == 'case') { - item.docketNumber = number; - item.dateDecided = date; + else if (name == 'Dato for indlæggelse') { + admissionDate = value; } - else if (item.itemType == 'bill') { - item.billNumber = number; - item.date = date; + else if (name == 'Dato for førstegangsindlæggelse') { + firstAdmissionDate = value; } + } + + item.title = json.title; + item.shortTitle = json.popularTitle; - if (json.ressort) { - item.creators.push({ - creatorType: 'author', - lastName: json.ressort, - fieldMode: 1 - }); - } - item.url = url; - item.complete(); - }); + let number = json.shortName; + let date = ZU.strToISO(signingDate || admissionDate || firstAdmissionDate); + + if (item.itemType == 'statute') { + item.codeNumber = number; + item.dateEnacted = date; + } + else if (item.itemType == 'case') { + item.docketNumber = number; + item.dateDecided = date; + } + else if (item.itemType == 'bill') { + item.billNumber = number; + item.date = date; + } + + if (json.ressort) { + item.creators.push({ + creatorType: 'author', + lastName: json.ressort, + fieldMode: 1 + }); + } + item.url = url; + item.complete(); } function getType(documentType) { @@ -335,4 +344,5 @@ var testCases = [ "items": "multiple" } ] + /** END TEST CASES **/ From 4a8bd03064a56420dcfa0910791eba1b9447e99a Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Wed, 17 Jan 2024 18:32:04 +0100 Subject: [PATCH 010/158] Wait for `translatorServer.serve()` (#3231) --- .ci/pull-request-check/selenium-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/pull-request-check/selenium-test.js b/.ci/pull-request-check/selenium-test.js index b00f7c14f15..e9a517b2e30 100755 --- a/.ci/pull-request-check/selenium-test.js +++ b/.ci/pull-request-check/selenium-test.js @@ -98,7 +98,7 @@ var allPassed = false; (async function() { let driver; try { - translatorServer.serve(); + await translatorServer.serve(); require('chromedriver'); let chrome = require('selenium-webdriver/chrome'); let options = new chrome.Options(); From 469b1b0576679e95b9ae065d405490751ca4cb77 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Mon, 22 Jan 2024 22:51:45 +0100 Subject: [PATCH 011/158] Replace newline to space with xargs (#3213) --- .ci/lint.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/lint.sh b/.ci/lint.sh index 638af631464..dea45758587 100755 --- a/.ci/lint.sh +++ b/.ci/lint.sh @@ -7,5 +7,6 @@ dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" get_translators_to_check if [ -n "$TRANSLATORS_TO_CHECK" ]; then - npm run lint -- "$TRANSLATORS_TO_CHECK" + # No `xargs -d` support in macOS, so workaround with `tr` + echo "$TRANSLATORS_TO_CHECK" | tr '\n' '\0' | xargs -0 npm run lint -- fi From d95531014903e2b932834533d19448b3d3355c0e Mon Sep 17 00:00:00 2001 From: wolf Date: Sat, 27 Jan 2024 04:17:31 -0500 Subject: [PATCH 012/158] Unbreak NYPL translator when annotatedMarc = null (#3237) * unbreak when annotatedMarc = null * bump timestamp --- NYPL Research Catalog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NYPL Research Catalog.js b/NYPL Research Catalog.js index 4412f92c677..2a86770979a 100644 --- a/NYPL Research Catalog.js +++ b/NYPL Research Catalog.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-06-22 22:58:06" + "lastUpdated": "2024-01-26 23:24:00" } /* @@ -79,7 +79,7 @@ function scrape(doc, _url) { let bib = JSON.parse(jsonText).bib; // it's easiest we get MARC, but some items don't have it - if (bib.annotatedMarc.bib.fields.length) { + if (bib.annotatedMarc && bib.annotatedMarc.bib.fields.length) { scrapeMARC(bib.annotatedMarc.bib.fields); } else { From cc94c2f7257b1d157286b6cdaab1074fcb608dcc Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Sun, 4 Feb 2024 14:39:25 -0500 Subject: [PATCH 013/158] Add CourtListener (#3226) Closes #3224 --- CourtListener.js | 271 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 271 insertions(+) create mode 100644 CourtListener.js diff --git a/CourtListener.js b/CourtListener.js new file mode 100644 index 00000000000..5c8ed27b5f8 --- /dev/null +++ b/CourtListener.js @@ -0,0 +1,271 @@ +{ + "translatorID": "07890a30-866e-452a-ac3e-c19fcb39b597", + "label": "CourtListener", + "creator": "Sebastian Karcher", + "target": "^https?://www\\.courtlistener\\.com", + "minVersion": "5.0", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 4, + "browserSupport": "gcsibv", + "lastUpdated": "2024-02-04 05:00:08" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 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 detectWeb(doc, url) { + if (url.includes('/opinion/')) { + return 'case'; + } + else if (getSearchResults(doc, true)) { + return 'multiple'; + } + return false; +} + +function getSearchResults(doc, checkOnly) { + var items = {}; + var found = false; + var rows = doc.querySelectorAll('article > h3 > a'); + for (let row of rows) { + let href = row.href; + let title = ZU.trimInternal(row.textContent); + if (!href || !title) continue; + if (checkOnly) return true; + found = true; + items[href] = title; + } + 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 url of Object.keys(items)) { + await scrape(await requestDocument(url)); + } + } + else { + await scrape(doc); + } +} + +async function scrape(doc, url = doc.location.href) { + var item = new Zotero.Item('case'); + let citeString = text(doc, 'h2'); + + let title = citeString.match(/^(.+?),\s\d+/); + item.caseName = title ? title[1] : citation; + item.court = text(doc, 'article h3'); + item.reporter = text(doc, '.citation .reporter'); + item.reporterVolume = text(doc, '.citation .volume'); + item.firstPage = text(doc, '.citation .page'); + let citation = text(doc, 'center b .citation'); + if (!item.reporter && !item.reporterVolume) { + // the reporter elements aren't always tagged. We might have to parse them + // the best version is in the top of the opinion (we always want that for history matching, + // so getting that outside the conditional + + // if that's not there, we're parsing from the title of the case + if (!citation) { + citation = citeString.match(/^.+?,\s(\d+.+)/)[1].replace(/\(.+?\)$/, ""); + } + let citeExpr = citation.trim().match(/^(\d+)\s((?:[A-Z][a-z]?\.\s?)+(?:[2-3]d)?(?:Supp\.)?)\s(\d{1,4})(,|$)/); + if (citeExpr) { + item.reporterVolume = citeExpr[1]; + item.reporter = citeExpr[2]; + item.firstPage = citeExpr[3]; + } + else { + // if we can't match the reporter elements properly, just write the whole thing to citation. + item.history = citation; + } + } + + if (!item.history) { + // if we haven't already written case history, write the part that's not already included in the citation + // there are often stray spaces in either citation, so we need to check for the version without it. + let caseHistory = ZU.xpathText(doc, '//span[@class="meta-data-header" and contains(text(), "Citations:")]/following-sibling::span'); + // Z.debug(caseHistory); + if (caseHistory.replace(/\s/g, "").startsWith(citation.replace(/\s/g, "")) + && !(caseHistory.replace(/\s/g, "") == citation.replace(/\s/g, ""))) { + item.history = caseHistory.trim().replace(/^.+?,/, ""); + } + } + + // no good selctor for date, author, and docket number, so + let date = ZU.xpathText(doc, '//span[@class="meta-data-header" and contains(text(), "Filed:")]/following-sibling::span'); + item.dateDecided = date ? date.trim() : ""; + let docket = ZU.xpathText(doc, '//span[@class="meta-data-header" and contains(text(), "Docket Number:")]/following-sibling::span'); + item.docketNumber = docket ? docket.trim() : ""; + let authors = ZU.xpath(doc, '//span[@class="meta-data-header" and contains(text(), "Author:")]/following-sibling::span'); + for (let author of authors) { + item.creators.push(ZU.cleanAuthor(author.textContent.trim(), "author", false)); + } + item.url = url.replace(/\/\?.*/, ""); + item.attachments.push({ document: doc, title: "Full Text" }); + item.extra = ""; + item.complete(); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://www.courtlistener.com/opinion/1872757/gibson-v-bossier-city-general-hosp/?type=o&q=testing&type=o&order_by=score%20desc&stat_Precedential=on", + "items": [ + { + "itemType": "case", + "caseName": "Gibson v. Bossier City General Hosp.", + "creators": [], + "dateDecided": "November 26th, 1991", + "court": "Louisiana Court of Appeal", + "docketNumber": "22693-CA, 23002-CA", + "firstPage": "1332", + "reporter": "So.2d", + "reporterVolume": "594", + "url": "https://www.courtlistener.com/opinion/1872757/gibson-v-bossier-city-general-hosp", + "attachments": [ + { + "title": "Full Text", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.courtlistener.com/opinion/1611405/blackwell-v-power-test-corp/?type=o&type=o&q=testing&order_by=score+desc&stat_Precedential=on&page=3", + "items": [ + { + "itemType": "case", + "caseName": "Blackwell v. Power Test Corp.", + "creators": [ + { + "firstName": "Henry Curtis", + "lastName": "Meanor", + "creatorType": "author" + } + ], + "dateDecided": "August 19th, 1981", + "court": "District Court, D. New Jersey", + "docketNumber": "Civ. A. 80-2227", + "firstPage": "802", + "reporter": "F.Supp.", + "reporterVolume": "540", + "url": "https://www.courtlistener.com/opinion/1611405/blackwell-v-power-test-corp", + "attachments": [ + { + "title": "Full Text", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.courtlistener.com/opinion/108284/griggs-v-duke-power-co/?q=testing", + "items": [ + { + "itemType": "case", + "caseName": "Griggs v. Duke Power Co.", + "creators": [ + { + "firstName": "Warren Earl", + "lastName": "Burger", + "creatorType": "author" + } + ], + "dateDecided": "March 8th, 1971", + "court": "Supreme Court of the United States", + "docketNumber": "124", + "firstPage": "424", + "history": "91 S. Ct. 849, 28 L. Ed. 2d 158, 1971 U.S. LEXIS 134", + "reporter": "U.S.", + "reporterVolume": "401", + "url": "https://www.courtlistener.com/opinion/108284/griggs-v-duke-power-co", + "attachments": [ + { + "title": "Full Text", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.courtlistener.com/?q=testing", + "items": "multiple" + }, + { + "type": "web", + "url": "https://www.courtlistener.com/opinion/3959231/state-v-martin/?q=State%20v.%20Martin&type=o&order_by=score%20desc&stat_Precedential=on", + "items": [ + { + "itemType": "case", + "caseName": "State v. Martin", + "creators": [ + { + "firstName": "Robert L.", + "lastName": "Black", + "creatorType": "author" + } + ], + "dateDecided": "February 9th, 1983", + "court": "Ohio Court of Appeals", + "docketNumber": "C-820238", + "firstPage": "717", + "history": "20 Ohio App. 3d 172", + "reporter": "N.E.2d", + "reporterVolume": "485", + "url": "https://www.courtlistener.com/opinion/3959231/state-v-martin", + "attachments": [ + { + "title": "Full Text", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + } +] + +/** END TEST CASES **/ From ac6628e8676fff0dfb5372c66e6e6c9a34d3385e Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Sun, 4 Feb 2024 14:41:35 -0500 Subject: [PATCH 014/158] Update EBSCO DL Search (#3248) And do a bit more for item type. Reported: https://forums.zotero.org/discussion/111468/zotero-connector-eds-ebsco-discovery-service-not-working-correctly/p1 --- EBSCO Discovery Layer.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/EBSCO Discovery Layer.js b/EBSCO Discovery Layer.js index 579c60763f6..933befbfeea 100644 --- a/EBSCO Discovery Layer.js +++ b/EBSCO Discovery Layer.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-11-27 04:12:52" + "lastUpdated": "2024-02-04 04:24:48" } /* @@ -42,7 +42,7 @@ function detectWeb(doc, url) { return "journalArticle"; } Z.monitorDOMChanges(doc.querySelector('#page-container')); - let type = text(doc, 'div.article-type'); + let type = text(doc, 'div[class*="article-type"]'); if (type) { return getType(type); } @@ -60,7 +60,9 @@ function detectWeb(doc, url) { function getType(type) { // This can probably be fine-tuned, but it'll work for 90% of results - if (type.toLowerCase().includes("article")) { + type = type.toLowerCase(); + // Z.debug(type) + if (type.includes("article") || type.includes("artikel")) { return "journalArticle"; } else { @@ -73,6 +75,9 @@ function getSearchResults(doc, checkOnly) { var found = false; var rows = doc.querySelectorAll('h2.result-item-title > a'); + if (!rows.length) { + rows = doc.querySelectorAll('div[class*="result-item-title"]>a'); + } for (let row of rows) { let href = row.href; let title = ZU.trimInternal(row.textContent); @@ -138,6 +143,5 @@ async function scrape(doc, url = doc.location.href) { } /** BEGIN TEST CASES **/ -var testCases = [ -] + /** END TEST CASES **/ From 12021cddbb4b9142c6eb882cc77ef0c88d02e192 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 5 Feb 2024 13:28:34 -0500 Subject: [PATCH 015/158] YouTube: Grab correct creator name on desktop https://forums.zotero.org/discussion/111148/saving-youtube-videos-have-the-wrong-director --- YouTube.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YouTube.js b/YouTube.js index 24da73fd21d..7cbcfe771b8 100644 --- a/YouTube.js +++ b/YouTube.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-01-17 19:11:42" + "lastUpdated": "2024-02-05 18:28:26" } /* @@ -129,7 +129,7 @@ function scrape(doc, url) { ) || jsonLD.uploadDate; // Mobile on initial page load var author = text(doc, '#meta-contents #text-container .ytd-channel-name') // Desktop - || text(doc, '#text-container .ytd-channel-name') + || text(doc, '#upload-info #text-container .ytd-channel-name') || text(doc, '.slim-owner-channel-name'); // Mobile if (author) { item.creators.push({ From edf44a19431210e4105028d0108cdc55a47038b8 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 8 Feb 2024 13:05:33 -0500 Subject: [PATCH 016/158] ScienceDirect: Capture italics in titles, update tests (#3246) --- ScienceDirect.js | 164 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 136 insertions(+), 28 deletions(-) diff --git a/ScienceDirect.js b/ScienceDirect.js index 7bd5b2066bc..f41ea45bb53 100644 --- a/ScienceDirect.js +++ b/ScienceDirect.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-12-28 11:22:13" + "lastUpdated": "2024-01-31 19:11:09" } function detectWeb(doc, url) { @@ -324,6 +324,12 @@ function processRIS(doc, text) { translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); translator.setString(text); translator.setHandler("itemDone", function (obj, item) { + // If the title on the page contains formatting tags, use it instead of the title from the RIS + let titleElem = doc.querySelector('h1 > .title-text'); + if (titleElem && titleElem.childNodes.length > 1) { + item.title = titleToString(titleElem); + } + // issue sometimes is set to 0 for single issue volumes (?) if (item.issue === 0) delete item.issue; @@ -405,6 +411,21 @@ function processRIS(doc, text) { } +function titleToString(titleElem) { + let title = ''; + for (let node of titleElem.childNodes) { + // Wrap italics within the title in for CiteProc + if (node.nodeName === 'EM') { + title += '' + node.textContent + ''; + } + else { + title += node.textContent; + } + } + return title; +} + + function getArticleList(doc) { let articlePaths = [ '//table[@class="resultRow"]/tbody/tr/td[2]/a', @@ -549,13 +570,12 @@ var testCases = [ "creatorType": "author" } ], - "date": "June 9, 2011", + "date": "2011-06-09", "DOI": "10.1016/j.neuron.2011.05.025", "ISSN": "0896-6273", "abstractNote": "In this issue, a pair of studies (Levy et al. and Sanders et al.) identify several de novo copy-number variants that together account for 5%–8% of cases of simplex autism spectrum disorders. These studies suggest that several hundreds of loci are likely to contribute to the complex genetic heterogeneity of this group of disorders. An accompanying study in this issue (Gilman et al.), presents network analysis implicating these CNVs in neural processes related to synapse development, axon targeting, and neuron motility.", "issue": "5", "journalAbbreviation": "Neuron", - "language": "en", "libraryCatalog": "ScienceDirect", "pages": "806-808", "publicationTitle": "Neuron", @@ -617,13 +637,12 @@ var testCases = [ "creatorType": "author" } ], - "date": "July 1, 2008", + "date": "2008-07-01", "DOI": "10.1016/j.bbamcr.2008.03.010", "ISSN": "0167-4889", "abstractNote": "Mitochondrial involvement in yeast apoptosis is probably the most unifying feature in the field. Reports proposing a role for mitochondria in yeast apoptosis present evidence ranging from the simple observation of ROS accumulation in the cell to the identification of mitochondrial proteins mediating cell death. Although yeast is unarguably a simple model it reveals an elaborate regulation of the death process involving distinct proteins and most likely different pathways, depending on the insult, growth conditions and cell metabolism. This complexity may be due to the interplay between the death pathways and the major signalling routes in the cell, contributing to a whole integrated response. The elucidation of these pathways in yeast has been a valuable help in understanding the intricate mechanisms of cell death in higher eukaryotes, and of severe human diseases associated with mitochondria-dependent apoptosis. In addition, the absence of obvious orthologues of mammalian apoptotic regulators, namely of the Bcl-2 family, favours the use of yeast to assess the function of such proteins. In conclusion, yeast with its distinctive ability to survive without respiration-competent mitochondria is a powerful model to study the involvement of mitochondria and mitochondria interacting proteins in cell death.", "issue": "7", "journalAbbreviation": "Biochimica et Biophysica Acta (BBA) - Molecular Cell Research", - "language": "en", "libraryCatalog": "ScienceDirect", "pages": "1286-1302", "publicationTitle": "Biochimica et Biophysica Acta (BBA) - Molecular Cell Research", @@ -634,6 +653,11 @@ var testCases = [ { "title": "ScienceDirect Snapshot", "mimeType": "text/html" + }, + { + "title": "ScienceDirect Full Text PDF", + "mimeType": "application/pdf", + "proxy": false } ], "tags": [ @@ -668,7 +692,7 @@ var testCases = [ }, { "type": "web", - "url": "https://www.sciencedirect.com/science/article/pii/B9780123694683500083", + "url": "https://www.sciencedirect.com/science/article/abs/pii/B9780123694683500083", "items": [ { "itemType": "bookSection", @@ -705,11 +729,10 @@ var testCases = [ "creatorType": "editor" } ], - "date": "January 1, 2007", + "date": "2007-01-01", "ISBN": "9780123694683", "bookTitle": "Computational Materials Engineering", "extra": "DOI: 10.1016/B978-012369468-3/50008-3", - "language": "en", "libraryCatalog": "ScienceDirect", "pages": "267-316", "place": "Burlington", @@ -719,6 +742,11 @@ var testCases = [ { "title": "ScienceDirect Snapshot", "mimeType": "text/html" + }, + { + "title": "ScienceDirect Full Text PDF", + "mimeType": "application/pdf", + "proxy": false } ], "tags": [], @@ -729,7 +757,7 @@ var testCases = [ }, { "type": "web", - "url": "https://www.sciencedirect.com/science/article/pii/B9780123706263000508", + "url": "https://www.sciencedirect.com/science/article/abs/pii/B9780123706263000508", "items": [ { "itemType": "bookSection", @@ -746,12 +774,11 @@ var testCases = [ "creatorType": "editor" } ], - "date": "January 1, 2009", + "date": "2009-01-01", "ISBN": "9780123706263", "abstractNote": "The African continent (30.1million km2) extends from 37°17′N to 34°52S and covers a great variety of climates except the polar climate. Although Africa is often associated to extended arid areas as the Sahara (7million km2) and Kalahari (0.9million km2), it is also characterized by a humid belt in its equatorial part and by few very wet regions as in Cameroon and in Sierra Leone. Some of the largest river basins are found in this continent such as the Congo, also termed Zaire, Nile, Zambezi, Orange, and Niger basins. Common features of Africa river basins are (i) warm temperatures, (ii) general smooth relief due to the absence of recent mountain ranges, except in North Africa and in the Rift Valley, (iii) predominance of old shields and metamorphic rocks with very developed soil cover, and (iv) moderate human impacts on river systems except for the recent spread of river damming. African rivers are characterized by very similar hydrochemical and physical features (ionic contents, suspended particulate matter, or SPM) but differ greatly by their hydrological regimes, which are more developed in this article.", "bookTitle": "Encyclopedia of Inland Waters", "extra": "DOI: 10.1016/B978-012370626-3.00050-8", - "language": "en", "libraryCatalog": "ScienceDirect", "pages": "295-305", "place": "Oxford", @@ -761,6 +788,11 @@ var testCases = [ { "title": "ScienceDirect Snapshot", "mimeType": "text/html" + }, + { + "title": "ScienceDirect Full Text PDF", + "mimeType": "application/pdf", + "proxy": false } ], "tags": [ @@ -829,13 +861,12 @@ var testCases = [ "creatorType": "author" } ], - "date": "February 22, 2012", + "date": "2012-02-22", "DOI": "10.1016/j.bpj.2011.11.4028", "ISSN": "0006-3495", "abstractNote": "To permit access to DNA-binding proteins involved in the control and expression of the genome, the nucleosome undergoes structural remodeling including unwrapping of nucleosomal DNA segments from the nucleosome core. Here we examine the mechanism of DNA dissociation from the nucleosome using microsecond timescale coarse-grained molecular dynamics simulations. The simulations exhibit short-lived, reversible DNA detachments from the nucleosome and long-lived DNA detachments not reversible on the timescale of the simulation. During the short-lived DNA detachments, 9 bp dissociate at one extremity of the nucleosome core and the H3 tail occupies the space freed by the detached DNA. The long-lived DNA detachments are characterized by structural rearrangements of the H3 tail including the formation of a turn-like structure at the base of the tail that sterically impedes the rewrapping of DNA on the nucleosome surface. Removal of the H3 tails causes the long-lived detachments to disappear. The physical consistency of the CG long-lived open state was verified by mapping a CG structure representative of this state back to atomic resolution and performing molecular dynamics as well as by comparing conformation-dependent free energies. Our results suggest that the H3 tail may stabilize the nucleosome in the open state during the initial stages of the nucleosome remodeling process.", "issue": "4", "journalAbbreviation": "Biophysical Journal", - "language": "en", "libraryCatalog": "ScienceDirect", "pages": "849-858", "publicationTitle": "Biophysical Journal", @@ -861,7 +892,7 @@ var testCases = [ }, { "type": "web", - "url": "https://www.sciencedirect.com/science/article/pii/S014067361362228X", + "url": "https://www.sciencedirect.com/science/article/abs/pii/S014067361362228X", "items": [ { "itemType": "journalArticle", @@ -913,13 +944,12 @@ var testCases = [ "creatorType": "author" } ], - "date": "January 18, 2014", + "date": "2014-01-18", "DOI": "10.1016/S0140-6736(13)62228-X", "ISSN": "0140-6736", "abstractNote": "Research publication can both communicate and miscommunicate. Unless research is adequately reported, the time and resources invested in the conduct of research is wasted. Reporting guidelines such as CONSORT, STARD, PRISMA, and ARRIVE aim to improve the quality of research reports, but all are much less adopted and adhered to than they should be. Adequate reports of research should clearly describe which questions were addressed and why, what was done, what was shown, and what the findings mean. However, substantial failures occur in each of these elements. For example, studies of published trial reports showed that the poor description of interventions meant that 40–89% were non-replicable; comparisons of protocols with publications showed that most studies had at least one primary outcome changed, introduced, or omitted; and investigators of new trials rarely set their findings in the context of a systematic review, and cited a very small and biased selection of previous relevant trials. Although best documented in reports of controlled trials, inadequate reporting occurs in all types of studies—animal and other preclinical studies, diagnostic studies, epidemiological studies, clinical prediction research, surveys, and qualitative studies. In this report, and in the Series more generally, we point to a waste at all stages in medical research. Although a more nuanced understanding of the complex systems involved in the conduct, writing, and publication of research is desirable, some immediate action can be taken to improve the reporting of research. Evidence for some recommendations is clear: change the current system of research rewards and regulations to encourage better and more complete reporting, and fund the development and maintenance of infrastructure to support better reporting, linkage, and archiving of all elements of research. However, the high amount of waste also warrants future investment in the monitoring of and research into reporting of research, and active implementation of the findings to ensure that research reports better address the needs of the range of research users.", "issue": "9913", "journalAbbreviation": "The Lancet", - "language": "en", "libraryCatalog": "ScienceDirect", "pages": "267-276", "publicationTitle": "The Lancet", @@ -929,6 +959,11 @@ var testCases = [ { "title": "ScienceDirect Snapshot", "mimeType": "text/html" + }, + { + "title": "ScienceDirect Full Text PDF", + "mimeType": "application/pdf", + "proxy": false } ], "tags": [], @@ -939,7 +974,7 @@ var testCases = [ }, { "type": "web", - "url": "https://www.sciencedirect.com/science/article/pii/0584853976801316", + "url": "https://www.sciencedirect.com/science/article/abs/pii/0584853976801316", "items": [ { "itemType": "journalArticle", @@ -966,13 +1001,12 @@ var testCases = [ "creatorType": "author" } ], - "date": "January 1, 1976", + "date": "1976-01-01", "DOI": "10.1016/0584-8539(76)80131-6", "ISSN": "0584-8539", "abstractNote": "The absorption spectra between 400 and 50 cm−1 have been measured for the following compounds; 1,2-C6H4F2; 1,4-C6H4F2; 1,2,4-C6H3F3; 1,3,5-C6H3F3; 1,2,4,5-C6H2F4; 1,2,3,4-C6H2F4 (to 200 cm−1 only), 1,2,3,5,-C6H2F4; C6F5H and C6F6. Some new Raman data is also presented. Vibrational assignments have been criticallly examine by seeking consistency between assignments for different molecules and by comparison with predicted frequencies. There is clear evidence for a steady reduction in the force constant for the out-of-plane CH deformation with increasing fluorine substitution.", "issue": "4", "journalAbbreviation": "Spectrochimica Acta Part A: Molecular Spectroscopy", - "language": "en", "libraryCatalog": "ScienceDirect", "pages": "663-672", "publicationTitle": "Spectrochimica Acta Part A: Molecular Spectroscopy", @@ -982,6 +1016,11 @@ var testCases = [ { "title": "ScienceDirect Snapshot", "mimeType": "text/html" + }, + { + "title": "ScienceDirect Full Text PDF", + "mimeType": "application/pdf", + "proxy": false } ], "tags": [], @@ -992,7 +1031,7 @@ var testCases = [ }, { "type": "web", - "url": "https://www.sciencedirect.com/science/article/pii/0022460X72904348", + "url": "https://www.sciencedirect.com/science/article/abs/pii/0022460X72904348", "items": [ { "itemType": "journalArticle", @@ -1004,13 +1043,12 @@ var testCases = [ "creatorType": "author" } ], - "date": "November 22, 1972", + "date": "1972-11-22", "DOI": "10.1016/0022-460X(72)90434-8", "ISSN": "0022-460X", "abstractNote": "The problem of estimating the modal density for flexurally vibrating plates and bars is approached by way of a travelling wave, rather than normal mode, decomposition. This viewpoint leads to simple expressions for modal densities in terms of the system geometry, surface wave velocity and a factor which is a function of the frequency-thickness product. Values of the multiplying factor are presented together with correction factors for existing thin-plate and thin-bar estimates. These factors are shown to involve only Poisson's ratio as a parameter, and to vary only slightly for a Poisson's ratio range of 0·25 to 0·35. The correction curve for plates is shown to be in general agreement with one proposed by Bolotin.", "issue": "2", "journalAbbreviation": "Journal of Sound and Vibration", - "language": "en", "libraryCatalog": "ScienceDirect", "pages": "255-261", "publicationTitle": "Journal of Sound and Vibration", @@ -1020,6 +1058,11 @@ var testCases = [ { "title": "ScienceDirect Snapshot", "mimeType": "text/html" + }, + { + "title": "ScienceDirect Full Text PDF", + "mimeType": "application/pdf", + "proxy": false } ], "tags": [], @@ -1047,13 +1090,12 @@ var testCases = [ "creatorType": "author" } ], - "date": "December 1, 2016", + "date": "2016-12-01", "DOI": "10.1016/S2095-3119(16)61428-4", "ISSN": "2095-3119", "abstractNote": "The maintenance of rapid growth under conditions of CO2 enrichment is directly related to the capacity of new leaves to use or store the additional assimilated carbon (C) and nitrogen (N). Under drought conditions, however, less is known about C and N transport in C4 plants and the contributions of these processes to new foliar growth. We measured the patterns of C and N accumulation in maize (Zea mays L.) seedlings using 13C and 15N as tracers in CO2 climate chambers (380 or 750 μmol mol−1) under a mild drought stress induced with 10% PEG-6000. The drought stress under ambient conditions decreased the biomass production of the maize plants; however, this effect was reduced under elevated CO2. Compared with the water-stressed maize plants under atmospheric CO2, the treatment that combined elevated CO2 with water stress increased the accumulation of biomass, partitioned more C and N to new leaves as well as enhanced the carbon resource in ageing leaves and the carbon pool in new leaves. However, the C counterflow capability of the roots decreased. The elevated CO2 increased the time needed for newly acquired N to be present in the roots and increased the proportion of new N in the leaves. The maize plants supported the development of new leaves at elevated CO2 by altering the transport and remobilization of C and N. Under drought conditions, the increased activity of new leaves in relation to the storage of C and N sustained the enhanced growth of these plants under elevated CO2.", "issue": "12", "journalAbbreviation": "Journal of Integrative Agriculture", - "language": "en", "libraryCatalog": "ScienceDirect", "pages": "2775-2785", "publicationTitle": "Journal of Integrative Agriculture", @@ -1094,7 +1136,7 @@ var testCases = [ }, { "type": "web", - "url": "http://www.sciencedirect.com/search?qs=zotero&show=25&sortBy=relevance", + "url": "https://www.sciencedirect.com/search?qs=zotero&show=25&sortBy=relevance", "defer": true, "items": "multiple" }, @@ -1142,13 +1184,12 @@ var testCases = [ "creatorType": "author" } ], - "date": "December 1, 2017", + "date": "2017-12-01", "DOI": "10.1016/j.aipprr.2017.11.004", "ISSN": "2007-4719", "abstractNote": "Resumen\nEste trabajo buscó analizar si las variables memoria de trabajo (MT) verbal, MT visoespacial, velocidad de procesamiento y habilidad verbal pueden predecir la habilidad de los niños para el cálculo mental durante la realización de problemas aritméticos simples. Se administraron los subtests Vocabulario y Span de Dígitos del WISC-III; el subtest Casita de Animales del WPPSI-R y una prueba de problemas aritméticos (ad hoc) a 70 niños de 6 años. Un análisis de regresión lineal con el método stepwise mostró que solo la MT visoespacial predijo la variabilidad en las puntuaciones de cálculo mental (t=4.72; p<0.001; β=0.50). Los resultados son contrarios a estudios realizados en adultos y niños mayores en los cuales el mayor peso recae sobre la MT verbal. Es posible que a medida que los niños crecen la automatización de ciertos procesos de conteo y el almacenamiento de hechos aritméticos en la memoria de largo plazo produzca que dependan en mayor medida de la MT verbal para la resolución de este tipo de cálculos.\nThis study aimed to analyze whether verbal working memory (WM), visual-spatial WM, processing speed, and verbal ability predicted children's ability to perform mental arithmetic. Five tests were administered to 70 6-years-old children: the Vocabulary and Digits Span subtests from the WISC-III Intelligence Scale, the Animal Pegs subtest from WPPSI-R, and an arithmetic test (ad hoc). A linear regression analysis showed that only visual-spatial WM predicted the variability in children's scores in the arithmetic test (t=4.72; P<.001; β=.50). These findings contradict studies carried out in adults and older children where verbal WM seemed to play a greater role in the subject's ability to conduct calculations without external aids. It is possible that as they grow older, the automation of certain counting processes, as well as the storage and recovery of arithmetic knowledge from long-term memory will cause them to rely primarily on verbal WM resources.", "issue": "3", "journalAbbreviation": "Acta de Investigación Psicológica", - "language": "es", "libraryCatalog": "ScienceDirect", "pages": "2766-2774", "publicationTitle": "Acta de Investigación Psicológica", @@ -1158,6 +1199,11 @@ var testCases = [ { "title": "ScienceDirect Snapshot", "mimeType": "text/html" + }, + { + "title": "ScienceDirect Full Text PDF", + "mimeType": "application/pdf", + "proxy": false } ], "tags": [ @@ -1199,9 +1245,71 @@ var testCases = [ }, { "type": "web", - "url": "https://www.sciencedirect.com/search/advanced?qs=testing", + "url": "https://www.sciencedirect.com/search?qs=testing", "defer": true, "items": "multiple" + }, + { + "type": "web", + "url": "https://www.sciencedirect.com/science/article/pii/S0044848616303660", + "items": [ + { + "itemType": "journalArticle", + "title": "Environmental and physiological factors shape the gut microbiota of Atlantic salmon parr (Salmo salar L.)", + "creators": [ + { + "lastName": "Dehler", + "firstName": "Carola E.", + "creatorType": "author" + }, + { + "lastName": "Secombes", + "firstName": "Christopher J.", + "creatorType": "author" + }, + { + "lastName": "Martin", + "firstName": "Samuel A. M.", + "creatorType": "author" + } + ], + "date": "2017-01-20", + "DOI": "10.1016/j.aquaculture.2016.07.017", + "ISSN": "0044-8486", + "abstractNote": "Gut microbes are key players in host immune system priming, protection and development, as well as providing nutrients to the host that would be otherwise unavailable. Due to this importance, studies investigating the link between host and microbe are being initiated in farmed fish. The establishment, maintenance and subsequent changes of the intestinal microbiota are central to define fish physiology and nutrition in the future. In fish, unlike mammals, acquiring intestinal microbes is believed to occur around the time of first feeding mainly from the water surrounding them and their microbial composition over time is shaped therefore by their habitat. Here we compare the distal intestine microbiota of Atlantic salmon parr reared in a recirculating laboratory aquarium with that of age matched parr maintained in cage culture in an open freshwater loch environment of a commercial fish farm to establish the microbial profiles in the gut at the freshwater stage and investigate if there is a stable subset of bacteria present regardless of habitat type. We used deep sequencing across two variable regions of the 16S rRNA gene, with a mean read depth of 180,144±12,096 raw sequences per sample. All individual fish used in this study had a minimum of 30,000 quality controlled reads, corresponding to an average of 342±19 Operational Taxonomic Units (OTUs) per sample, which predominantly mapped to the phyla Firmicutes, Proteobacteria, and Tenericutes. The results indicate that species richness is comparable between both treatment groups, however, significant differences were found in the compositions of the gut microbiota between the rearing groups. Furthermore, a core microbiota of 19OTUs was identified, shared by all samples regardless of treatment group, mainly consisting of members of the phyla Proteobacteria, Bacteroidetes and Firmicutes. Core microbiotas of the individual rearing groups were determined (aquarium fish: 19+4 (total 23) OTUs, loch fish: 19+13 (total 32) OTUs), indicating that microbe acquisition or loss is occurring differently in the two habitats, but also that selective forces are acting within the host, offering niches to specific bacterial taxa. The new information gathered in this study by the Illumina MiSeq approach will be useful to understand and define the gut microbiota of healthy Atlantic salmon in freshwater and expand on previous studies using DGGE, TGGE and T-RFPL. Monitoring deviations from these profiles, especially the core microbes which are present regardless of habitat type, might be used in the future as early indicator for intestinal health issues caused by sub optimal feed or infectious diseases in the farm setting.\nStatement of relevance\nThe Microbiome is central to gut health, local immune function and nutrient up take. We have used deep sequencing approach to show differences in rearing conditions of Atlantic salmon. This work is of interest to aquaculture nutritionists.", + "journalAbbreviation": "Aquaculture", + "libraryCatalog": "ScienceDirect", + "pages": "149-157", + "publicationTitle": "Aquaculture", + "series": "Cutting Edge Science in Aquaculture 2015", + "url": "https://www.sciencedirect.com/science/article/pii/S0044848616303660", + "volume": "467", + "attachments": [ + { + "title": "ScienceDirect Snapshot", + "mimeType": "text/html" + }, + { + "title": "ScienceDirect Full Text PDF", + "mimeType": "application/pdf", + "proxy": false + } + ], + "tags": [ + { + "tag": "Atlantic salmon" + }, + { + "tag": "Gut microbiota" + }, + { + "tag": "Next-generation sequencing" + } + ], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From ee832ffcdad168871a3ea6b0bacce41da72211d2 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Sat, 17 Feb 2024 22:56:56 -0500 Subject: [PATCH 017/158] Fix ORCID ID links appearing in ProQuest author list (#3256) https://forums.zotero.org/discussion/111918/link-to-external-site-problem#latest --- ProQuest.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ProQuest.js b/ProQuest.js index 4672958fac7..9cd90f00885 100644 --- a/ProQuest.js +++ b/ProQuest.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-08-24 15:19:14" + "lastUpdated": "2024-02-17 03:02:30" } /* @@ -283,8 +283,8 @@ function scrape(doc, url, type) { creatorType = (enLabel == 'Author') ? 'author' : 'editor'; // Use titles of a tags if they exist, since these don't include - // affiliations - value = ZU.xpathText(rows[i].childNodes[1], "a/@title", null, "; ") || value; + // affiliations; don't include links to ORCID profiles + value = ZU.xpathText(rows[i].childNodes[1], "a[not(@id='orcidLink')]/@title", null, "; ") || value; value = value.replace(/^by\s+/i, '') // sometimes the authors begin with "By" .split(/\s*;\s*|\s+and\s+/i); From c07d2dfb97a7c5df134310e4a611d2fe85d2982a Mon Sep 17 00:00:00 2001 From: Franklin Pezzuti Dyer <46753556+franklindyer@users.noreply.github.com> Date: Sat, 17 Feb 2024 21:01:23 -0700 Subject: [PATCH 018/158] Adding Harvard Caselaw Access Project translator (#3230) Fixes zotero/translators#3225 --- Harvard Caselaw Access Project.js | 244 ++++++++++++++++++++++++++++++ 1 file changed, 244 insertions(+) create mode 100644 Harvard Caselaw Access Project.js diff --git a/Harvard Caselaw Access Project.js b/Harvard Caselaw Access Project.js new file mode 100644 index 00000000000..f1465167583 --- /dev/null +++ b/Harvard Caselaw Access Project.js @@ -0,0 +1,244 @@ +{ + "translatorID": "2a1cafb9-6f61-48d3-b621-c3265fde9eba", + "label": "Harvard Caselaw Access Project", + "creator": "Franklin Pezzuti Dyer", + "target": "^https://(cite\\.)?case\\.law", + "minVersion": "5.0", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 4, + "browserSupport": "gcsibv", + "lastUpdated": "2024-01-17 01:22:49" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 Franklin Pezzuti Dyer + + 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 (doc.querySelectorAll('.case-container').length > 0) { + return 'case'; + } + else if (getSearchResults(doc, true)) { + return 'multiple'; + } + return false; +} + +function getSearchResults(doc, checkOnly) { + var items = {}; + var found = false; + var rows = doc.querySelectorAll('div.result-title > div > a'); + for (let row of rows) { + let href = row.href; + let title = ZU.trimInternal(row.textContent); + if (!href || !title) continue; + if (checkOnly) return true; + found = true; + items[href] = title; + } + 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 url of Object.keys(items)) { + await scrape(await requestDocument(url)); + } + } + else { + await scrape(doc, url); + } +} + +async function scrape(doc, url = doc.location.href) { + let apiUrl = attr(doc, "a[href*='api.case.law/v1/cases/']", 'href'); + let caseJson = await requestJSON(apiUrl); + let pdfUrl = caseJson.frontend_pdf_url; + + let caseItem = new Zotero.Item("case"); + caseItem.language = "en-US"; + caseItem.url = url; + + let caseName = caseJson.name; + let abbrvCaseName = caseJson.name_abbreviation; + let caseNameParts = caseName.split(' '); + let caseBody = text(doc, 'casebody'); + for (let i = 0; i < caseNameParts.length; i++) { // Use context to fix capitalization in the title + let word = caseNameParts[i]; + let uppercaseWord = word.toUpperCase(); + let searchWord = uppercaseWord.replace(/[.,?]$/g, ""); + let titleWord = word.charAt(0).toUpperCase() + word.slice(1).toLowerCase(); + + if (word != uppercaseWord) continue; // We only need to fix words that are all-caps + if (abbrvCaseName.includes(searchWord)) continue; // If abbreviated title contains all-caps version, probably an acronym + if (caseBody.includes(searchWord)) continue; // If case body contains all-caps version, probably an acronym + caseNameParts[i] = titleWord; // Otherwise, use title-case + } + caseName = caseNameParts.join(' '); + + caseItem.caseName = caseName; + caseItem.shortTitle = abbrvCaseName; + caseItem.court = caseJson.court.name; + caseItem.dateDecided = caseJson.decision_date; + caseItem.docketNumber = caseJson.docket_number.replace(/[Nn]o\.?\s*/g, ""); + caseItem.reporter = caseJson.reporter.full_name; + caseItem.reporterVolume = caseJson.volume.volume_number; + caseItem.attachments = [{ + title: "Full Text PDF", + url: pdfUrl, + mimeType: "application/pdf" + }]; + + let parallelCitations = caseJson.citations.filter(c => c.type == "parallel").map(c => c.cite); + if (parallelCitations.length == 0) { + caseItem.history = ""; + } + else { + caseItem.history = parallelCitations.join(","); + } + + caseItem.complete(); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://case.law/search/#/cases?search=abc&page=1&ordering=relevance", + "items": "multiple" + }, + { + "type": "web", + "url": "https://cite.case.law/am-samoa/2/3/", + "items": [ + { + "itemType": "case", + "caseName": "Pasa of Fagatogo, Plaintiff v. Faiisiota of Faganeanea, Defendant", + "creators": [], + "dateDecided": "1947-02-07", + "court": "High Court of American Samoa", + "docketNumber": "2-1944", + "language": "en-US", + "reporter": "American Samoa Reports", + "reporterVolume": "2", + "shortTitle": "Pasa v. Faiisiota", + "url": "https://cite.case.law/am-samoa/2/3/", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://cite.case.law/pa-d-c2d/51/424/", + "items": [ + { + "itemType": "case", + "caseName": "ABC Juvenile", + "creators": [], + "dateDecided": "1971-02-19", + "court": "Adams County Court of Common Pleas", + "docketNumber": "47", + "language": "en-US", + "reporter": "Pennsylvania District and County Reports", + "reporterVolume": "51", + "url": "https://cite.case.law/pa-d-c2d/51/424/", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://cite.case.law/doug/1/450/", + "items": [ + { + "itemType": "case", + "caseName": "Dousman v. O'Malley", + "creators": [], + "dateDecided": "1844-01", + "court": "Michigan Supreme Court", + "language": "en-US", + "reporter": "Reports of cases argued and determined in the Supreme Court of the state of Michigan", + "reporterVolume": "1", + "url": "https://cite.case.law/doug/1/450/", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://cite.case.law/so-2d/57/40/9903854/", + "items": [ + { + "itemType": "case", + "caseName": "Tucker v. Central Motors, Inc.", + "creators": [], + "dateDecided": "1952-01-14", + "court": "Louisiana Supreme Court", + "docketNumber": "40041", + "history": "220 La. 510", + "language": "en-US", + "reporter": "Southern Reporter, Second Series", + "reporterVolume": "57", + "url": "https://cite.case.law/so-2d/57/40/9903854/", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + } +] +/** END TEST CASES **/ From 7837c4267095812c345c4ea86a3691b10ba07063 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Sun, 18 Feb 2024 13:27:27 -0500 Subject: [PATCH 019/158] Fix CambridgeCore RIS regex. asyncify (#3257) --- Cambridge Core.js | 119 +++++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 64 deletions(-) diff --git a/Cambridge Core.js b/Cambridge Core.js index 9b843d2815c..4e63a7e34e3 100644 --- a/Cambridge Core.js +++ b/Cambridge Core.js @@ -9,13 +9,13 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-04-17 08:48:37" + "lastUpdated": "2024-02-17 18:58:43" } /* ***** BEGIN LICENSE BLOCK ***** - Copyright © 2016-2020 Sebastian Karcher + Copyright © 2016-2024 Sebastian Karcher This file is part of Zotero. @@ -68,7 +68,7 @@ function getSearchResults(doc, checkOnly) { var items = {}; var found = false; var rows = doc.querySelectorAll( - 'li.title a[href*="/article/"], li.title a[href*="/product/"], li.title a[href*="/books/"]' + 'li.title a[href*="/article/"], li.title a[href*="/product/"], li.title a[href*="/books/"], div.results .product-listing-with-inputs-content a[href*="/books/"]' ); for (let row of rows) { var href = row.href; @@ -82,28 +82,24 @@ function getSearchResults(doc, checkOnly) { } -function doWeb(doc, url) { - if (detectWeb(doc, url) == "multiple") { - Zotero.selectItems(getSearchResults(doc, false), function (items) { - if (!items) { - return; - } - var articles = []; - for (let i in items) { - articles.push(i); - } - ZU.processDocuments(articles, scrape); - }); +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 { - scrape(doc, url); + await scrape(doc, url); } } -function scrape(doc, url) { + +async function scrape(doc, url = doc.location.href) { // Book metadata is much better using RIS if (detectWeb(doc, url) == "book" || detectWeb(doc, url) == "bookSection") { - let productID = url.replace(/[#?].+/, "").match(/\/([^/]+)$/)[1]; + let productID = url.replace(/[#?].*/, "").match(/\/([^/]+)$/)[1]; let risURL = "/core/services/aop-easybib/export?exportType=ris&productIds=" + productID + "&citationStyle=apa"; @@ -113,38 +109,39 @@ function scrape(doc, url) { '//meta[contains(@name, "citation_pdf_url")]/@content' ); // Z.debug("pdfURL: " + pdfURL); - ZU.doGet(risURL, function (text) { - var translator = Zotero.loadTranslator( - "import"); - translator.setTranslator( - "32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); - translator.setString(text); - translator.setHandler("itemDone", function (obj, - item) { - if (pdfURL) { - item.attachments.push({ - url: pdfURL, - title: "Full Text PDF", - mimeType: "application/pdf" - }); - } + var text = await requestText(risURL); + var translator = Zotero.loadTranslator( + "import"); + translator.setTranslator( + "32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); + translator.setString(text); + translator.setHandler("itemDone", function (obj, + item) { + if (pdfURL) { item.attachments.push({ - title: "Snapshot", - document: doc + url: pdfURL, + title: "Full Text PDF", + mimeType: "application/pdf" }); - // don't save Cambridge Core to archive - item.archive = ""; - item.complete(); + } + item.attachments.push({ + title: "Snapshot", + document: doc }); - translator.translate(); + // don't save Cambridge Core to archive + item.archive = ""; + item.complete(); }); + await translator.translate(); } // Some elements of journal citations look better with EM else { - var translator = Zotero.loadTranslator('web'); + let translator = Zotero.loadTranslator('web'); // Embedded Metadata translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48'); - translator.setHandler('itemDone', function (obj, item) { + translator.setDocument(doc); + + translator.setHandler('itemDone', (_obj, item) => { item.url = url; var abstract = ZU.xpathText(doc, '//div[@class="abstract"]'); @@ -152,6 +149,7 @@ function scrape(doc, url) { item.abstractNote = abstract; } item.title = ZU.unescapeHTML(item.title); + item.publisher = ""; // don't grab the publisher item.libraryCatalog = "Cambridge University Press"; if (item.date.includes("undefined")) { item.date = attr('meta[name="citation_online_date"]', "content"); @@ -161,18 +159,18 @@ function scrape(doc, url) { if (titleElem.querySelector('a:last-child')) { item.title = titleElem.firstChild.textContent; } - item.complete(); - }); - translator.getTranslatorObject(function (trans) { - if (url.includes("/books")) { - trans.itemType = "book"; - } - else { - trans.itemType = "journalArticle"; - } - trans.doWeb(doc, url); + item.complete(); }); + let em = await translator.getTranslatorObject(); + // TODO map additional meta tags here, or delete completely + if (url.includes("/books")) { + em.itemType = "book"; + } + else { + em.itemType = "journalArticle"; + } + await em.doWeb(doc, url); } } @@ -208,10 +206,6 @@ var testCases = [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [], @@ -258,10 +252,6 @@ var testCases = [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -449,11 +439,6 @@ var testCases = [ "url": "https://www.cambridge.org/core/what-we-publish/books/listing?sort=canonical.date%3Adesc&aggs%5BonlyShowAvailable%5D%5Bfilters%5D=true&aggs%5BproductTypes%5D%5Bfilters%5D=BOOK%2CELEMENT&searchWithinIds=0C5182F27A492FDC81EDF8D3C53266B5", "items": "multiple" }, - { - "type": "web", - "url": "https://www.cambridge.org/core/journals/ajs-review/firstview", - "items": "multiple" - }, { "type": "web", "url": "https://www.cambridge.org/core/journals/ajs-review/latest-issue", @@ -534,6 +519,12 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://www.cambridge.org/core/journals/american-political-science-review/firstview", + "items": "multiple" } ] + /** END TEST CASES **/ From e84ecfb370ac5f5fec28279fe16ac21bd58165a3 Mon Sep 17 00:00:00 2001 From: Adomas Ven Date: Tue, 20 Feb 2024 14:44:26 +0200 Subject: [PATCH 020/158] CI: Specify the Chrome extension key. See zotero/zotero-connectors#460 (#3260) --- .ci/pull-request-check/check-pull-request.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/pull-request-check/check-pull-request.sh b/.ci/pull-request-check/check-pull-request.sh index 705781865ad..4281e5d2057 100755 --- a/.ci/pull-request-check/check-pull-request.sh +++ b/.ci/pull-request-check/check-pull-request.sh @@ -28,6 +28,7 @@ else fi export ZOTERO_REPOSITORY_URL="http://localhost:8085/" +export CHROME_EXTENSION_KEY="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDllBS5q+Z9T9tPgYwRN+/8T9wzyjo9tRo03Wy8zP2DQ5Iy+3q0Tjq2vKXGiMCxC/ZVuEMC68Ekv+jNT43VxPbEXI4dzpK1GMBqPJpAcEOB8B1ROBouQMbGGTG7fOdQVlmpdTTPVndVwysJ02CrDMn96IG2ytOq2PO7GR2xleCudQIDAQAB" ./build.sh -p b -d cd .. From e7004416a8a0d1dc4eab336d061223f9f4dd207f Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 26 Feb 2024 17:41:12 -0800 Subject: [PATCH 021/158] Primo Normalized XML: Recognize 'pbooks' as book https://forums.zotero.org/discussion/112192/wrong-item-type-for-books-primo-ve --- Primo Normalized XML.js | 55 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/Primo Normalized XML.js b/Primo Normalized XML.js index f922c06341c..1b8c77705d0 100644 --- a/Primo Normalized XML.js +++ b/Primo Normalized XML.js @@ -11,7 +11,7 @@ }, "inRepository": true, "translatorType": 1, - "lastUpdated": "2022-02-02 19:34:22" + "lastUpdated": "2024-02-27 01:41:07" } /* @@ -62,6 +62,7 @@ function doImport() { case 'buch': case 'ebook': case 'pbook': + case 'pbooks': case 'print_book': case 'books': case 'score': @@ -770,6 +771,58 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "import", + "input": "detailsgetit1true01ALLIANCE_NETWORKnullnullthumbnailhttps://proxy-na.hosted.exlibrisgroup.com/exl_rewrite/books.google.com/books?bibkeys=ISBN:,OCLC:,LCCN:71093813&jscmd=viewapi&callback=updateGBSCoverthumbnail:_0available_in_libraryfalsefalse852##bMainLocationpgst1null99333481018670WHITMANnullfalse https://penroselib-php.herokuapp.com/apps/map/locate.php?loc=pgst1&callno=TD174+.D95&title=Pollution+%2F+Leonard+B.+Dworsky+%3B+with+an+introduction+by+Stewart+L.+Udall.truenullWhitman College LibraryTD174 .D95ALMA_0101ALLIANCE_WHITCOVPavailable_:01st Floor Books2288279530001867HoldingResultKey [mid=2288279530001867, libraryId=170730510001867, locationCode=pgst1, callNumber=TD174 .D95]nullnull852##bMainLocationpgst1null99333481018670WHITMANnullfalse https://penroselib-php.herokuapp.com/apps/map/locate.php?loc=pgst1&callno=TD174+.D95&title=Pollution+%2F+Leonard+B.+Dworsky+%3B+with+an+introduction+by+Stewart+L.+Udall.truenullWhitman College LibraryTD174 .D95ALMA_0101ALLIANCE_WHITCOVPavailable_:01st Floor Books2288279530001867HoldingResultKey [mid=2288279530001867, libraryId=170730510001867, locationCode=pgst1, callNumber=TD174 .D95]nullnullnullfalsenullfalsenullnull185701ALLIANCE_UPORTavailable_in_institutionUniversity of PortlandAlma-P99177171740001451185601ALLIANCE_WOUavailable_in_institutionWestern Oregon UniversityAlma-P99177171740001451184401ALLIANCE_LCCavailable_in_institutionLewis & ClarkAlma-P99177171740001451185501ALLIANCE_SOUavailable_in_institutionSouthern Oregon UniversityAlma-P99177171740001451186501ALLIANCE_OSUavailable_in_institutionOregon State University Libraries and PressAlma-P99177171740001451145301ALLIANCE_WWUavailable_in_institutionWestern Washington UniversityAlma-P99177171740001451187101ALLIANCE_CHEMEKavailable_in_institutionChemeketa Community CollegeAlma-P99177171740001451184201ALLIANCE_WSUavailable_in_institutionWashington State UniversityAlma-P99177171740001451187501ALLIANCE_WWavailable_in_institutionWhitworth UniversityAlma-P99177171740001451185201ALLIANCE_UOavailable_in_institutionUniversity of OregonAlma-P99177171740001451185101ALLIANCE_UIDavailable_in_institutionUniversity of IdahoAlma-P99177171740001451145401ALLIANCE_WUavailable_in_institutionWillamette UniversityAlma-P99177171740001451nullnullnullnullnullAlma-Povpnullnullfalsenull01ALLIANCE_WHITCservice_getitALMA_019933348101867OVP_:0Alma-P1971Dworsky, Leonard B., compiler.Pollution /Pollution /1971United StatesWater PollutionEnvironmental policyEnvironmental lawAir PollutionEnvironnement Politique gouvernementale États-Unis.Environmental law United States.Environmental policy United States.Air Pollution.Water Pollution.973 pbooks994 92 OCACLIntroduction -- Toward a Collective Conscience for Conservation -- Water Pollution -- Historical Prologue -- Water pollution: A Major Social Problem -- water and health: American Experience until 1900 -- Initial Efforts in Science and Public Policy: 1900-1919 -- Broadening the Base of Concern: 191-1948 -- Initiating a national water pollution Control Program: 1948-1966 -- Water Pollution Control: An element of multipurpose water resources development -- Interstate Compacts and water Pollution Control -- Water Pollution Control: The International Scene -- water pollution Problems and developments until 1948 -- Early Laws and conditions -- Science, water supply, and Epidemic Disease -- The Pollution of Interstate Waters: initial Investigations -- A Broadening base of concern -- President Franklin Delano Roosevelt and Water Pollution Control -- Developing a national Water pollution Control Program: 1948-1968 -- The water pollution Control Act of 1948 -- A Maturing Program: 1955-1968 -- Interstate agencies -- Sate Pollution Control: A case Study of Pennsylvania -- Air Pollution -- Introduction -- The Atmosphere: An Urgent Challenge -- Some historical Notes -- Tragic Signals: disasters in Europe and America -- Developing a National Air pollution Control program: 1948-1955 -- The First comprehensive Air Pollution Control law -- Developing Sate and Local Programs -- Summary -- Environment and Health -- Efforts to achieve effective legislation: 1954-1955 -- Expanding the sphere of control: 1955-1967 -- The Air Quality Act of 1967 -- New York City: A case Study in Air pollution -- Environmental Quality: A New National priority.engPollution /1971Conservation in the United States.Pollution.Conservation in the United StatesChelsea House Publishers,1971.New York :pbooksLeonard B. Dworsky ; with an introduction by Stewart L. Udall.Conservation in the United States.Conservation in the United States(OCoLC)ocm00145772(OCoLC)0014577200145772United StatesÉtats-Unis.United States.Pollution /Dworsky, Leonard B.,Dworsky, Leonard B., compiler.19711971Dworsky, Leonard B., compiler.$$QDworsky, Leonard B.Water -- PollutionAir -- PollutionEnvironmental policy -- United StatesEnvironmental law -- United Statesxl, 911 pages ; 24 cm.Includes bibliographical references.engAlmapbooksPollution 1$$Cform$$VOnline version: Dworsky, Leonard B. Pollution. New York, Chelsea House Publishers, 1971$$QPollution.9933348101867Introduction -- Toward a Collective Conscience for Conservation -- Water Pollution -- Historical Prologue -- Water pollution: A Major Social Problem -- water and health: American Experience until 1900 -- Initial Efforts in Science and Public Policy: 1900-1919 -- Broadening the Base of Concern: 191-1948 -- Initiating a national water pollution Control Program: 1948-1966 -- Water Pollution Control: An element of multipurpose water resources development -- Interstate Compacts and water Pollution Control -- Water Pollution Control: The International Scene -- water pollution Problems and developments until 1948 -- Early Laws and conditions -- Science, water supply, and Epidemic Disease -- The Pollution of Interstate Waters: initial Investigations -- A Broadening base of concern -- President Franklin Delano Roosevelt and Water Pollution Control -- Developing a national Water pollution Control Program: 1948-1968 -- The water pollution Control Act of 1948 -- A Maturing Program: 1955-1968 -- Interstate agencies -- Sate Pollution Control: A case Study of Pennsylvania -- Air Pollution -- Introduction -- The Atmosphere: An Urgent Challenge -- Some historical Notes -- Tragic Signals: disasters in Europe and America -- Developing a National Air pollution Control program: 1948-1955 -- The First comprehensive Air Pollution Control law -- Developing Sate and Local Programs -- Summary -- Environment and Health -- Efforts to achieve effective legislation: 1954-1955 -- Expanding the sphere of control: 1955-1967 -- The Air Quality Act of 1967 -- New York City: A case Study in Air pollution -- Environmental Quality: A New National priority.Conservation in the United States$$QConservation in the United StatesConservation in the United States.$$QConservation in the United States.00145772New York : Chelsea House PublishersLeonard B. Dworsky ; with an introduction by Stewart L. UdallNew York :alma9933348101867alma5.1ocm00145772-01alliance_networkMARC219933348101867OCLCfalse1971DworskyIncludes bibliographical references.New YorkGEN(ocolc)145772LLeonard B.71093813Conservation in the United States$$NDworsky, Leonard B.$$LDworsky$$FLeonard B.$$RauthorDworsky, Leonard B.n82013408PollutionChelsea House Publishers1971Dworsky, Leonard B., compiler.Pollution /", + "items": [ + { + "itemType": "book", + "title": "Pollution", + "creators": [ + { + "firstName": "Leonard B.", + "lastName": "Dworsky", + "creatorType": "author" + } + ], + "date": "1971", + "abstractNote": "Includes bibliographical references.", + "language": "eng", + "place": "New York", + "publisher": "Chelsea House Publishers", + "series": "Conservation in the United States", + "attachments": [], + "tags": [ + { + "tag": "Air" + }, + { + "tag": "Environmental law" + }, + { + "tag": "Environmental policy" + }, + { + "tag": "Pollution" + }, + { + "tag": "Pollution" + }, + { + "tag": "United States" + }, + { + "tag": "United States" + }, + { + "tag": "Water" + } + ], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From bad6238df385872ed21e3360a612f667b90f28f7 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 22 Feb 2024 14:19:56 -0500 Subject: [PATCH 022/158] Crossref Unixref XML: Remove extra colon when adding subtitle --- Crossref Unixref XML.js | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/Crossref Unixref XML.js b/Crossref Unixref XML.js index f7133500cec..e23cb48b27b 100644 --- a/Crossref Unixref XML.js +++ b/Crossref Unixref XML.js @@ -11,7 +11,7 @@ }, "inRepository": true, "translatorType": 1, - "lastUpdated": "2023-01-12 05:52:38" + "lastUpdated": "2024-02-22 19:17:41" } /* @@ -436,7 +436,7 @@ function doImport() { ); var subtitle = ZU.xpath(refXML, 'titles[1]/subtitle[1]')[0]; if (subtitle) { - item.title += ': ' + ZU.trimInternal( + item.title = item.title.replace(/:$/, '') + ': ' + ZU.trimInternal( removeUnsupportedMarkup(innerXML(subtitle)) ); } @@ -833,6 +833,42 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "import", + "input": "\n\n\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\tJournal of Hospitality & Leisure Marketing\n\t\t\t\t\tJournal of Hospitality & Leisure Marketing\n\t\t\t\t\t1050-7051\n\t\t\t\t\t1541-0897\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t10\n\t\t\t\t\t\t25\n\t\t\t\t\t\t2008\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t05\n\t\t\t\t\t\t10\n\t\t\t\t\t\t1996\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t3\n\t\t\t\t\t\n\t\t\t\t\t4\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tService Value Determination:\n\t\t\t\t\t\tAn Integrative Perspective\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tRama K.\n\t\t\t\t\t\t\tJayanti\n\t\t\t\t\t\t\ta Department of Marketing, James J. Nance College of Business, Cleveland State\n\t\t\t\t\t\t\t\tUniversity, Cleveland, OH, 44115\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tAmit K.\n\t\t\t\t\t\t\tGhosh\n\t\t\t\t\t\t\ta Department of Marketing, James J. Nance College of Business, Cleveland State\n\t\t\t\t\t\t\t\tUniversity, Cleveland, OH, 44115\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t10\n\t\t\t\t\t\t25\n\t\t\t\t\t\t2008\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t05\n\t\t\t\t\t\t10\n\t\t\t\t\t\t1996\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t5\n\t\t\t\t\t\t25\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t2\n\t\t\t\t\t\t10.1300/J150v03n04_02\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t10.1300/J150v03n04_02\n\t\t\t\t\t\thttps://www.tandfonline.com/doi/full/10.1300/J150v03n04_02\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thttps://www.tandfonline.com/doi/pdf/10.1300/J150v03n04_02\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n", + "items": [ + { + "itemType": "journalArticle", + "title": "Service Value Determination: An Integrative Perspective", + "creators": [ + { + "creatorType": "author", + "firstName": "Rama K.", + "lastName": "Jayanti" + }, + { + "creatorType": "author", + "firstName": "Amit K.", + "lastName": "Ghosh" + } + ], + "date": "1996-05-10", + "DOI": "10.1300/J150v03n04_02", + "ISSN": "1050-7051, 1541-0897", + "issue": "4", + "journalAbbreviation": "Journal of Hospitality & Leisure Marketing", + "language": "en", + "pages": "5-25", + "publicationTitle": "Journal of Hospitality & Leisure Marketing", + "url": "https://www.tandfonline.com/doi/full/10.1300/J150v03n04_02", + "volume": "3", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 9a1d789475128e20a8c64e13dbc9948744882900 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 22 Feb 2024 14:20:15 -0500 Subject: [PATCH 023/158] T&F: Add subtitle if present --- Taylor and Francis+NEJM.js | 51 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/Taylor and Francis+NEJM.js b/Taylor and Francis+NEJM.js index 24669eede8b..630eace5680 100644 --- a/Taylor and Francis+NEJM.js +++ b/Taylor and Francis+NEJM.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-10-27 16:03:23" + "lastUpdated": "2024-02-22 19:17:30" } /* @@ -152,8 +152,12 @@ function scrape(doc, url) { function finalizeItem(item, doc, doi, baseUrl) { + var subtitle = text(doc, 'h1 + .sub-title > h2'); + if (subtitle && !item.title.toLowerCase().includes(subtitle.toLowerCase())) { + item.title = item.title.replace(/:$/, '') + ': ' + subtitle; + } + var pdfurl = baseUrl + '/doi/pdf/'; - var absurl = baseUrl + '/doi/abs/'; // add keywords var keywords = ZU.xpath(doc, '//div[contains(@class, "abstractKeywords")]//a'); @@ -622,6 +626,49 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://www.tandfonline.com/doi/abs/10.1300/J150v03n04_02", + "items": [ + { + "itemType": "journalArticle", + "title": "Service Value Determination: An Integrative Perspective", + "creators": [ + { + "lastName": "Jayanti", + "firstName": "Rama K.", + "creatorType": "author" + }, + { + "lastName": "Ghosh", + "firstName": "Amit K.", + "creatorType": "author" + } + ], + "date": "1996-05-10", + "DOI": "10.1300/J150v03n04_02", + "ISSN": "1050-7051", + "abstractNote": "The authors investigate the efficacy of an integrated perspective on perceived service value, derived out of bringing together two consumer behavior research streams, those of utilitarian and behavioral theories. Theoretical, arguments and empirical evidence are used to show that the integrative perspective provides a better representation of perceived value than either the utilitarian or the behavioral perspective alone. Additionally, acquisition utility is shown to be similar to perceived quality, suggesting that a more parsimonious representation of perceived value entails the use of transaction utility and perceived quality as predictor variables. Finally, the authors argue that within a service encounter context, perceived quality of the service assumes more importance than price perceptions in explaining perceived value. Managerial implications and future research directions are discussed.", + "issue": "4", + "itemID": "doi:10.1300/J150v03n04\\_02", + "libraryCatalog": "Taylor and Francis+NEJM", + "pages": "5-25", + "publicationTitle": "Journal of Hospitality & Leisure Marketing", + "shortTitle": "Service Value Determination", + "url": "https://doi.org/10.1300/J150v03n04_02", + "volume": "3", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 7c0b19974d67e8c88fb2b1ab6883a857bf6c3773 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 28 Feb 2024 13:36:13 -0800 Subject: [PATCH 024/158] CI: Update `chromedriver` Fixes #3258 --- package-lock.json | 652 +++++++++++++++++++++++++++++++++++++++++----- package.json | 2 +- 2 files changed, 591 insertions(+), 63 deletions(-) diff --git a/package-lock.json b/package-lock.json index 04764cce70a..5c02b6cb062 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "CC0-1.0", "devDependencies": { "@zotero/eslint-config": "^1.0.5", - "chromedriver": "^115.0.0", + "chromedriver": "^122.0.4", "clarinet": "^0.12.6", "eslint": "^8.38.0", "eslint-plugin-zotero-translator": "file:.ci/eslint-plugin-zotero-translator", @@ -160,9 +160,15 @@ } }, "node_modules/@testim/chrome-version": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.3.tgz", - "integrity": "sha512-g697J3WxV/Zytemz8aTuKjTGYtta9+02kva3C1xc7KXB8GdbfE1akGJIsZLyY/FSh2QrnE+fiB7vmWU3XNcb6A==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz", + "integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g==", + "dev": true + }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", "dev": true }, "node_modules/@types/node": { @@ -213,15 +219,15 @@ } }, "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", "dev": true, "dependencies": { - "debug": "4" + "debug": "^4.3.4" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 14" } }, "node_modules/ajv": { @@ -270,6 +276,18 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -277,12 +295,12 @@ "dev": true }, "node_modules/axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dev": true, "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -293,6 +311,15 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/basic-ftp": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -338,25 +365,25 @@ } }, "node_modules/chromedriver": { - "version": "115.0.0", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-115.0.0.tgz", - "integrity": "sha512-mkPL+sXMLMUenoXCiKREw+cBl3ibfhiWxkiv9ByIPpqtrrInCt9zKdOolAsbmN/ndlH51WtT5ukUKbeRdrpikg==", + "version": "122.0.4", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-122.0.4.tgz", + "integrity": "sha512-MxkaWaxCqefHyh9UorGzl1F6ZNBgC7pqgT0piAysLZdw20ojSgJ62ljG8SFbhDJqBTegKbmuioa6MQ1m4Czdsg==", "dev": true, "hasInstallScript": true, "dependencies": { - "@testim/chrome-version": "^1.1.3", - "axios": "^1.4.0", - "compare-versions": "^6.0.0", + "@testim/chrome-version": "^1.1.4", + "axios": "^1.6.7", + "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", - "https-proxy-agent": "^5.0.1", + "proxy-agent": "^6.4.0", "proxy-from-env": "^1.1.0", - "tcp-port-used": "^1.0.1" + "tcp-port-used": "^1.0.2" }, "bin": { "chromedriver": "bin/chromedriver" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/clarinet": { @@ -407,9 +434,9 @@ "dev": true }, "node_modules/compare-versions": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.0.0.tgz", - "integrity": "sha512-s2MzYxfRsE9f/ow8hjn7ysa7pod1xhHdQMsgiJtKx6XSNf4x2N1KG4fjrkUmXcP/e9Y2ZX4zB6sHIso0Lm6evQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", + "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==", "dev": true }, "node_modules/concat-map": { @@ -438,6 +465,15 @@ "node": ">= 8" } }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -461,6 +497,20 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -503,6 +553,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, "node_modules/eslint": { "version": "8.38.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", @@ -609,6 +680,19 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/esquery": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", @@ -761,9 +845,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "dev": true, "funding": [ { @@ -794,6 +878,20 @@ "node": ">= 6" } }, + "node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -815,6 +913,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-uri": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", + "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", + "dev": true, + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4", + "fs-extra": "^11.2.0" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -862,6 +975,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, "node_modules/grapheme-splitter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", @@ -877,17 +996,30 @@ "node": ">=8" } }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "dependencies": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/ignore": { @@ -946,6 +1078,19 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/ip-regex": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", @@ -1039,6 +1184,12 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -1051,6 +1202,18 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, "node_modules/jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", @@ -1106,6 +1269,15 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -1151,6 +1323,15 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -1207,6 +1388,38 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pac-proxy-agent": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", + "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", + "dev": true, + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "pac-resolver": "^7.0.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dev": true, + "dependencies": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -1273,6 +1486,25 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, + "node_modules/proxy-agent": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -1458,6 +1690,60 @@ "node": ">=8" } }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.1.tgz", + "integrity": "sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==", + "dev": true, + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", + "integrity": "sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -1548,6 +1834,12 @@ "node": ">=8.17.0" } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -1572,6 +1864,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -1760,9 +2061,15 @@ } }, "@testim/chrome-version": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.3.tgz", - "integrity": "sha512-g697J3WxV/Zytemz8aTuKjTGYtta9+02kva3C1xc7KXB8GdbfE1akGJIsZLyY/FSh2QrnE+fiB7vmWU3XNcb6A==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@testim/chrome-version/-/chrome-version-1.1.4.tgz", + "integrity": "sha512-kIhULpw9TrGYnHp/8VfdcneIcxKnLixmADtukQRtJUmsVlMg0niMkwV0xZmi8hqa57xqilIHjWFA0GKvEjVU5g==", + "dev": true + }, + "@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", "dev": true }, "@types/node": { @@ -1803,12 +2110,12 @@ "requires": {} }, "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", "dev": true, "requires": { - "debug": "4" + "debug": "^4.3.4" } }, "ajv": { @@ -1844,6 +2151,15 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "requires": { + "tslib": "^2.0.1" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -1851,12 +2167,12 @@ "dev": true }, "axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dev": true, "requires": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.4", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -1867,6 +2183,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "basic-ftp": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1900,18 +2222,18 @@ } }, "chromedriver": { - "version": "115.0.0", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-115.0.0.tgz", - "integrity": "sha512-mkPL+sXMLMUenoXCiKREw+cBl3ibfhiWxkiv9ByIPpqtrrInCt9zKdOolAsbmN/ndlH51WtT5ukUKbeRdrpikg==", + "version": "122.0.4", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-122.0.4.tgz", + "integrity": "sha512-MxkaWaxCqefHyh9UorGzl1F6ZNBgC7pqgT0piAysLZdw20ojSgJ62ljG8SFbhDJqBTegKbmuioa6MQ1m4Czdsg==", "dev": true, "requires": { - "@testim/chrome-version": "^1.1.3", - "axios": "^1.4.0", - "compare-versions": "^6.0.0", + "@testim/chrome-version": "^1.1.4", + "axios": "^1.6.7", + "compare-versions": "^6.1.0", "extract-zip": "^2.0.1", - "https-proxy-agent": "^5.0.1", + "proxy-agent": "^6.4.0", "proxy-from-env": "^1.1.0", - "tcp-port-used": "^1.0.1" + "tcp-port-used": "^1.0.2" } }, "clarinet": { @@ -1951,9 +2273,9 @@ "dev": true }, "compare-versions": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.0.0.tgz", - "integrity": "sha512-s2MzYxfRsE9f/ow8hjn7ysa7pod1xhHdQMsgiJtKx6XSNf4x2N1KG4fjrkUmXcP/e9Y2ZX4zB6sHIso0Lm6evQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", + "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==", "dev": true }, "concat-map": { @@ -1979,6 +2301,12 @@ "which": "^2.0.1" } }, + "data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "dev": true + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -1994,6 +2322,17 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "requires": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -2024,6 +2363,18 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, + "escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "requires": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "source-map": "~0.6.1" + } + }, "eslint": { "version": "8.38.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", @@ -2109,6 +2460,12 @@ "eslint-visitor-keys": "^3.4.0" } }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, "esquery": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", @@ -2229,9 +2586,9 @@ "dev": true }, "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "dev": true }, "form-data": { @@ -2245,6 +2602,17 @@ "mime-types": "^2.1.12" } }, + "fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2260,6 +2628,18 @@ "pump": "^3.0.0" } }, + "get-uri": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", + "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", + "dev": true, + "requires": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4", + "fs-extra": "^11.2.0" + } + }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -2292,6 +2672,12 @@ "type-fest": "^0.20.2" } }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, "grapheme-splitter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", @@ -2304,13 +2690,23 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "requires": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + } + }, "https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dev": true, "requires": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" } }, @@ -2358,6 +2754,16 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "requires": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + } + }, "ip-regex": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", @@ -2429,6 +2835,12 @@ "argparse": "^2.0.1" } }, + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -2441,6 +2853,16 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, "jszip": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", @@ -2487,6 +2909,12 @@ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, + "lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true + }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -2523,6 +2951,12 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -2564,6 +2998,32 @@ "p-limit": "^3.0.2" } }, + "pac-proxy-agent": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", + "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", + "dev": true, + "requires": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "pac-resolver": "^7.0.0", + "socks-proxy-agent": "^8.0.2" + } + }, + "pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dev": true, + "requires": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + } + }, "pako": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", @@ -2615,6 +3075,22 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, + "proxy-agent": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", + "dev": true, + "requires": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" + } + }, "proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -2741,6 +3217,46 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true + }, + "socks": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.1.tgz", + "integrity": "sha512-B6w7tkwNid7ToxjZ08rQMT8M9BJAf8DKx8Ft4NivzH0zBUfd6jldGcisJn/RLgxcX3FPNDdNQCUEMMT79b+oCQ==", + "dev": true, + "requires": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + } + }, + "socks-proxy-agent": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", + "integrity": "sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==", + "dev": true, + "requires": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "socks": "^2.7.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + }, + "sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -2810,6 +3326,12 @@ "rimraf": "^3.0.0" } }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -2825,6 +3347,12 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, + "universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", diff --git a/package.json b/package.json index b4d9eb207fe..f033a383fc8 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@zotero/eslint-config": "^1.0.5", - "chromedriver": "^115.0.0", + "chromedriver": "^122.0.4", "eslint": "^8.38.0", "eslint-plugin-zotero-translator": "file:.ci/eslint-plugin-zotero-translator", "selenium-webdriver": "^4.0.0-alpha.7", From 8cc630507fddeff72034e36629a69ab7404515dc Mon Sep 17 00:00:00 2001 From: Philipp Zumstein Date: Thu, 29 Feb 2024 21:14:23 +0100 Subject: [PATCH 025/158] Zenodo: Support multiples in Communities (#3263) --- Zenodo.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Zenodo.js b/Zenodo.js index 5993c47a293..e6864cfeea8 100644 --- a/Zenodo.js +++ b/Zenodo.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-12-08 09:09:32" + "lastUpdated": "2024-02-26 08:39:41" } /* @@ -93,7 +93,7 @@ function getSearchResults(doc, checkOnly) { var items = {}; var found = false; // this section is not rendered in the 6.0 Scaffold browser, OK in v7 - var rows = doc.querySelectorAll('section[aria-label="Search results"] h2 a'); + var rows = doc.querySelectorAll('h2>a[href*="/records/"]'); for (var i = 0; i < rows.length; i++) { var href = rows[i].href; var title = ZU.trimInternal(rows[i].textContent); @@ -650,6 +650,12 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://zenodo.org/communities/oat23/records?q=&l=list&p=1&s=10&sort=newest", + "defer": true, + "items": "multiple" } ] /** END TEST CASES **/ From 7bed28c0ed418f781f1079161cd8f07579a33458 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 29 Feb 2024 12:21:44 -0800 Subject: [PATCH 026/158] Nature: Delete number when it matches issue, update tests Fixes #3255 --- Nature Publishing Group.js | 193 +++++++++++++++++++++---------------- 1 file changed, 111 insertions(+), 82 deletions(-) diff --git a/Nature Publishing Group.js b/Nature Publishing Group.js index d7cafa6f57c..d0ea7275fec 100644 --- a/Nature Publishing Group.js +++ b/Nature Publishing Group.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-10-20 21:34:23" + "lastUpdated": "2024-02-29 20:21:02" } /** @@ -30,11 +30,6 @@ . */ - -// attr()/text() v2 -// eslint-disable-next-line -function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null;}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null;} - // mimetype map for supplementary attachments var suppTypeMap = { pdf: 'application/pdf', @@ -682,6 +677,9 @@ function scrape(doc, url) { if (item.journalAbbreviation == item.publicationTitle) { delete item.journalAbbreviation; } + if (item.issue && item.number && item.issue == item.number) { + delete item.number; + } var hasPDF = false; for (let attach of item.attachments) { if (attach.mimeType && attach.mimeType == "application/pdf") { @@ -1211,10 +1209,6 @@ var testCases = [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -1293,17 +1287,13 @@ var testCases = [ "libraryCatalog": "www.nature.com", "pages": "341-343", "publicationTitle": "Nature", - "rights": "2012 Nature Publishing Group, a division of Macmillan Publishers Limited. All Rights Reserved.", + "rights": "2012 Springer Nature Limited", "url": "https://www.nature.com/articles/nature10669", "volume": "481", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -1336,17 +1326,13 @@ var testCases = [ "libraryCatalog": "www.nature.com", "pages": "237-237", "publicationTitle": "Nature", - "rights": "2012 Nature Publishing Group, a division of Macmillan Publishers Limited. All Rights Reserved.", + "rights": "2012 Springer Nature Limited", "url": "https://www.nature.com/articles/481237a", "volume": "481", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -1400,17 +1386,13 @@ var testCases = [ "libraryCatalog": "www.nature.com", "pages": "335-340", "publicationTitle": "Nature", - "rights": "2011 Nature Publishing Group, a division of Macmillan Publishers Limited. All Rights Reserved.", + "rights": "2011 Springer Nature Limited", "url": "https://www.nature.com/articles/nature10728", "volume": "481", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -1544,17 +1526,13 @@ var testCases = [ "libraryCatalog": "www.nature.com", "pages": "1289-1297", "publicationTitle": "Nature Genetics", - "rights": "2006 Nature Publishing Group", + "rights": "2006 Springer Nature America, Inc.", "url": "https://www.nature.com/articles/ng1901", "volume": "38", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -1815,10 +1793,6 @@ var testCases = [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -1882,17 +1856,13 @@ var testCases = [ "libraryCatalog": "www.nature.com", "pages": "177-182", "publicationTitle": "Nature Structural & Molecular Biology", - "rights": "2008 Nature Publishing Group", + "rights": "2008 Springer Nature America, Inc.", "url": "https://www.nature.com/articles/nsmb.1371", "volume": "15", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -1981,17 +1951,13 @@ var testCases = [ "libraryCatalog": "www.nature.com", "pages": "341-343", "publicationTitle": "Nature", - "rights": "2012 Nature Publishing Group, a division of Macmillan Publishers Limited. All Rights Reserved.", + "rights": "2012 Springer Nature Limited", "url": "https://www.nature.com/articles/nature10669", "volume": "481", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -2087,10 +2053,6 @@ var testCases = [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -2151,17 +2113,13 @@ var testCases = [ "libraryCatalog": "www.nature.com", "pages": "260-264", "publicationTitle": "Nature", - "rights": "2013 Nature Publishing Group, a division of Macmillan Publishers Limited. All Rights Reserved.", + "rights": "2013 Springer Nature Limited", "url": "https://www.nature.com/articles/nature11899", "volume": "495", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -2402,17 +2360,13 @@ var testCases = [ "libraryCatalog": "www.nature.com", "pages": "174-180", "publicationTitle": "Nature", - "rights": "2011 Nature Publishing Group, a division of Macmillan Publishers Limited. All Rights Reserved.", + "rights": "2011 Springer Nature Limited", "url": "https://www.nature.com/articles/nature09944", "volume": "473", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -2462,17 +2416,13 @@ var testCases = [ "libraryCatalog": "www.nature.com", "pages": "337-345", "publicationTitle": "Nature Protocols", - "rights": "2006 Nature Publishing Group", + "rights": "2006 Springer Nature Limited", "url": "https://www.nature.com/articles/nprot.2006.52", "volume": "1", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -2572,17 +2522,13 @@ var testCases = [ "libraryCatalog": "www.nature.com", "pages": "6186", "publicationTitle": "Nature Communications", - "rights": "2015 Nature Publishing Group, a division of Macmillan Publishers Limited. All Rights Reserved.", + "rights": "2015 Springer Nature Limited", "url": "https://www.nature.com/articles/ncomms7186", "volume": "6", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -2897,10 +2843,6 @@ var testCases = [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -3097,10 +3039,6 @@ var testCases = [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -3190,24 +3128,22 @@ var testCases = [ "creatorType": "author" } ], - "date": "2021-10-20", + "date": "2022-01", "DOI": "10.1038/s41586-021-03972-8", "ISSN": "1476-4687", "abstractNote": "Transatlantic exploration took place centuries before the crossing of Columbus. Physical evidence for early European presence in the Americas can be found in Newfoundland, Canada1,2. However, it has thus far not been possible to determine when this activity took place3–5. Here we provide evidence that the Vikings were present in Newfoundland in ad 1021. We overcome the imprecision of previous age estimates by making use of the cosmic-ray-induced upsurge in atmospheric radiocarbon concentrations in ad 993 (ref. 6). Our new date lays down a marker for European cognisance of the Americas, and represents the first known point at which humans encircled the globe. It also provides a definitive tie point for future research into the initial consequences of transatlantic activity, such as the transference of knowledge, and the potential exchange of genetic information, biota and pathologies7,8.", + "issue": "7893", "language": "en", "libraryCatalog": "www.nature.com", - "pages": "1-4", + "pages": "388-391", "publicationTitle": "Nature", "rights": "2021 The Author(s)", "url": "https://www.nature.com/articles/s41586-021-03972-8", + "volume": "601", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -3225,6 +3161,99 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://www.nature.com/articles/s41586-023-05742-0", + "items": [ + { + "itemType": "journalArticle", + "title": "RETRACTED ARTICLE: Evidence of near-ambient superconductivity in a N-doped lutetium hydride", + "creators": [ + { + "firstName": "Nathan", + "lastName": "Dasenbrock-Gammon", + "creatorType": "author" + }, + { + "firstName": "Elliot", + "lastName": "Snider", + "creatorType": "author" + }, + { + "firstName": "Raymond", + "lastName": "McBride", + "creatorType": "author" + }, + { + "firstName": "Hiranya", + "lastName": "Pasan", + "creatorType": "author" + }, + { + "firstName": "Dylan", + "lastName": "Durkee", + "creatorType": "author" + }, + { + "firstName": "Nugzari", + "lastName": "Khalvashi-Sutter", + "creatorType": "author" + }, + { + "firstName": "Sasanka", + "lastName": "Munasinghe", + "creatorType": "author" + }, + { + "firstName": "Sachith E.", + "lastName": "Dissanayake", + "creatorType": "author" + }, + { + "firstName": "Keith V.", + "lastName": "Lawler", + "creatorType": "author" + }, + { + "firstName": "Ashkan", + "lastName": "Salamat", + "creatorType": "author" + }, + { + "firstName": "Ranga P.", + "lastName": "Dias", + "creatorType": "author" + } + ], + "date": "2023-03", + "DOI": "10.1038/s41586-023-05742-0", + "ISSN": "1476-4687", + "abstractNote": "The absence of electrical resistance exhibited by superconducting materials would have enormous potential for applications if it existed at ambient temperature and pressure conditions. Despite decades of intense research efforts, such a state has yet to be realized1,2. At ambient pressures, cuprates are the material class exhibiting superconductivity to the highest critical superconducting transition temperatures (Tc), up to about 133 K (refs. 3–5). Over the past decade, high-pressure ‘chemical precompression’6,7 of hydrogen-dominant alloys has led the search for high-temperature superconductivity, with demonstrated Tc approaching the freezing point of water in binary hydrides at megabar pressures8–13. Ternary hydrogen-rich compounds, such as carbonaceous sulfur hydride, offer an even larger chemical space to potentially improve the properties of superconducting hydrides14–21. Here we report evidence of superconductivity on a nitrogen-doped lutetium hydride with a maximum Tc of 294 K at 10 kbar, that is, superconductivity at room temperature and near-ambient pressures. The compound was synthesized under high-pressure high-temperature conditions and then—after full recoverability—its material and superconducting properties were examined along compression pathways. These include temperature-dependent resistance with and without an applied magnetic field, the magnetization (M) versus magnetic field (H) curve, a.c. and d.c. magnetic susceptibility, as well as heat-capacity measurements. X-ray diffraction (XRD), energy-dispersive X-ray (EDX) and theoretical simulations provide some insight into the stoichiometry of the synthesized material. Nevertheless, further experiments and simulations are needed to determine the exact stoichiometry of hydrogen and nitrogen, and their respective atomistic positions, in a greater effort to further understand the superconducting state of the material.", + "issue": "7951", + "language": "en", + "libraryCatalog": "www.nature.com", + "pages": "244-250", + "publicationTitle": "Nature", + "rights": "2023 The Author(s), under exclusive licence to Springer Nature Limited", + "shortTitle": "RETRACTED ARTICLE", + "url": "https://www.nature.com/articles/s41586-023-05742-0", + "volume": "615", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Superconducting properties and materials" + } + ], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 42cc3d5edc06dd9e40f4ffde5999c46e5e11fafd Mon Sep 17 00:00:00 2001 From: EdwardGao Date: Fri, 1 Mar 2024 04:27:09 +0800 Subject: [PATCH 027/158] Google Presentation: Update PDF export URL (#3259) --- Google Presentation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Google Presentation.js b/Google Presentation.js index 344c5ea582d..33ace5c07e2 100644 --- a/Google Presentation.js +++ b/Google Presentation.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-08-02 16:55:40" + "lastUpdated": "2024-02-19 09:33:28" } /* @@ -64,7 +64,7 @@ function doWeb(doc, url) { urlparts.splice(6); var baseUrl = urlparts.join('/'); item.url = baseUrl; - var pdfUrl = baseUrl + '/export/pdf?id=' + id; + var pdfUrl = baseUrl + '/export?format=pdf'; //Z.debug(pdfUrl); item.attachments.push({ url: pdfUrl, From 49dc06a079658d9c5b1cc357e49bf0f311583245 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 5 Mar 2024 05:53:23 -0500 Subject: [PATCH 028/158] eLife: Fix PDF downloads https://forums.zotero.org/discussion/112526/saving-from-elife-does-not-download-pdf --- eLife.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eLife.js b/eLife.js index 13356542166..0b07e976c70 100644 --- a/eLife.js +++ b/eLife.js @@ -8,8 +8,8 @@ "priority": 100, "inRepository": true, "translatorType": 4, - "browserSupport": "gcsbv", - "lastUpdated": "2021-01-28 15:20:33" + "browserSupport": "gcsibv", + "lastUpdated": "2024-03-05 10:52:52" } /* @@ -85,7 +85,7 @@ function doWeb(doc, url) { function scrape(doc, url) { var risURL = url.replace(/[#?].+/, "") + ".ris"; - var pdfURL = attr(doc, 'a[data-download-type=pdf-article', 'href'); + var pdfURL = attr(doc, '.article-download-list a', 'href'); // Z.debug("pdfURL: " + pdfURL); ZU.doGet(risURL, function(text) { var translator = Zotero.loadTranslator("import"); @@ -200,7 +200,7 @@ var testCases = [ "creatorType": "editor" } ], - "date": "July 7, 2016", + "date": "2016-07-07", "DOI": "10.7554/eLife.16800", "ISSN": "2050-084X", "abstractNote": "Open access, open data, open source and other open scholarship practices are growing in popularity and necessity. However, widespread adoption of these practices has not yet been achieved. One reason is that researchers are uncertain about how sharing their work will affect their careers. We review literature demonstrating that open research is associated with increases in citations, media attention, potential collaborators, job opportunities and funding opportunities. These findings are evidence that open research practices bring significant benefits to researchers relative to more traditional closed practices.", @@ -416,7 +416,7 @@ var testCases = [ "creatorType": "editor" } ], - "date": "June 23, 2020", + "date": "2020-06-23", "DOI": "10.7554/eLife.54967", "ISSN": "2050-084X", "abstractNote": "The explosion in population genomic data demands ever more complex modes of analysis, and increasingly, these analyses depend on sophisticated simulations. Recent advances in population genetic simulation have made it possible to simulate large and complex models, but specifying such models for a particular simulation engine remains a difficult and error-prone task. Computational genetics researchers currently re-implement simulation models independently, leading to inconsistency and duplication of effort. This situation presents a major barrier to empirical researchers seeking to use simulations for power analyses of upcoming studies or sanity checks on existing genomic data. Population genetics, as a field, also lacks standard benchmarks by which new tools for inference might be measured. Here, we describe a new resource, stdpopsim, that attempts to rectify this situation. Stdpopsim is a community-driven open source project, which provides easy access to a growing catalog of published simulation models from a range of organisms and supports multiple simulation engine backends. This resource is available as a well-documented python library with a simple command-line interface. We share some examples demonstrating how stdpopsim can be used to systematically compare demographic inference methods, and we encourage a broader community of developers to contribute to this growing resource.", From ab50e8c580f1e1f139c86e6dd8147f4565311c7c Mon Sep 17 00:00:00 2001 From: zoe-translates Date: Wed, 6 Mar 2024 04:16:30 +0800 Subject: [PATCH 029/158] Frontiers: Improve metadata, save supplements & multiples (#3145) --- Frontiers.js | 428 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 338 insertions(+), 90 deletions(-) diff --git a/Frontiers.js b/Frontiers.js index 78a86df8a51..2f10eb504f3 100644 --- a/Frontiers.js +++ b/Frontiers.js @@ -3,13 +3,13 @@ "label": "Frontiers", "creator": "Abe Jellinek", "target": "^https?://[^./]+\\.frontiersin\\.org/", - "minVersion": "3.0", + "minVersion": "5.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2022-04-02 19:36:06" + "lastUpdated": "2023-09-27 07:21:09" } /* @@ -35,76 +35,245 @@ ***** END LICENSE BLOCK ***** */ +// NOTE: Most of the article URLs are DOI-based; see +// https://helpcenter.frontiersin.org/s/article/Article-URLs-and-File-Formats +// We don't use DOI translator directly, because for new articles the +// resolution may not be ready yet, and because 3rd-party requests to doi.org +// is unnecessary -- the Frontiers site has everything we need. -function detectWeb(doc, _url) { +const ARTICLE_BASEURL = "https://www.frontiersin.org/articles"; +const SEARCH_PAGE_RE = /^https:\/\/[^/]+\/search([?#].*)?$/; + +function detectWeb(doc, url) { if (doc.querySelector('meta[name^="citation_"]')) { return "journalArticle"; } - else if (getSearchResults(doc, true)) { - return "multiple"; + + if (SEARCH_PAGE_RE.test(url)) { + // For live Ajax search filtering. NOTE that Z.monitorDOMChanges() can + // only be called from detectWeb(). + let liveSearchElem = doc.querySelector("app-root"); + if (liveSearchElem) { + Z.monitorDOMChanges(liveSearchElem); + } + return getArticleSearch(doc, true) && "multiple"; + } + else { + return getListing(doc, true) && "multiple"; } - return false; } function getSearchResults(doc, checkOnly) { - // actual search result pages don't use tags and instead emulate tags - // with JS onclick, so this is just for topics/collections + if (SEARCH_PAGE_RE.test(doc.location.href)) { + return getArticleSearch(doc, checkOnly); + } + else { + return getListing(doc, checkOnly); + } +} + +function getArticleSearch(doc, checkOnly) { + // search results doesn't contain article links in the typical format + // (DOI-based). Only articleID in some element attribute values. But the + // site redirects '/articles/(articleID)' to the DOI-based article URL. var items = {}; var found = false; - var rows = doc.querySelectorAll('.article-list .teaser-heading a'); + // "top results" and "articles" panels respectively + var rows = doc.querySelectorAll('a[data-test-id^="article_navigate_"], li[data-test-id^="topresults_article_"]'); for (let row of rows) { - let href = row.href; - let title = ZU.trimInternal(row.textContent); - if (!href || !title) continue; + let articleIDMatch = row.dataset.testId.match(/_(\d+)$/); + if (!articleIDMatch) continue; + let articleID = articleIDMatch[1]; + + let title = text(row, ".title"); + if (!title) continue; + if (checkOnly) return true; found = true; - items[href] = title; + items[articleID] = title; } return found ? items : false; } -function doWeb(doc, url) { - if (detectWeb(doc, url) == "multiple") { - Zotero.selectItems(getSearchResults(doc, false), function (items) { - if (items) ZU.processDocuments(Object.keys(items), scrape); - }); +function getListing(doc, checkOnly) { + var items = {}; + var found = false; + var rows = doc.querySelectorAll('.article-card, .CardArticle > a'); + for (let row of rows) { + let doi = row.href && getDOI(row.href); + let title = text(row, "h1, h3"); // issue/topic listing, respectively + if (!title) { + title = ZU.trimInternal(row.textContent); + } + if (!doi || !title) continue; + if (checkOnly) return true; + found = true; + items[doi] = title; + } + return found ? items : false; +} + +async function doWeb(doc, url) { + let supplementOpts = { attach: false, asLink: false }; + if (Z.getHiddenPref) { + supplementOpts.attach = Z.getHiddenPref("attachSupplementary"); + supplementOpts.asLink = Z.getHiddenPref("supplementaryAsLink"); + } + + if (detectWeb(doc, url) == 'multiple') { + let items = await Zotero.selectItems(getSearchResults(doc, false)); + if (!items) return; + for (let id of Object.keys(items)) { + // The URL may be in "/article/nnnn.." rather than DOI-based (from + // search results). + if (/^10\.\d{4,}\/.+/.test(id)) { // id is DOI + await scrape(null, id/* doi */, supplementOpts); + } + else { // id is articleID + // take the redirect + let articleDoc = await requestDocument(`${ARTICLE_BASEURL}/${id}`); + await scrape(articleDoc, getDOI(articleDoc.location.href), + supplementOpts, id/* articleID */); + } + } } else { - scrape(doc, url); + await scrape(doc, getDOI(url), supplementOpts); } } -function scrape(doc, url) { - let risURL = attr(doc, '.citation a[href$="/reference"]', 'href'); - if (!risURL) { - risURL = url.replace(/\/full([?#].*)?$/, '/reference'); +async function scrape(doc, doi, supplementOpts, articleID) { + let supplements = []; + if (supplementOpts.attach) { + // If we need supplements, we need the articleID (string of numbers) to + // construct the URL for the JSON article-info file containing the + // supplement names and URLs. articleID may already be there, or it may + // have to be scraped from the doc + if (!articleID) { + if (!doc) { + doc = await requestDocument(`${ARTICLE_BASEURL}/${doi}/full`); + } + articleID = getArticleID(doc); + } + // Skip the fetch of supplement info JSON (although lightweight) if doc + // is available but there's no supplement button on the page. Avoid the + // "#supplementary_view" selector because it's a duplicated element id + // (the page is malformed). + if (articleID + && (!doc || doc.querySelector(".btn-open-supplemental"))) { + supplements = await getSupplements(articleID, supplementOpts.asLink); + } + } + + if (doc) { + await translateEM(doc, supplements); } - let pdfURL = attr(doc, '.download-files-pdf', 'href'); - if (!pdfURL) { - pdfURL = url.replace(/\/full([?#].*)?$/, '/pdf'); + else { + await translateBibTeX(doi, supplements); } - - ZU.doGet(risURL, function (risText) { - var translator = Zotero.loadTranslator("import"); - translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); // RIS - translator.setString(risText); - translator.setHandler("itemDone", function (obj, item) { - if (pdfURL) { - item.attachments.push({ - url: pdfURL, - title: 'Full Text PDF', - mimeType: 'application/pdf' - }); +} + +async function translateEM(doc, supplements) { + Z.debug("Frontiers: translating using Embedded Metadata"); + let translator = Zotero.loadTranslator('web'); + // Embedded Metadata + translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48'); + translator.setDocument(doc); + + translator.setHandler('itemDone', (_obj, item) => { + delete item.pages; // from meta citation_firstpage, not a page number + item.libraryCatalog = "Frontiers"; + finalizeItem(item, getDOI(doc.location.href), supplements); + }); + + let em = await translator.getTranslatorObject(); + await em.doWeb(doc, doc.location.href); +} + +async function translateBibTeX(doi, supplements) { + Z.debug("Frontiers: translating using bibTeX"); + let bibText = await requestText(`${ARTICLE_BASEURL}/${doi}/bibTex`); + + let translator = Zotero.loadTranslator("import"); + translator.setTranslator('9cb70025-a888-4a29-a210-93ec52da40d4'); // bibTeX + translator.setString(bibText); + + translator.setHandler('itemDone', (_obj, item) => { + finalizeItem(item, doi, supplements); + }); + await translator.translate(); +} + +function finalizeItem(item, doi, supplements) { + if (item.date) { + item.date = ZU.strToISO(item.date); + } + item.attachments = []; // delete EM snapshot if any; redundant with PDF + if (doi) { + item.attachments.push({ + title: 'Full Text PDF', + url: `${ARTICLE_BASEURL}/${doi}/pdf`, + mimeType: "application/pdf" + }); + } + item.attachments.push(...supplements); + item.complete(); +} + +function getDOI(url) { + let m = url.match(/https:\/\/[^/]+\.frontiersin\.org\/articles?\/(10\.\d{4,}\/[^/]+)/); + return m && m[1]; +} + +function getArticleID(doc) { + return attr(doc, "meta[name='citation_firstpage']", "content"); +} + +var MIME_TYPES = { + txt: 'text/plain', + csv: 'text/csv', + bz2: 'application/x-bzip2', + gz: 'application/gzip', + zip: 'application/zip', + pdf: 'application/pdf', + doc: 'application/msword', + docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + xls: 'application/vnd.ms-excel', + xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' +}; + +async function getSupplements(articleID, asLink) { + let infoObj = await requestJSON(`${ARTICLE_BASEURL}/getsupplementaryfilesbyarticleid?articleid=${encodeURIComponent(articleID)}&ispublishedv2=false`); + let attachments = []; + let fileInfoArray; + if (infoObj && infoObj.SupplimentalFileDetails + && (fileInfoArray = infoObj.SupplimentalFileDetails.FileDetails)) { + for (let i = 0; i < fileInfoArray.length; i++) { + let fileInfo = fileInfoArray[i]; + let url = fileInfo.FileDownloadUrl; + if (!url) continue; + + let fileName = fileInfo.FileName; + let fileExt = fileName.split(".").pop(); + if (fileExt) { + fileExt = fileExt.toLowerCase(); } - - if (item.journalAbbreviation == item.publicationTitle) { - delete item.journalAbbreviation; + let mimeType = MIME_TYPES[fileExt]; + + // Save a link as attachment if hidden pref says so, or file + // mimeType unknown + let attachment = { + title: fileName ? `Supplement - ${fileName}` : `Supplement ${i + 1}`, + url, + snapshot: !asLink && Boolean(mimeType), + }; + if (mimeType) { + attachment.mimeType = mimeType; } - - item.complete(); - }); - translator.translate(); - }); + attachments.push(attachment); + } + } + return attachments; } /** BEGIN TEST CASES **/ @@ -118,24 +287,25 @@ var testCases = [ "title": "What are the Visual Features Underlying Rapid Object Recognition?", "creators": [ { + "firstName": "Sébastien M.", "lastName": "Crouzet", - "firstName": "Sébastien", "creatorType": "author" }, { - "lastName": "Serre", "firstName": "Thomas", + "lastName": "Serre", "creatorType": "author" } ], - "date": "2011", + "date": "2011-11-15", "DOI": "10.3389/fpsyg.2011.00326", "ISSN": "1664-1078", - "abstractNote": "Research progress in machine vision has been very significant in recent years. Robust face detection and identification algorithms are already readily available to consumers, and modern computer vision algorithms for generic object recognition are now coping with the richness and complexity of natural visual scenes. Unlike early vision models of object recognition that emphasized the role of figure-ground segmentation and spatial information between parts, recent successful approaches are based on the computation of loose collections of image features without prior segmentation or any explicit encoding of spatial relations. While these models remain simplistic models of visual processing, they suggest that, in principle, bottom-up activation of a loose collection of image features could support the rapid recognition of natural object categories and provide an initial coarse visual representation before more complex visual routines and attentional mechanisms take place. Focusing on biologically plausible computational models of (bottom-up) pre-attentive visual recognition, we review some of the key visual features that have been described in the literature. We discuss the consistency of these feature-based representations with classical theories from visual psychology and test their ability to account for human performance on a rapid object categorization task.", + "abstractNote": "Research progress in machine vision has been very significant in recent years. Robust face detection and identification algorithms are already readily available to consumers, and modern computer vision algorithms for generic object recognition are now coping with the richness and complexity of natural visual scenes. Unlike early vision models of object recognition that emphasized the role of figure-ground segmentation and spatial information between parts, recent successful approaches are based on the computation of loose collections of image features without prior segmentation or any explicit encoding of spatial relations. While these models remain simplistic models of visual processing, they suggest that, in principle, bottom-up activation of a loose collection of image features could support the rapid recognition of natural object categories and provide an initial coarse visual representation before more complex visual routines and attentional mechanisms take place. Focusing on biologically-plausible computational models of (bottom-up) pre-attentive visual recognition, we review some of the key visual features that have been described in the literature. We discuss the consistency of these feature-based representations with classical theories from visual psychology and test their ability to account for human performance on a rapid object categorization task.", + "journalAbbreviation": "Front. Psychol.", + "language": "English", "libraryCatalog": "Frontiers", - "pages": "326", "publicationTitle": "Frontiers in Psychology", - "url": "https://www.frontiersin.org/article/10.3389/fpsyg.2011.00326", + "url": "https://www.frontiersin.org/articles/10.3389/fpsyg.2011.00326", "volume": "2", "attachments": [ { @@ -143,7 +313,23 @@ var testCases = [ "mimeType": "application/pdf" } ], - "tags": [], + "tags": [ + { + "tag": "Computational models" + }, + { + "tag": "Computer Vision" + }, + { + "tag": "feedforward" + }, + { + "tag": "rapid visual object recognition" + }, + { + "tag": "visual features" + } + ], "notes": [], "seeAlso": [] } @@ -158,119 +344,120 @@ var testCases = [ "title": "Aromatic inhibitors derived from ammonia-pretreated lignocellulose hinder bacterial ethanologenesis by activating regulatory circuits controlling inhibitor efflux and detoxification", "creators": [ { - "lastName": "Keating", "firstName": "David H.", + "lastName": "Keating", "creatorType": "author" }, { - "lastName": "Zhang", "firstName": "Yaoping", + "lastName": "Zhang", "creatorType": "author" }, { - "lastName": "Ong", "firstName": "Irene M.", + "lastName": "Ong", "creatorType": "author" }, { - "lastName": "McIlwain", "firstName": "Sean", + "lastName": "McIlwain", "creatorType": "author" }, { - "lastName": "Morales", "firstName": "Eduardo H.", + "lastName": "Morales", "creatorType": "author" }, { - "lastName": "Grass", "firstName": "Jeffrey A.", + "lastName": "Grass", "creatorType": "author" }, { - "lastName": "Tremaine", "firstName": "Mary", + "lastName": "Tremaine", "creatorType": "author" }, { - "lastName": "Bothfeld", "firstName": "William", + "lastName": "Bothfeld", "creatorType": "author" }, { - "lastName": "Higbee", "firstName": "Alan", + "lastName": "Higbee", "creatorType": "author" }, { - "lastName": "Ulbrich", "firstName": "Arne", + "lastName": "Ulbrich", "creatorType": "author" }, { - "lastName": "Balloon", "firstName": "Allison J.", + "lastName": "Balloon", "creatorType": "author" }, { - "lastName": "Westphall", "firstName": "Michael S.", + "lastName": "Westphall", "creatorType": "author" }, { - "lastName": "Aldrich", "firstName": "Josh", + "lastName": "Aldrich", "creatorType": "author" }, { - "lastName": "Lipton", "firstName": "Mary S.", + "lastName": "Lipton", "creatorType": "author" }, { - "lastName": "Kim", "firstName": "Joonhoon", + "lastName": "Kim", "creatorType": "author" }, { - "lastName": "Moskvin", "firstName": "Oleg V.", + "lastName": "Moskvin", "creatorType": "author" }, { - "lastName": "Bukhman", "firstName": "Yury V.", + "lastName": "Bukhman", "creatorType": "author" }, { - "lastName": "Coon", "firstName": "Joshua J.", + "lastName": "Coon", "creatorType": "author" }, { - "lastName": "Kiley", "firstName": "Patricia J.", + "lastName": "Kiley", "creatorType": "author" }, { - "lastName": "Bates", "firstName": "Donna M.", + "lastName": "Bates", "creatorType": "author" }, { - "lastName": "Landick", "firstName": "Robert", + "lastName": "Landick", "creatorType": "author" } ], - "date": "2014", + "date": "2014-08-13", "DOI": "10.3389/fmicb.2014.00402", "ISSN": "1664-302X", - "abstractNote": "Efficient microbial conversion of lignocellulosic hydrolysates to biofuels is a key barrier to the economically viable deployment of lignocellulosic biofuels. A chief contributor to this barrier is the impact on microbial processes and energy metabolism of lignocellulose-derived inhibitors, including phenolic carboxylates, phenolic amides (for ammonia-pretreated biomass), phenolic aldehydes, and furfurals. To understand the bacterial pathways induced by inhibitors present in ammonia-pretreated biomass hydrolysates, which are less well studied than acid-pretreated biomass hydrolysates, we developed and exploited synthetic mimics of ammonia-pretreated corn stover hydrolysate (ACSH). To determine regulatory responses to the inhibitors normally present in ACSH, we measured transcript and protein levels in an Escherichia coli ethanologen using RNA-seq and quantitative proteomics during fermentation to ethanol of synthetic hydrolysates containing or lacking the inhibitors. Our study identified four major regulators mediating these responses, the MarA/SoxS/Rob network, AaeR, FrmR, and YqhC. Induction of these regulons was correlated with a reduced rate of ethanol production, buildup of pyruvate, depletion of ATP and NAD(P)H, and an inhibition of xylose conversion. The aromatic aldehyde inhibitor 5-hydroxymethylfurfural appeared to be reduced to its alcohol form by the ethanologen during fermentation, whereas phenolic acid and amide inhibitors were not metabolized. Together, our findings establish that the major regulatory responses to lignocellulose-derived inhibitors are mediated by transcriptional rather than translational regulators, suggest that energy consumed for inhibitor efflux and detoxification may limit biofuel production, and identify a network of regulators for future synthetic biology efforts.", + "abstractNote": "Efficient microbial conversion of lignocellulosic hydrolysates to biofuels is a key barrier to the economically viable deployment of lignocellulosic biofuels. A chief contributor to this barrier is the impact on microbial processes and energy metabolism of lignocellulose-derived inhibitors, including phenolic carboxylates, phenolic amides (for ammonia-pretreated biomass), phenolic aldehydes, and furfurals. To understand the bacterial pathways induced by inhibitors present in ammonia-pretreated biomass hydrolysates, which are less well studied than acid-pretreated biomass hydrolysates, we developed and exploited synthetic mimics of ammonia-pretreated corn stover hydrolysate (ACSH). To determine regulatory responses to the inhibitors normally present in ACSH, we measured transcript and protein levels in an Escherichia coli ethanologen using RNA-seq and quantitative proteomics during fermentation to ethanol of synthetic hydrolysates containing or lacking the inhibitors. Our study identified four major regulators mediating these responses, the MarA/SoxS/Rob network, AaeR, FrmR, and YqhC. Induction of these regulons was correlated with a reduced rate of ethanol production, buildup of pyruvate, depletion of ATP and NAD(P)H, and an inhibition of xylose conversion. The aromatic aldehyde inhibitor 5-hydroxymethylfurfural appeared to be reduced to its alcohol form by the ethanologen during fermentation whereas phenolic acid and amide inhibitors were not metabolized. Together, our findings establish that the major regulatory responses to lignocellulose-derived inhibitors are mediated by transcriptional rather than translational regulators, suggest that energy consumed for inhibitor efflux and detoxification may limit biofuel production, and identify a network of regulators for future synthetic biology efforts.", + "journalAbbreviation": "Front. Microbiol.", + "language": "English", "libraryCatalog": "Frontiers", - "pages": "402", "publicationTitle": "Frontiers in Microbiology", - "url": "https://www.frontiersin.org/article/10.3389/fmicb.2014.00402", + "url": "https://www.frontiersin.org/articles/10.3389/fmicb.2014.00402", "volume": "5", "attachments": [ { @@ -278,7 +465,32 @@ var testCases = [ "mimeType": "application/pdf" } ], - "tags": [], + "tags": [ + { + "tag": "Biofuels" + }, + { + "tag": "Escherichia coli" + }, + { + "tag": "Ethanol" + }, + { + "tag": "Proteomics" + }, + { + "tag": "RNAseq" + }, + { + "tag": "Transcriptomics" + }, + { + "tag": "aromatic inhibitors" + }, + { + "tag": "lignocellulosic hydrolysate" + } + ], "notes": [], "seeAlso": [] } @@ -293,45 +505,46 @@ var testCases = [ "title": "Twitter Response to Munich July 2016 Attack: Network Analysis of Influence", "creators": [ { - "lastName": "Bermudez", "firstName": "Ivan", + "lastName": "Bermudez", "creatorType": "author" }, { - "lastName": "Cleven", "firstName": "Daniel", + "lastName": "Cleven", "creatorType": "author" }, { - "lastName": "Gera", "firstName": "Ralucca", + "lastName": "Gera", "creatorType": "author" }, { - "lastName": "Kiser", "firstName": "Erik T.", + "lastName": "Kiser", "creatorType": "author" }, { - "lastName": "Newlin", "firstName": "Timothy", + "lastName": "Newlin", "creatorType": "author" }, { - "lastName": "Saxena", "firstName": "Akrati", + "lastName": "Saxena", "creatorType": "author" } ], - "date": "2019", + "date": "2019-06-25", "DOI": "10.3389/fdata.2019.00017", "ISSN": "2624-909X", - "abstractNote": "Social Media platforms in Cyberspace provide communication channels for individuals, businesses, as well as state and non-state actors (i.e., individuals and groups) to conduct messaging campaigns. What are the spheres of influence that arose around the keyword #Munich on Twitter following an active shooter event at a Munich shopping mall in July 2016? To answer that question in this work, we capture tweets utilizing #Munich beginning 1 h after the shooting was reported, and the data collection ends approximately 1 month later1. We construct both daily networks and a cumulative network from this data. We analyze community evolution using the standard Louvain algorithm, and how the communities change over time to study how they both encourage and discourage the effectiveness of an information messaging campaign. We conclude that the large communities observed in the early stage of the data disappear from the #Munich conversation within 7 days. The politically charged nature of many of these communities suggests their activity is migrated to other Twitter hashtags (i.e., conversation topics). Future analysis of Twitter activity might focus on tracking communities across topics and time.", + "abstractNote": "Social Media platforms in Cyberspace provide communication channels for individuals, businesses, as well as state and non-state actors (i.e., individuals and groups) to conduct messaging campaigns. What are the spheres of influence that arose around the keyword \\textit{\\#Munich} on Twitter following an active shooter event at a Munich shopping mall in July $2016$? To answer that question in this work, we capture tweets utilizing \\textit{\\#Munich} beginning one hour after the shooting was reported, and the data collection ends approximately one month later~\\footnote{The collected dataset will be posted online for public use once the research work is published.}. We construct both daily networks and a cumulative network from this data. We analyze community evolution using the standard Louvain algorithm, and how the communities change over time to study how they both encourage and discourage the effectiveness of an information messaging campaign. We conclude that the large communities observed in the early stage of the data disappear from the \\textit{\\#Munich} conversation within seven days. The politically charged nature of many of these communities suggests their activity is migrated to other Twitter hashtags (i.e., conversation topics). Future analysis of Twitter activity might focus on tracking communities across topics and time.", + "journalAbbreviation": "Front. Big Data", + "language": "English", "libraryCatalog": "Frontiers", - "pages": "17", "publicationTitle": "Frontiers in Big Data", "shortTitle": "Twitter Response to Munich July 2016 Attack", - "url": "https://www.frontiersin.org/article/10.3389/fdata.2019.00017", + "url": "https://www.frontiersin.org/articles/10.3389/fdata.2019.00017", "volume": "2", "attachments": [ { @@ -339,7 +552,23 @@ var testCases = [ "mimeType": "application/pdf" } ], - "tags": [], + "tags": [ + { + "tag": "Influence spread" + }, + { + "tag": "Munich July 2016 Attack" + }, + { + "tag": "Twitter data analysis" + }, + { + "tag": "meme propagation" + }, + { + "tag": "social network analysis" + } + ], "notes": [], "seeAlso": [] } @@ -348,6 +577,25 @@ var testCases = [ { "type": "web", "url": "https://www.frontiersin.org/research-topics/9706/workshop-proceedings-of-the-13th-international-aaai-conference-on-web-and-social-media", + "defer": true, + "items": "multiple" + }, + { + "type": "web", + "url": "https://www.frontiersin.org/journals/digital-humanities/articles?type=24§ion=913", + "defer": true, + "items": "multiple" + }, + { + "type": "web", + "url": "https://www.frontiersin.org/search?query=ballot+secrecy+election&tab=top-results", + "defer": true, + "items": "multiple" + }, + { + "type": "web", + "url": "https://www.frontiersin.org/search?query=ballot+secrecy+election&tab=articles", + "defer": true, "items": "multiple" } ] From 86a51975f44391407b492a640870f19172ccd69e Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Thu, 7 Mar 2024 10:52:57 -0500 Subject: [PATCH 030/158] Fix author split in T&F ebooks (#3267) --- Taylor & Francis eBooks.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Taylor & Francis eBooks.js b/Taylor & Francis eBooks.js index 66f35f41f27..4344eaaa646 100644 --- a/Taylor & Francis eBooks.js +++ b/Taylor & Francis eBooks.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2022-07-13 18:40:48" + "lastUpdated": "2024-02-27 13:57:59" } /* @@ -102,8 +102,8 @@ function scrape(doc, url, itemType) { if (itemType == 'bookSection') { item.bookTitle = text(doc, 'a.product-book-link'); } - - for (let creator of text(doc, '.product-banner-author-name').split(", ")) { + + for (let creator of text(doc, '.product-banner-author-name').split(",")) { let creatorType = text(doc, '.product-banner-author').includes('Edited') ? 'editor' : 'author'; From 251549a4c2f50e007e69642f0f89e635c20805ac Mon Sep 17 00:00:00 2001 From: Laurence Stevens <19542209+LaurenceOfAustralia@users.noreply.github.com> Date: Fri, 8 Mar 2024 02:56:25 +1100 Subject: [PATCH 031/158] Add translator for The Independent (#3251) --- The Independent.js | 184 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 The Independent.js diff --git a/The Independent.js b/The Independent.js new file mode 100644 index 00000000000..597bf9f507e --- /dev/null +++ b/The Independent.js @@ -0,0 +1,184 @@ +{ + "translatorID": "274f2f78-82d6-40d9-a441-ec3935edc0a9", + "label": "The Independent", + "creator": "Laurence Stevens", + "target": "https?://(www\\.)?independent\\.co\\.uk", + "minVersion": "5.0", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 4, + "browserSupport": "gcsibv", + "lastUpdated": "2024-03-05 08:09:46" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 Laurence Stevens + + 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) { + for (let json of doc.querySelectorAll('script[type="application/ld+json"]')) { + let metadata = JSON.parse(json.textContent); + // this can be order sensitive, all Video Articles are News Articles but not all News Articles are Video Articles + if (metadata.page_type === "Video Article") { + return "videoRecording"; + } + if (metadata["@type"] === "NewsArticle") { + return "newspaperArticle"; + } + } + + return false; +} + +async function doWeb(doc, url) { + await scrape(doc, url); +} + +async function scrape(doc, url) { + const translator = Zotero.loadTranslator('web'); + translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48'); // Embedded Metadata (EM) + translator.setDocument(doc); + + translator.setHandler('itemDone', function (obj, item) { // corrections to EM + item.publicationTitle = "The Independent"; + + let linkedData = JSON.parse(ZU.xpathText(doc, '//script[@type="application/ld+json"][3]')); + if (linkedData) { + if (linkedData.headline) item.title = linkedData.headline; + if (linkedData.description) item.abstractNote = linkedData.description; + if (linkedData.datePublished) item.date = linkedData.datePublished; + if (linkedData.author.name) item.creators = [ZU.cleanAuthor(linkedData.author.name, 'author')]; + } + + item.complete(); + }); + + translator.getTranslatorObject(function (trans) { + trans.itemType = detectWeb(doc, url) || "newspaperArticle"; + trans.doWeb(doc, url); + }); +} + + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://www.independent.co.uk/sport/football/everton-tottenham-result-final-score-richarlison-b2489969.html", + "items": [ + { + "itemType": "newspaperArticle", + "title": "Everton v Tottenham result: The Pep Guardiola lesson behind the Toffees’ comeback", + "creators": [ + { + "firstName": "Richard", + "lastName": "Jolly", + "creatorType": "author" + } + ], + "date": "2024-02-03T16:10:05.000Z", + "abstractNote": "Everton 2-2 Tottenham: Richarlison’s double was erased by two set-pieces to salvage a valuable point for the Toffees", + "language": "en", + "libraryCatalog": "www.independent.co.uk", + "publicationTitle": "The Independent", + "section": "Sport", + "shortTitle": "Everton v Tottenham result", + "url": "https://www.independent.co.uk/sport/football/everton-tottenham-result-final-score-richarlison-b2489969.html", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.independent.co.uk/independentpremium/lifestyle/working-from-home-health-wfh-b2493645.html", + "items": [ + { + "itemType": "newspaperArticle", + "title": "What working from home is really doing to your health", + "creators": [ + { + "firstName": "Anna", + "lastName": "Magee", + "creatorType": "author" + } + ], + "date": "2024-02-12T06:00:00.000Z", + "abstractNote": "From calorie intake to our mental and physical health, new ways of remote and hybrid working are having some profound effects on our wellness. Anna Magee looks at the latest studies and speaks with health specialists to find out how we can make it work best for our bodies and minds", + "language": "en", + "libraryCatalog": "www.independent.co.uk", + "publicationTitle": "The Independent", + "section": "Independent Premium", + "url": "https://www.independent.co.uk/independentpremium/lifestyle/working-from-home-health-wfh-b2493645.html", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.independent.co.uk/tv/news/missing-florida-girl-police-rescue-b2504518.html", + "items": [ + { + "itemType": "videoRecording", + "title": "Missing five-year-old girl’s touching words to police as she is rescued from Florida swamp", + "creators": [ + { + "firstName": "Lucy", + "lastName": "Leeson", + "creatorType": "author" + } + ], + "date": "2024-02-29T13:07:09.000Z", + "abstractNote": "This is the moment a missing five-year-old girl who wandered into woods in Florida is rescued by police. The Hillsborough County Sheriff's Office Aviation Unit used thermal imaging to locate the girl walking through a dense wooded area in Tampa on Monday evening (26 February). She was heading towards a body of water, and aviation guided deputies to find her. The girl throws her hands up in the air when she sees the officers and asks “Are you going to get me out of the water?”. The officer then scoops her up and carries her out of the water to safety.", + "language": "en", + "libraryCatalog": "www.independent.co.uk", + "url": "https://www.independent.co.uk/tv/news/missing-florida-girl-police-rescue-b2504518.html", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + } +] +/** END TEST CASES **/ From e8a258169654d9f100d0e386230c9f45d341940c Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 8 Mar 2024 12:58:35 -0500 Subject: [PATCH 032/158] Publications Office of the EU: Download one PDF, improve metadata - Only detect when DOI is present, since we search using that - Use innerText for search result labels so
s become spaces - Download current-language PDF if possible, falling back to English and then anything available - Don't parse institutional authors - Remove "LU" place - Add tags --- Publications Office of the European Union.js | 367 +++++++++++++++++-- 1 file changed, 345 insertions(+), 22 deletions(-) diff --git a/Publications Office of the European Union.js b/Publications Office of the European Union.js index c306d12d3ea..685cfa13050 100644 --- a/Publications Office of the European Union.js +++ b/Publications Office of the European Union.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-06-01 17:01:22" + "lastUpdated": "2024-03-08 17:58:08" } /* @@ -37,8 +37,7 @@ function detectWeb(doc, url) { - if (url.includes('/publication-detail/') - && (doc.querySelector('.col-isbn') || doc.querySelector('.col-doi'))) { + if (url.includes('/publication-detail/') && doc.querySelector('.col-doi')) { return "book"; } else if (getSearchResults(doc, true)) { @@ -53,7 +52,7 @@ function getSearchResults(doc, checkOnly) { var rows = doc.querySelectorAll('.search-results-items a.documentDetailLink'); for (let row of rows) { let href = row.href; - let title = ZU.trimInternal(row.textContent); + let title = ZU.trimInternal(row.innerText); if (!href || !title || !href.includes('/publication-detail/')) continue; if (checkOnly) return true; found = true; @@ -79,7 +78,10 @@ function scrape(doc) { // service (opac.publications.europa.eu) doesn't seem especially reliable. // so we'll instead try ISBN and DOI. - let pdfLinks = doc.querySelectorAll('a.download'); + let language = doc.location.pathname.split('/')[1]; + let pdfLink = doc.querySelector(`a.download[data-language="${language}"]`) + || doc.querySelector(`a.download[data-language="en"]`) + || doc.querySelector(`a.download`); let search = Zotero.loadTranslator("search"); let DOI = ZU.cleanDOI(text(doc, '.col-doi .detail-value')); @@ -91,7 +93,19 @@ function scrape(doc) { search.setHandler("itemDone", function (obj, lookupItem) { item = lookupItem; item.creators = [...doc.querySelectorAll('span[itemprop="author"]')] - .map(span => ZU.cleanAuthor(span.innerText, 'author', true)); + .map((span) => { + let isIndividual = span.closest('.list-item-privateAuthors'); + if (isIndividual) { + return ZU.cleanAuthor(span.innerText, 'author', true); + } + else { + return { + lastName: span.innerText, + creatorType: 'author', + fieldMode: 1 + }; + } + }); item.title = item.title.replace(/[.,:;]+$/, ''); item.ISBN = text('.col-isbn .detail-value'); item.libraryCatalog = item.publisher = text(doc, @@ -102,18 +116,18 @@ function scrape(doc) { item.callNumber = text(doc, '.col-catalogueNumber .detail-value'); item.abstractNote = text('.visible-description') + ' ' + text('.show-more-description'); - for (let link of pdfLinks) { - // most documents seem to have 1-3 PDFs for different languages; - // if there are more languages available, they'll all be bundled - // together as one file. so downloading all of them shouldn't be - // overwhelming, and it's better than making assumptions or - // asking for user input. + delete item.place; + + if (pdfLink) { item.attachments.push({ - url: link.href, - title: `Full Text PDF (${link.dataset.language})`, + url: pdfLink.dataset.uri || pdfLink.href, + title: `Full Text PDF (${pdfLink.dataset.language})`, mimeType: "application/pdf" }); } + + item.tags = [...doc.querySelectorAll('#document-info .list-item-themes a, #document-info .list-item-subject a')] + .map(link => ({ tag: link.textContent.trim() })); }); search.translate(); }); @@ -136,7 +150,8 @@ var testCases = [ "creators": [ { "lastName": "Directorate-General for Economic and Financial Affairs (European Commission)", - "creatorType": "author" + "creatorType": "author", + "fieldMode": 1 }, { "firstName": "Maria Jose", @@ -155,7 +170,6 @@ var testCases = [ "callNumber": "KC-BE-18-029-EN-N", "language": "eng", "libraryCatalog": "Publications Office of the European Union", - "place": "LU", "publisher": "Publications Office of the European Union", "url": "https://data.europa.eu/doi/10.2765/528723", "attachments": [ @@ -164,7 +178,26 @@ var testCases = [ "mimeType": "application/pdf" } ], - "tags": [], + "tags": [ + { + "tag": "Economy — Finance" + }, + { + "tag": "Ireland" + }, + { + "tag": "financial risk" + }, + { + "tag": "housing" + }, + { + "tag": "prices" + }, + { + "tag": "property leasing" + } + ], "notes": [], "seeAlso": [] } @@ -180,7 +213,8 @@ var testCases = [ "creators": [ { "lastName": "Representation in Luxembourg (European Commission)", - "creatorType": "author" + "creatorType": "author", + "fieldMode": 1 } ], "date": "2020", @@ -189,25 +223,314 @@ var testCases = [ "callNumber": "ID-03-20-273-EN-N", "language": "eng", "libraryCatalog": "Publications Office of the European Union", - "place": "LU", "publisher": "Publications Office of the European Union", "shortTitle": "70th Anniversary of the Schuman Declaration", "url": "https://data.europa.eu/doi/10.2775/777816", "attachments": [ { - "title": "Full Text PDF (de)", + "title": "Full Text PDF (en)", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Construction of Europe" + }, + { + "tag": "history of Europe" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://op.europa.eu/sl/publication-detail/-/publication/2c30cce5-3660-11ee-bbbf-01aa75ed71a1", + "items": [ + { + "itemType": "book", + "title": "Osnove prava Evropske unije", + "creators": [ + { + "lastName": "Generalni direktorat za komuniciranje (Evropska komisija)", + "creatorType": "author", + "fieldMode": 1 + }, + { + "firstName": "Klaus-Dieter", + "lastName": "Borchardt", + "creatorType": "author" + } + ], + "date": "2023", + "ISBN": "9789276101437", + "abstractNote": "Pravni red Evropske unije zaznamuje naše politično življenje in družbo. Posamezniki niso več le državljani svoje države, meščani ali občani; so tudi državljani EU. S priročnikom Osnove prava Evropske unije je prof. dr. Klaus-Dieter Borchardt ustvaril referenčno delo, v katerem so opisani tudi izvori evropskega projekta in njegov nadaljnji razvoj v pravni red. Priročnik je namenjen vsem bralkam in bralcem, ki se želijo seznaniti s strukturo Evropske unije in nosilnimi stebri evropskega pravnega reda.", + "callNumber": "NA-03-19-655-SL-N", + "language": "slv", + "libraryCatalog": "Urad za publikacije Evropske unije", + "publisher": "Urad za publikacije Evropske unije", + "url": "https://data.europa.eu/doi/10.2775/100316", + "attachments": [ + { + "title": "Full Text PDF (sl)", "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Evropa" + }, + { + "tag": "Zakonodaja in pravosodje" }, + { + "tag": "evropsko sodelovanje" + }, + { + "tag": "institucija EU" + }, + { + "tag": "organ EU" + }, + { + "tag": "poglabljanje Evropske unije" + }, + { + "tag": "pravni red EU" + }, + { + "tag": "pravo EU" + }, + { + "tag": "pravo EU – nacionalno pravo" + }, + { + "tag": "pristojnost EU" + }, + { + "tag": "zgodovina Evrope" + }, + { + "tag": "širitev Evropske unije" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://op.europa.eu/en/publication-detail/-/publication/1c4561c7-7c54-11ee-99ba-01aa75ed71a1", + "items": [ + { + "itemType": "book", + "title": "Guidelines on biodiversity-friendly afforestation, reforestation and tree planting", + "creators": [ + { + "lastName": "Directorate-General for Environment (European Commission)", + "creatorType": "author", + "fieldMode": 1 + } + ], + "date": "2023", + "ISBN": "9789268001103", + "abstractNote": "Under the European Green Deal, the EU’s Biodiversity Strategy for 2030 tackles the protection and restoration of nature by making a number of specific commitments and setting several targets. Biodiversity-friendly practices for enhancing the quantity and quality of EU forests are also being promoted. The Biodiversity Strategy announced, among other objectives, guidelines on biodiversity-friendly afforestation, reforestation and tree planting. Among other things, these will contribute to the pledge to plant at least 3 billion additional trees in the EU by 2030, in full compliance with ecological principles. A roadmap to implement this pledge is included in the new EU Forest Strategy that was adopted in July 2021. In addition, these guidelines support the general EU agenda on biodiversity by contributing to our global commitments under the UN Convention on Biological Diversity. They would also support other key initiatives under the European Green Deal at implementation level, in particular the Nature Restoration Law, the Certification Framework for Carbon Removals and the Soil Mission.", + "callNumber": "KH-07-23-101-EN-N", + "language": "eng", + "libraryCatalog": "Publications Office of the European Union", + "publisher": "Publications Office of the European Union", + "url": "https://data.europa.eu/doi/10.2779/731", + "attachments": [ { "title": "Full Text PDF (en)", "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "EU strategy" + }, + { + "tag": "Environment — Ecology" + }, + { + "tag": "European forestry policy" + }, + { + "tag": "Forestry" + }, + { + "tag": "adaptation to climate change" + }, + { + "tag": "afforestation" + }, + { + "tag": "agroforestry" + }, + { + "tag": "biodiversity" + }, + { + "tag": "conservation of resources" + }, + { + "tag": "financing" + }, + { + "tag": "nature-based solution" + }, + { + "tag": "sustainable forest management" + }, + { + "tag": "terrestrial ecosystem" + }, + { + "tag": "town planning" + }, + { + "tag": "tree" + }, + { + "tag": "urban area" + }, + { + "tag": "user guide" + }, + { + "tag": "wooded area" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://op.europa.eu/en/search-results?p_p_id=eu_europa_publications_portlet_search_executor_SearchExecutorPortlet_INSTANCE_q8EzsBteHybf&p_p_lifecycle=1&p_p_state=normal&queryText=test&facet.collection=EUPub&startRow=1&resultsPerPage=10&SEARCH_TYPE=SIMPLE", + "items": "multiple" + }, + { + "type": "web", + "url": "https://op.europa.eu/en/publication-detail/-/publication/b5a7c9c6-4e01-11ee-9220-01aa75ed71a1/language-en/format-PDF/source-309009057", + "items": [ + { + "itemType": "book", + "title": "The road to Paris: stress testing the transition towards a net zero economy : the energy transition through the lens of the second ECB economy wide climate stress test", + "creators": [ + { + "lastName": "European Central Bank", + "creatorType": "author", + "fieldMode": 1 }, { - "title": "Full Text PDF (fr)", + "firstName": "Tina", + "lastName": "Emambakhsh", + "creatorType": "author" + }, + { + "firstName": "Maximilian", + "lastName": "Fuchs", + "creatorType": "author" + }, + { + "firstName": "Simon", + "lastName": "Kördel", + "creatorType": "author" + }, + { + "firstName": "Charalampos", + "lastName": "Kouratzoglou", + "creatorType": "author" + }, + { + "firstName": "Chiara", + "lastName": "Lelli", + "creatorType": "author" + }, + { + "firstName": "Riccardo", + "lastName": "Pizzeghello", + "creatorType": "author" + }, + { + "firstName": "Carmelo", + "lastName": "Salleo", + "creatorType": "author" + }, + { + "firstName": "Martina", + "lastName": "Spaggiari", + "creatorType": "author" + } + ], + "date": "2023", + "ISBN": "9789289961578", + "abstractNote": "The transition to a carbon-neutral economy is necessary to limit the negative impact of climate change and has become one of the world’s most urgent priorities. This paper assesses the impact of three potential transition pathways, differing in the timing and level of ambition of emission reductions, and quantifies the associated investment needs, economic costs and financial risks for corporates, households and financial institutions in the euro area. Building on the first ECB top-down, economy-wide climate stress test, this paper contributes to the field of climate stress testing by introducing three key innovations. First, the design of three short-term transition scenarios that combine the transition paths developed by the Network for Greening the Financial System (NGFS) with macroeconomic projections that account for the latest energy-related developments. Second, the introduction of granular sectoral dynamics and energy-specific considerations by country relevant to transition risk. Finally, this paper provides a comprehensive analysis of the impact of transition risk on the euro area private sector and on the financial system, using a granular dataset that combines climate, energy-related and financial information for millions of firms within the euro area credit register and securities database, and country-level data on households. By comparing different transition scenarios, the results of the exercise show that acting immediately and decisively would provide significant benefits for the euro area economy and financial system, not only by maintaining the optimal net-zero emissions path (and therefore limiting the physical impact of climate change), but also by limiting financial risk. An accelerated transition to a carbon-neutral economy would be helpful to contain risks for financial institutions and would not generate financial stability concerns for the euro area, provided that firms and households could finance their green investments in an orderly manner. However, the heterogeneous results across economic sectors and banks suggest that more careful monitoring of certain entities and subsets of credit exposures will be required during the transition process.", + "callNumber": "QB-AQ-23-019-EN-N", + "language": "eng", + "libraryCatalog": "Publications Office of the European Union", + "publisher": "Publications Office of the European Union", + "shortTitle": "The road to Paris", + "url": "https://data.europa.eu/doi/10.2866/49649", + "attachments": [ + { + "title": "Full Text PDF (en)", "mimeType": "application/pdf" } ], - "tags": [], + "tags": [ + { + "tag": "Economy — Finance" + }, + { + "tag": "European Central Bank" + }, + { + "tag": "banking" + }, + { + "tag": "carbon neutrality" + }, + { + "tag": "corporate finance" + }, + { + "tag": "credit" + }, + { + "tag": "economic transition" + }, + { + "tag": "energy transition" + }, + { + "tag": "euro area" + }, + { + "tag": "financial institution" + }, + { + "tag": "financial risk" + }, + { + "tag": "financial stress test" + }, + { + "tag": "foresight" + }, + { + "tag": "household" + }, + { + "tag": "reduction of gas emissions" + } + ], "notes": [], "seeAlso": [] } From ea4775bd1b0b6ac559fbc8bd7da85799ec59598e Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 11 Mar 2024 13:59:32 -0400 Subject: [PATCH 033/158] Springer Link: Support new journal layout Fixes #3247 --- Springer Link.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Springer Link.js b/Springer Link.js index e8bb385ee90..3321f5755f2 100644 --- a/Springer Link.js +++ b/Springer Link.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-02-27 16:31:58" + "lastUpdated": "2024-03-11 17:59:13" } /* @@ -89,6 +89,10 @@ function getResultList(doc) { if (!results.length) { results = doc.querySelectorAll('li[data-test="chapter"] h4.c-card__title > a, li[data-test="chapter"] h3.c-card__title > a'); } + // https://link.springer.com/journal/11192/volumes-and-issues/129-1 + if (!results.length) { + results = doc.querySelectorAll('section ol article.c-card-open h3 > a'); + } return results; } @@ -633,6 +637,16 @@ var testCases = [ "type": "web", "url": "https://link.springer.com/book/10.1007/978-3-031-04248-5", "items": "multiple" + }, + { + "type": "web", + "url": "https://link.springer.com/journal/11192/volumes-and-issues/129-1", + "items": "multiple" + }, + { + "type": "web", + "url": "https://link.springer.com/journal/10473/volumes-and-issues/44-3", + "items": "multiple" } ] /** END TEST CASES **/ From d916216f997b9765c722e0206ff23e4ad235677e Mon Sep 17 00:00:00 2001 From: geoff B <38046772+geofferb@users.noreply.github.com> Date: Fri, 8 Mar 2024 16:16:51 -0700 Subject: [PATCH 034/158] Add translator for CBC.ca --- CBC.js | 440 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 440 insertions(+) create mode 100644 CBC.js diff --git a/CBC.js b/CBC.js new file mode 100644 index 00000000000..698e2b4cd04 --- /dev/null +++ b/CBC.js @@ -0,0 +1,440 @@ +{ + "translatorID": "03c4b906-8cb2-4850-a771-697cbd92c2a1", + "label": "CBC", + "creator": "Geoff Banh", + "target": "^https?:\\/\\/www\\.cbc\\.ca", + "minVersion": "5.0", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 12, + "browserSupport": "gcsibv", + "lastUpdated": "2024-03-08 23:10:27" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 Geoff Banh + 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) { + let path = new URL(url).pathname; + if (path.includes("/search?") && getSearchResults(doc, true)) { + return 'multiple'; + } + else if ((/(news|sports|radio|books|arts|music|life|television|archives)\//.test(path)) && getLD(doc)) { + return "newspaperArticle"; + } + else if (path.includes("/player/")) { + return "videoRecording"; + } + return false; +} + +function getSearchResults(doc, checkOnly) { + var items = {}; + var found = false; + // Adjust the CSS Selectors + var rows = doc.querySelectorAll('.card.cardListing'); + for (const row of rows) { + var href = row.href; + var title = text(row, 'h3.headline'); + if (!href || !title) continue; + if (checkOnly) return true; + found = true; + items[href] = title; + } + return found ? items : false; +} + + +function getLD(doc) { + let ldScript = text(doc, "script[type='application/ld+json']"); + if (ldScript) return JSON.parse(ldScript); + return null; +} + +function getMetaContent(doc, attribute, text) { + return attr(doc.head, 'meta[' + attribute + '="' + text + '"]', 'content'); +} + + +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.language = "en-CA"; + let ld = getLD(doc); + + // only do processing if page has ld + if (ld) { + item.url = getMetaContent(doc, 'property', "og:url"); + + item.title = ld.headline ? ld.headline : ld.name; + if (item.itemType == "videoRecording") { + item.date = ZU.strToISO(ld.uploadDate); + } + else { + item.date = ZU.strToISO(ld.datePublished); + } + item.abstractNote = ld.description; + + item.creators = []; // clear existing authors + // ignore organization authors + if (ld.hasOwnProperty("author") && ld.author[0]['@type'] != "Organization") { + // either single author or multiple comma separated in one entry + if (ld.author.length == 1) { + let authors = ld.author[0].name; + if (authors.includes(',')) { + let authorsList = authors.split(','); + for (const a of authorsList) { + item.creators.push(ZU.cleanAuthor(a, "author")); + } + } + else { + item.creators.push(ZU.cleanAuthor(authors, "author")); + } + } + else { + for (const a of ld.author) { + item.creators.push(ZU.cleanAuthor(a.name, "author")); + } + } + } + + + let siteName = "CBC"; + if (item.itemType != "videoRecording") { + // get department (e.g. News, Sports, Radio) + // remove .ca/ manually, as regex lookbehind doesn't seem to work + let dept = (/\.ca\/\w+(?=\/)/.exec(item.url))[0].replace(".ca/", ""); + // capitalize department + dept = dept[0].toUpperCase() + dept.slice(1); + siteName += " " + dept; + } + item.publicationTitle = siteName; + item.libraryCatalog = "CBC.ca"; + } + item.complete(); + }); + + let em = await translator.getTranslatorObject(); + em.itemType = detectWeb(doc, url); + await em.doWeb(doc, url); +} + +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); + } +} + + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://www.cbc.ca/news/canada/online-groups-pressuring-youth-self-harm-1.7107885", + "items": [ + { + "itemType": "newspaperArticle", + "title": "Violent online groups are pressuring youth into harming themselves, authorities warn", + "creators": [ + { + "firstName": "Ioanna", + "lastName": "Roumeliotis", + "creatorType": "author" + }, + { + "firstName": "Laurence", + "lastName": "Mathieu-Leger", + "creatorType": "author" + }, + { + "firstName": "Andrew", + "lastName": "Culbert", + "creatorType": "author" + } + ], + "date": "2024-02-09", + "abstractNote": "Authorities in Canada and the U.S. are warning the public about violent online groups that deliberately target vulnerable minors and pressure them into recording or livestreaming self-harm and producing child sexual abuse material.", + "language": "en-CA", + "libraryCatalog": "CBC.ca", + "publicationTitle": "CBC News", + "url": "https://www.cbc.ca/news/canada/online-groups-pressuring-youth-self-harm-1.7107885", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.cbc.ca/sports/hockey/nhl/elias-pettersson-contract-extension-canucks-nhl-1.7132138", + "items": [ + { + "itemType": "newspaperArticle", + "title": "Canucks star forward Elias Pettersson signs 8-year contract extension", + "creators": [ + { + "firstName": "Nick", + "lastName": "Wells", + "creatorType": "author" + } + ], + "date": "2024-03-02", + "abstractNote": "The Vancouver Canucks and star centre Elias Pettersson have agreed to an eight-year contract extension, the team announced Saturday. He is second in team scoring this season with 75 points on 29 goals and 46 assists.", + "language": "en-CA", + "libraryCatalog": "CBC.ca", + "publicationTitle": "CBC Sports", + "url": "https://www.cbc.ca/sports/hockey/nhl/elias-pettersson-contract-extension-canucks-nhl-1.7132138", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.cbc.ca/player/play/2313671747656", + "items": [ + { + "itemType": "videoRecording", + "title": "If you get pulled over by police this month in Regina, expect to take a breathalyzer test", + "creators": [], + "date": "2024-03-02", + "abstractNote": "Everyone who gets pulled over for any reason will get a test. SGI and police are telling people about the plan because not everyone is aware of a 2018 federal law that allows it. CBC's Darla Ponace has more on what you need to know about mandatory roadside alcohol tests.", + "language": "en-CA", + "libraryCatalog": "CBC.ca", + "runningTime": "82.849", + "url": "https://www.cbc.ca/player/play/2313671747656", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.cbc.ca/radio/thecurrent/airport-facial-recognition-biometrics-1.7130000", + "items": [ + { + "itemType": "newspaperArticle", + "title": "Airports want to scan your face to make travelling easier. Privacy experts caution it's not ready for takeoff", + "creators": [ + { + "firstName": "Jason", + "lastName": "Vermes", + "creatorType": "author" + } + ], + "date": "2024-03-03", + "abstractNote": "While airlines and airports say facial recognition can make air travel — an often tedious experience — more efficient and seamless, privacy advocates argue the use of biometric data is fraught and open to abuse.", + "language": "en-CA", + "libraryCatalog": "CBC.ca", + "publicationTitle": "CBC Radio", + "url": "https://www.cbc.ca/radio/thecurrent/airport-facial-recognition-biometrics-1.7130000", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.cbc.ca/radio/frequency", + "detectedItemType": false, + "items": [] + }, + { + "type": "web", + "url": "https://www.cbc.ca/news/politics/trudeau-meloni-pro-palestinian-protesters-toronto-1.7132378", + "items": [ + { + "itemType": "newspaperArticle", + "title": "Trudeau's Toronto event with Italy PM Meloni cancelled due to pro-Palestinian protest", + "creators": [ + { + "firstName": "Justin", + "lastName": "Li", + "creatorType": "author" + }, + { + "firstName": "Christian", + "lastName": "Paas-Lang", + "creatorType": "author" + } + ], + "date": "2024-03-03", + "abstractNote": "A Toronto event where Canadian Prime Minister Justin Trudeau was scheduled to host his Italian counterpart was cancelled on Saturday due to security concerns as hundreds of pro-Palestinian protesters gathered outside the venue, a spokesperson for the Prime Minister's Office said.", + "language": "en-CA", + "libraryCatalog": "CBC.ca", + "publicationTitle": "CBC News", + "url": "https://www.cbc.ca/news/politics/trudeau-meloni-pro-palestinian-protesters-toronto-1.7132378", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.cbc.ca/music/canadian-reggae-songs-record-labels-1.7116717", + "items": [ + { + "itemType": "newspaperArticle", + "title": "The past, present and future of Canadian reggae", + "creators": [ + { + "firstName": "Kelsey", + "lastName": "Adams", + "creatorType": "author" + } + ], + "date": "2024-02-23", + "abstractNote": "From the 1st recording on Canadian soil to the newcomers pushing the genre forward today.", + "language": "en-CA", + "libraryCatalog": "CBC.ca", + "publicationTitle": "CBC Music", + "url": "https://www.cbc.ca/music/canadian-reggae-songs-record-labels-1.7116717", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.cbc.ca/life/culture/the-best-card-games-to-play-with-a-standard-deck-1.5836447", + "items": [ + { + "itemType": "newspaperArticle", + "title": "The best card games to play with a standard deck", + "creators": [ + { + "firstName": "Sebastian", + "lastName": "Yūe", + "creatorType": "author" + } + ], + "date": "2020-12-10", + "abstractNote": "This list will have you suggesting card night every chance you get!", + "language": "en-CA", + "libraryCatalog": "CBC.ca", + "publicationTitle": "CBC Life", + "url": "https://www.cbc.ca/life/culture/the-best-card-games-to-play-with-a-standard-deck-1.5836447", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.cbc.ca/television/he-landed-a-sitcom-role-on-his-first-audition-i-was-really-hyped-says-scarborough-teen-1.7101522", + "items": [ + { + "itemType": "newspaperArticle", + "title": "He landed a sitcom role on his first audition. 'I was really hyped,' says Scarborough teen", + "creators": [ + { + "firstName": "Russ", + "lastName": "Martin", + "creatorType": "author" + } + ], + "date": "2024-02-05", + "abstractNote": "The new CBC workplace comedy One More Time follows the manager of a second-hand sporting goods shop, DJ, played by comedian D.J. Demers, and the hijinks of his beloved gang of oddball employees. Among the motley crew is Keeran Devkar, a very green first-time associate played by 15-year-old Seran Sathiyaseelan.", + "language": "en-CA", + "libraryCatalog": "CBC.ca", + "publicationTitle": "CBC Television", + "url": "https://www.cbc.ca/television/he-landed-a-sitcom-role-on-his-first-audition-i-was-really-hyped-says-scarborough-teen-1.7101522", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.cbc.ca/search?q=Windows%2011§ion=arts&sortOrder=relevance&media=all", + "items": "multiple" + } +] + +/** END TEST CASES **/ From facbef8de9d001a5a0cc97d5cbe0cbbcf4782fc9 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 14 Mar 2024 14:58:00 -0400 Subject: [PATCH 035/158] CBC: Small fixes - Update target to include slash - Update one test for data change --- CBC.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CBC.js b/CBC.js index 698e2b4cd04..f97ac54eeb8 100644 --- a/CBC.js +++ b/CBC.js @@ -2,14 +2,14 @@ "translatorID": "03c4b906-8cb2-4850-a771-697cbd92c2a1", "label": "CBC", "creator": "Geoff Banh", - "target": "^https?:\\/\\/www\\.cbc\\.ca", + "target": "^https?:\\/\\/www\\.cbc\\.ca/", "minVersion": "5.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 12, "browserSupport": "gcsibv", - "lastUpdated": "2024-03-08 23:10:27" + "lastUpdated": "2024-03-14 19:01:01" } /* @@ -340,7 +340,7 @@ var testCases = [ "items": [ { "itemType": "newspaperArticle", - "title": "The past, present and future of Canadian reggae", + "title": "Canadian reggae's past, present and future", "creators": [ { "firstName": "Kelsey", @@ -436,5 +436,4 @@ var testCases = [ "items": "multiple" } ] - /** END TEST CASES **/ From c18f6ee030f29838af98defec20f9f20ee77f1b7 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 14 Mar 2024 16:55:22 -0400 Subject: [PATCH 036/158] CBC: Not a search translator https://github.com/zotero/translators/commit/06ba6d625f56da1fdf2545f4643ee40e01ce5e54#r139804051 --- CBC.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CBC.js b/CBC.js index f97ac54eeb8..01e76eb087a 100644 --- a/CBC.js +++ b/CBC.js @@ -7,9 +7,9 @@ "maxVersion": "", "priority": 100, "inRepository": true, - "translatorType": 12, + "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-03-14 19:01:01" + "lastUpdated": "2024-03-14 20:55:10" } /* From 41966c2d0b886812ace9b8ed03cbc9be677d44f6 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 14 Mar 2024 17:25:06 -0400 Subject: [PATCH 037/158] CI: Improve header-translator-type rule - Add detectSearch and doSearch to the list of handlers we check - Warn very explicitly when a web translator declares too many types --- .../lib/rules/header-translator-type.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/header-translator-type.js b/.ci/eslint-plugin-zotero-translator/lib/rules/header-translator-type.js index 5efbd2dd39a..363c270b760 100644 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/header-translator-type.js +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/header-translator-type.js @@ -47,7 +47,7 @@ module.exports = { return; } - for (const name of ['detectWeb', 'doWeb', 'detectImport', 'doImport', 'doExport']) { + for (const name of ['detectWeb', 'doWeb', 'detectImport', 'doImport', 'doExport', 'detectSearch', 'doSearch']) { const handler = functions.includes(name); const mode = name.replace(/^(detect|do)/, '').toLowerCase(); const bit = type[mode]; @@ -59,9 +59,19 @@ module.exports = { return; } if (!handler && (translatorType & bit)) { + let message = `translatorType specifies ${mode} (${bit}), but no ${name} present`; + if (translatorType & type.web && mode !== 'web') { + // Lots of common errors involve web translator developers not understanding + // translator type jargon and checking too many boxes - checking "search" + // because the translator supports search pages, or "import" because it + // imports items from the site. + // Be extra explicit when it seems like that might be the situation. + message += `. This web translator is probably NOT a${bit <= 2 ? 'n' : ''} ${mode} translator, ` + + `even if it supports "${mode}" pages or "${mode}ing". Uncheck "${mode}" in Scaffold.`; + } context.report({ loc: { start: { line: 1, column: 1 } }, - message: `translatorType specifies ${mode} (${bit}), but no ${name} present`, + message, }); return; } From 5b3600e8a2099626780cf5aa1ace6d4049cd1138 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Sun, 17 Mar 2024 23:38:47 -0400 Subject: [PATCH 038/158] Fix longstanding bug for L with stroke (#3275) https://forums.zotero.org/discussion/70322/ive-notice-that-zotero-has-a-problem-with-polish-letter-l-k#latest --- BibTeX.js | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/BibTeX.js b/BibTeX.js index 7aef0de5d41..a101c8a55a5 100644 --- a/BibTeX.js +++ b/BibTeX.js @@ -18,7 +18,7 @@ }, "inRepository": true, "translatorType": 3, - "lastUpdated": "2023-04-09 18:35:07" + "lastUpdated": "2024-03-18 01:19:20" } /* @@ -2896,8 +2896,8 @@ var reversemappingTable = { "{\\c l}" : "\u013C", // LATIN SMALL LETTER L WITH CEDILLA "{\\v L}" : "\u013D", // LATIN CAPITAL LETTER L WITH CARON "{\\v l}" : "\u013E", // LATIN SMALL LETTER L WITH CARON - "{\\L }" : "\u0141", //LATIN CAPITAL LETTER L WITH STROKE - "{\\l }" : "\u0142", //LATIN SMALL LETTER L WITH STROKE + "{\\L}" : "\u0141", //LATIN CAPITAL LETTER L WITH STROKE + "{\\l}" : "\u0142", //LATIN SMALL LETTER L WITH STROKE "{\\'N}" : "\u0143", // LATIN CAPITAL LETTER N WITH ACUTE "{\\'n}" : "\u0144", // LATIN SMALL LETTER N WITH ACUTE "{\\c N}" : "\u0145", // LATIN CAPITAL LETTER N WITH CEDILLA @@ -4202,6 +4202,35 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "import", + "input": "@book{derbis1998poczucie,\r\ntitle={Poczucie jako{\\'s}ci {\\.z}ycia a swoboda dzia{\\l}ania i odpowiedzialno{\\'s}{\\'c}},\r\nauthor={Derbis, Romuald and Ba{\\'n}ka, Augustyn},\r\nyear={1998},\r\npublisher={Stowarzyszenie Psychologia i Architektura}\r\n}", + "items": [ + { + "itemType": "book", + "title": "Poczucie jakości życia a swoboda działania i odpowiedzialność", + "creators": [ + { + "firstName": "Romuald", + "lastName": "Derbis", + "creatorType": "author" + }, + { + "firstName": "Augustyn", + "lastName": "Bańka", + "creatorType": "author" + } + ], + "date": "1998", + "itemID": "derbis1998poczucie", + "publisher": "Stowarzyszenie Psychologia i Architektura", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From ab9cb7adce99f5b41b91b9b49eded3f1d5224d2e Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Mon, 18 Mar 2024 12:16:07 -0400 Subject: [PATCH 039/158] Update Turkish National Library, lint MARC (#3271) --- MARC.js | 9 ++- Milli Kutuphane.js | 176 ++++++++++++++++++++++++++------------------- 2 files changed, 108 insertions(+), 77 deletions(-) diff --git a/MARC.js b/MARC.js index cf9baa702d7..1f5b8e396c5 100644 --- a/MARC.js +++ b/MARC.js @@ -8,10 +8,9 @@ "priority": 100, "inRepository": true, "translatorType": 1, - "lastUpdated": "2020-10-14 14:41:53" + "lastUpdated": "2024-03-15 21:14:09" } - /* ***** BEGIN LICENSE BLOCK ***** @@ -113,7 +112,7 @@ function glueTogether(part1, part2, delimiter) { return part1 + ' ' + part2; } // we only add the delimiter, if part1 is not ending with a punctation - if (part1.search(/[?:,.!;]\s*$/) > -1) { + if (/[?:,.!;]\s*$/.test(part1)) { return part1 + ' ' + part2; } return part1 + delimiter + part2; @@ -410,7 +409,7 @@ record.prototype.translate = function (item) { let authorTab = this.getFieldSubfields(i); for (let j in authorTab) { if (authorTab[j].a) { - item.creators.push({ lastName: authorTab[j].a, creatorType: "contributor", fieldMode: true }); + item.creators.push({ lastName: authorTab[j].a, creatorType: "contributor", fieldMode: 1 }); } } } @@ -534,7 +533,7 @@ record.prototype.translate = function (item) { authorTab[j].a = authorTab[j].a.replace(/^[\s\u00A0.,/[\]:]+/, '') .replace(/[\s\u00A0.,/[\]:]+$/, '') .replace(/[\s\u00A0]+/, ' '); - creatorObject = { lastName: authorTab[j].a, creatorType: "contributor", fieldMode: true }; + creatorObject = { lastName: authorTab[j].a, creatorType: "contributor", fieldMode: 1 }; } // some heuristic for the default values: // in a book without any person as a main entry (no 100 field) diff --git a/Milli Kutuphane.js b/Milli Kutuphane.js index f3221554f3e..d2f1932da02 100644 --- a/Milli Kutuphane.js +++ b/Milli Kutuphane.js @@ -1,7 +1,7 @@ { "translatorID": "a5998785-222b-4459-9ce8-9c081d599af7", "label": "Milli Kütüphane", - "creator": "Philipp Zumstein", + "creator": "Philipp Zumstein, Sebastian Karcher", "target": "^https?://(www\\.)?kasif\\.mkutup\\.gov\\.tr/", "minVersion": "4.0", "maxVersion": "", @@ -9,13 +9,13 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2017-10-01 17:23:23" + "lastUpdated": "2024-03-15 18:16:49" } /* ***** BEGIN LICENSE BLOCK ***** - Copyright © 2017 Philipp Zumstein + Copyright © 2017-2024 Philipp Zumstein & Sebastian Karcher This file is part of Zotero. @@ -36,40 +36,38 @@ */ -// attr()/text() v2 -function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null} - - function detectWeb(doc, url) { - if (url.indexOf('/SonucDetay.aspx?MakId=')>-1) { + if (url.includes('?MakId=')) { return "book"; - } else if (url.indexOf('/OpacArama.aspx?')>-1 && getSearchResults(doc, true)) { + } + else if (url.includes('/OpacArama') && getSearchResults(doc, url, true)) { return "multiple"; } - Z.monitorDOMChanges(doc.getElementById('dvKapsam'), {childList: true}); + Z.monitorDOMChanges(doc.getElementById('dvKapsam'), { childList: true }); + return false; } -function getSearchResults(doc, checkOnly) { +function getSearchResults(doc, url, checkOnly) { var items = {}; var found = false; - - var rows = doc.querySelectorAll('.SonucDiv1'); - - for (var i=0; i0) { - fieldTag = text(lines[j], 'td', 0); - } - indicators = text(lines[j], 'td', 1) + text(lines[j], 'td', 2); - fieldContent = ''; - if (text(lines[j], 'td', 3).trim().length>0) { - fieldContent = marc.subfieldDelimiter + text(lines[j], 'td', 3); - } - fieldContent += text(lines[j], 'td', 4); - - record.addField(fieldTag, indicators, fieldContent); + let translator = Zotero.loadTranslator('import'); + translator.setTranslator('a6ee60df-1ddc-4aae-bb25-45e0537be973'); // MARC + let marc = await translator.getTranslatorObject(); + + let record = new marc.record(); + let newItem = new Zotero.Item(); + //ignore the table headings in lines[0] + record.leader = text(lines[1], 'td', 4); + var fieldTag, indicators, fieldContent; + for (var j = 2; j < lines.length; j++) { + //multiple lines with same fieldTag do not repeat it + //i.e. in these cases we will just take same value as before + if (text(lines[j], 'td', 0).trim().length > 0) { + fieldTag = text(lines[j], 'td', 0); } + indicators = text(lines[j], 'td', 1) + text(lines[j], 'td', 2); + fieldContent = ''; + if (text(lines[j], 'td', 3).trim().length > 0) { + fieldContent = marc.subfieldDelimiter + text(lines[j], 'td', 3); + } + fieldContent += text(lines[j], 'td', 4); + + record.addField(fieldTag, indicators, fieldContent); + } - record.translate(newItem); + record.translate(newItem); - //don't save value "no publisher" = "yayl.y." - if (newItem.publisher == 'yayl.y.') { - delete newItem.publisher; - } + //don't save value "no publisher" = "yayl.y." + if (newItem.publisher == 'yayl.y.') { + delete newItem.publisher; + } - newItem.complete(); - }); + newItem.complete(); } /** BEGIN TEST CASES **/ @@ -207,6 +198,47 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://kasif.mkutup.gov.tr/SonucDetayEn.aspx?MakId=1705892", + "items": [ + { + "itemType": "book", + "title": "Labor laws ın Turkey", + "creators": [ + { + "lastName": "The İstanbul Chamber of Commerce", + "creatorType": "editor", + "fieldMode": 1 + }, + { + "firstName": "A. Murat", + "lastName": "Demircioğlu", + "creatorType": "editor" + } + ], + "date": "1988", + "callNumber": "1989 AD 1093", + "language": "TUR", + "libraryCatalog": "Milli Kütüphane", + "numPages": "43", + "place": "İstanbul", + "publisher": "The Istanbul Chamber of Commerce", + "series": "ICOC Publication", + "seriesNumber": "1988-20", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://kasif.mkutup.gov.tr/OpacAramaEn.aspx?Ara=test&DtSrc=0&fld=-1&NvBar=0", + "defer": true, + "items": "multiple" } ] /** END TEST CASES **/ From f3404ea73f11e47fd8601fcd4f31ecd3d3f70bb8 Mon Sep 17 00:00:00 2001 From: aldente-hu Date: Tue, 19 Mar 2024 23:13:56 +0900 Subject: [PATCH 040/158] J-Stage: Handle Japanese names properly (#3157) Co-authored-by: zoe-translates --- J-Stage.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/J-Stage.js b/J-Stage.js index 0371b96cc84..26c52d93296 100644 --- a/J-Stage.js +++ b/J-Stage.js @@ -1,7 +1,7 @@ { "translatorID": "e40a27bc-0eef-4c50-b78b-37274808d7d2", "label": "J-Stage", - "creator": "Sebastian Karcher", + "creator": "Sebastian Karcher, Satoshi Ando", "target": "^https?://www\\.jstage\\.jst\\.go\\.jp/", "minVersion": "3.0", "maxVersion": "", @@ -9,13 +9,14 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-04-27 13:09:03" + "lastUpdated": "2023-10-06 07:23:03" } /* ***** BEGIN LICENSE BLOCK ***** - J-Stage translator - Copyright © 2012 Sebastian Karcher + J-Stage translator - Copyright © 2012 Sebastian Karcher, + Copyright © 2023 Satoshi Ando This file is part of Zotero. Zotero is free software: you can redistribute it and/or modify @@ -77,22 +78,21 @@ function doWeb(doc, url) { // help function function scrape(doc, url) { - // get abstract and tags from article plage + // get abstract and tags from article page var abs = text("#article-overiew-abstract-wrap"); var tagNodes = doc.querySelectorAll("meta[name='citation_keywords']"); var tags = []; for (let tagNode of tagNodes) { tags.push(tagNode.content); } - - // get BibTex Link - var bibtexurl = ZU.xpathText(doc, '//a[contains(text(), "BIB TEX")]/@href'); - ZU.doGet(bibtexurl, function (text) { - var bibtex = text; - // Zotero.debug(bibtex) + + // get RIS Link + var risurl = ZU.xpathText(doc, '//div[contains(@class, "third-level-sublinks")]//a[contains(text(), "RIS")]/@href'); + ZU.doGet(risurl, function (text) { + var ris = text; var translator = Zotero.loadTranslator("import"); - translator.setTranslator("9cb70025-a888-4a29-a210-93ec52da40d4"); - translator.setString(bibtex); + translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); // RIS + translator.setString(ris); translator.setHandler("itemDone", function (obj, item) { if (abs) item.abstractNote = abs.replace(/^\s*(?:Abstract|抄録)\s*/, ''); if (tags) item.tags = tags; @@ -107,6 +107,8 @@ function scrape(doc, url) { if (item.title == item.title.toUpperCase()) { item.title = ZU.capitalizeTitle(item.title.toLowerCase(), true); } + delete item.journalAbbreviation; // J-Stage doesn't output journal abbreviations. + if (item.publicationTitle == item.publicationTitle.toUpperCase()) { item.publicationTitle = ZU.capitalizeTitle(item.publicationTitle.toLowerCase(), true); } @@ -167,7 +169,6 @@ var testCases = [ "date": "2001", "DOI": "10.2208/prohe.45.811", "abstractNote": "Soil erosion is one of the most serious environmental problems commonly in over the world, which is caused by both natural and human factors. It is possible to investigate the global issue on soil erosion with the development of global data sets. This research estimated global soil erosion by the RUSLE model with use of a comprehensive global data set. The accuracy of the estimate mostly depends on the available information related to the study area. Present available finest data was used in this study. As the desired objective of estimating soil erosion by water at global scale, the application of RUSLE has shown its positive applicability on large-scale estimates. The study has shown a global view of water soil erosion potential with 0.5-degree grid resolution. Regional validations and examinations have been carried out by different ways. The global mean of annual soil erosion by water was estimated as 1100 ton/ km2, which agrees with several results obtained in different regions.", - "itemID": "2001811", "libraryCatalog": "J-Stage", "pages": "811-816", "publicationTitle": "Proceedings of Hydraulic Engineering", @@ -222,20 +223,19 @@ var testCases = [ "title": "フラックスタワーデータを用いた各種植生指標の季節変化の検討", "creators": [ { - "firstName": "田中", - "lastName": "博春", + "firstName": "博春", + "lastName": "田中", "creatorType": "author" }, { - "firstName": "小熊", - "lastName": "宏之", + "firstName": "宏之", + "lastName": "小熊", "creatorType": "author" } ], "date": "2003", "DOI": "10.11519/jfs.114.0.280.0", "abstractNote": "I. はじめに 分光日射計データから得られる各種植生指標の季節変化を、CO2吸収量ならびに葉面積指数の季節変化と比較した。データは、国立環境研究所苫小牧フラックスリサーチサイト(カラマツ人工林)のタワーデータを用いた。・各種植生指標:全天分光日射計 英弘精機MS-131WP使用。地上高40mに設置した上向き・下向きの日積算日射量より各種植生指標値を算出。波長帯は、可視(Ch3:590-695nm≒ 赤)と近赤外(Ch5:850-1200nm)の組み合わせ[図1-a]、ならびに可視(Ch2:395-590nm≒青・緑)と 近赤外(Ch4:695-850nm)の組み合わせ[図1-b]の2通りを用いた。・CO2フラックス日中積算値:クローズドパス法非分散型赤外線分析計Li-Cor LI-6262使用。地上高27m 9:00から16:30までの30分値を加算、日中の積算値とした[図1-c]。・葉面積指数(LAI):光合成有効放射計Li-Cor LI-190SB 地上高1.5mと40mの下向き光合成有効放射量(PAR)の日積算値の比から、Lambert-Beerの式を用いPAI(Plant Area Index)を算出。落葉期の測定値を減じLAIとした [図1-d]。II. 日中CO2フラックスと植生指標GEMIの整合性[図1-c] Ch2とCh4から求めた植生指標GEMI(Global Environmental Monitoring Index)の季節変化と、日中積算CO2フラックスの極小値を結んだ包絡線の季節変化の間によい一致がみられた[図1-c]。特にカラマツの萌芽後のGEMI値の急増時期や、展葉に伴うGEMI値の増加傾向が、CO2フラックスの変化傾向とよく一致している。ただし紅葉期は両者は一致しない。これは、光合成活動が低下した葉が落葉せずに残るためと思われる。III. 各種植生指標の季節変化 [図1-a,b] これに対し、植生指標としてよく用いられる正規化植生指標NDVI(Normalized Vegetation Index)は、CO2フラックスの季節変化傾向と一致しなかった。NDVIは春先の融雪に伴う値のジャンプがあり、また6__から__10月の活葉期に値がだいたい一定となる。この特徴は、Ch3とCh5から求めた図1-aの4つの植生指標も同様であった。しかし、Ch2とCh4を用いた図1-bのGEMIと、近赤外と可視の差であるDVI(Difference Vegetation Index)にはこれらの特徴がみられず、CO2フラックスの季節変化傾向と同様に萌芽後に値が急増し、6月にピークを迎えた後なだらかに減少した。IV. 葉面積指数LAIと植生指標GEMIの整合性 [図1-d] 葉面積指数(LAI)が正常値を示す、積雪期以外のLAIの季節変化を、Ch2とCh4によるGEMI(≒CO2フラックスの季節変化)と比較すると、カラマツ萌芽後の展葉期にはGEMIより1__から__2週間ほど遅れてLAIの値が増加した。タワー設置のモニタリングカメラの日々の画像の変化を見ても、カラマツの葉の色の変化が先に現れ、その後に葉が茂ってゆく様子がわかる。 萌芽後、LAIは直線的に増加するが、GEMIの増加は立ち上がりは急なものの徐々に増加量が減ってくる。これは、萌芽後LAIの増加とともに葉の相互遮蔽が生じ、下層まで届く光量が減少するため、群落全体としての光合成活動が低下することが原因と思われる。 他にも、今回の測定方法ではLAIとしてカウントされていない林床植物のCO2フラックスの影響等が想定される。<CO2フラックス・LAIデータ提供: 産業総合技術研究所 三枝 信子・王 輝民>", - "itemID": "田中博春2003", "libraryCatalog": "J-Stage", "pages": "280-280", "publicationTitle": "日本林学会大会発表データベース", From 1d7c11ec5a125191a149edbd6ef235da50c86508 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 19 Mar 2024 11:47:31 -0400 Subject: [PATCH 041/158] Note HTML & Note Markdown: Support EPUB/snapshot annotations (#3253) --- Note HTML.js | 20 ++++++++++++++++---- Note Markdown.js | 22 +++++++++++++++++----- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/Note HTML.js b/Note HTML.js index 64f070b016f..c2def8beea5 100644 --- a/Note HTML.js +++ b/Note HTML.js @@ -14,7 +14,7 @@ }, "inRepository": true, "translatorType": 2, - "lastUpdated": "2022-10-26 10:47:11" + "lastUpdated": "2024-02-13 18:47:05" } /* @@ -93,12 +93,24 @@ function doExport() { openURI = 'zotero://open-pdf/groups/' + groupID + '/items/' + key; } - openURI += '?page=' + (position.pageIndex + 1) - + (annotation.annotationKey ? '&annotation=' + annotation.annotationKey : ''); + let linkText; + if (position.type === 'FragmentSelector') { + openURI += '?cfi=' + encodeURIComponent(position.value); + linkText = 'epub'; + } + else if (position.type === 'CssSelector') { + openURI += '?sel=' + encodeURIComponent(position.value); + linkText = 'snapshot'; + } + else { + openURI += '?page=' + (position.pageIndex + 1) + + (annotation.annotationKey ? '&annotation=' + annotation.annotationKey : ''); + linkText = 'pdf'; + } let a = doc.createElement('a'); a.href = openURI; - a.append('pdf'); + a.append(linkText); let fragment = doc.createDocumentFragment(); fragment.append(' (', a, ') '); diff --git a/Note Markdown.js b/Note Markdown.js index fb52f999be3..27ff2292641 100644 --- a/Note Markdown.js +++ b/Note Markdown.js @@ -14,7 +14,7 @@ }, "inRepository": true, "translatorType": 2, - "lastUpdated": "2022-08-26 11:00:00" + "lastUpdated": "2024-03-19 15:35:00" } /* @@ -1524,12 +1524,24 @@ function convert(doc) { openURI = 'zotero://open-pdf/groups/' + groupID + '/items/' + key; } - openURI += '?page=' + (position.pageIndex + 1) - + (annotation.annotationKey ? '&annotation=' + annotation.annotationKey : ''); - + let linkText; + if (position.type === 'FragmentSelector') { + openURI += '?cfi=' + encodeURIComponent(position.value); + linkText = 'epub'; + } + else if (position.type === 'CssSelector') { + openURI += '?sel=' + encodeURIComponent(position.value); + linkText = 'snapshot'; + } + else { + openURI += '?page=' + (position.pageIndex + 1) + + (annotation.annotationKey ? '&annotation=' + annotation.annotationKey : ''); + linkText = 'pdf'; + } + let a = doc.createElement('a'); a.href = openURI; - a.append('pdf'); + a.append(linkText); let fragment = doc.createDocumentFragment(); fragment.append(' (', a, ') '); From d81f5fdb5d62e11de87d677b0affddd064dd0f00 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Tue, 19 Mar 2024 22:29:41 -0400 Subject: [PATCH 042/158] Fix OSF Preprints (#3277) remove tests for preprint item type -- that's now 2 years old. --- OSF Preprints.js | 123 +++++++++++++++-------------------------------- 1 file changed, 39 insertions(+), 84 deletions(-) diff --git a/OSF Preprints.js b/OSF Preprints.js index 43cc79dd726..3318b3f981f 100644 --- a/OSF Preprints.js +++ b/OSF Preprints.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2022-04-04 18:35:34" + "lastUpdated": "2024-03-20 01:58:39" } /* @@ -35,16 +35,11 @@ ***** END LICENSE BLOCK ***** */ - -const preprintType = ZU.fieldIsValidForType('title', 'preprint') - ? 'preprint' - : 'report'; - function detectWeb(doc, url) { - if (text(doc, 'h1#preprintTitle')) { - return preprintType; + if (text(doc, 'h1[data-test-preprint-title]')) { + return "preprint"; } - else if (url.includes("discover?") && getSearchResults(doc, true)) { + else if (url.includes("search?") && getSearchResults(doc, true)) { return "multiple"; } Z.monitorDOMChanges(doc.body); @@ -57,7 +52,7 @@ function getSearchResults(doc, checkOnly) { var found = false; // The Preprint search on OSF includes other preprints such as PeerJ and RePec var supportedSites = /^https?:\/\/(osf\.io|psyarxiv\.com|arabixiv\.org|biohackrxiv\.org|eartharxiv\.org|ecoevorxiv\.org|ecsarxiv\.org|edarxiv\.org|engrxiv\.org|frenxiv\.org|indiarxiv\.org|mediarxiv\.org|paleorxiv\.org)/; - var rows = doc.querySelectorAll('.search-result h4>a'); + var rows = doc.querySelectorAll('div[class*="primary-metadata-container"] h4>a'); for (let row of rows) { let href = row.href; let title = ZU.trimInternal(row.textContent); @@ -101,7 +96,7 @@ function osfAPIImport(text) { let json = JSON.parse(text); let attr = json.data.attributes; let embeds = json.data.embeds; - var item = new Zotero.Item(preprintType); + var item = new Zotero.Item("preprint"); // currently we're just doing preprints, but putting this here in case we'll want to handle different OSF // item types in the future // let type = json.data.type @@ -110,9 +105,6 @@ function osfAPIImport(text) { item.date = attr.date_published; item.publisher = embeds.provider.data.attributes.name; item.DOI = json.data.links.preprint_doi && ZU.cleanDOI(json.data.links.preprint_doi); - if (preprintType != 'preprint') { - item.extra = "type: article"; - } item.url = json.data.links.html; for (let tag of attr.tags) { item.tags.push(tag); @@ -143,14 +135,6 @@ function scrape(doc, url) { translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48'); translator.setHandler('itemDone', function (obj, item) { - if (preprintType != 'preprint') { - if (item.extra) { - item.extra += "\ntype: article"; - } - else { - item.extra = "type: article"; - } - } // remove Snapshot, which is useless for OSF preprints (plus we should always get a PDF) for (let i = item.attachments.length - 1; i >= 0; i--) { if (item.attachments[i].title == "Snapshot") { @@ -162,7 +146,7 @@ function scrape(doc, url) { }); translator.getTranslatorObject(function (trans) { - trans.itemType = preprintType; + trans.itemType = "preprint"; trans.doWeb(doc, url); }); } @@ -172,7 +156,7 @@ function scrape(doc, url) { var testCases = [ { "type": "web", - "url": "https://psyarxiv.com/nx2b4/", + "url": "https://osf.io/preprints/psyarxiv/nx2b4", "defer": true, "items": [ { @@ -190,33 +174,19 @@ var testCases = [ "creatorType": "author" } ], - "date": "2020-05-05T19:14:05.245Z", + "date": "2020-05-05", "DOI": "10.31234/osf.io/nx2b4", - "abstractNote": "We introduce a new Dutch receptive vocabulary test, the Dutch auditory & image vocabulary test (DAIVT). The test is multiple choice and assesses vocabulary knowledge for spoken words. The measure has an online format, has free access, and allows easy data collection. The test was developed with the intent to enable testing for research purposes with university students. This paper describes the test construction. We cover three phases: 1) collecting stimulus materials and developing the test’s first version, 2) an exploratory item-analysis on the first draft (n= 93), and 3) validating the test (both the second and the final version) by comparing it to two existing tests (n= 270, n= 157). The results indicate that the test is reliable and correlates well with existing Dutch receptive vocabulary tests (convergent validity). The final version of the DAIVT comprises 90 test items and 1 practice item. It can be used freely for research purposes.", + "abstractNote": "We introduce a new Dutch receptive vocabulary test, the Dutch auditory & image vocabulary test (DAIVT). The test is multiple choice and assesses vocabulary knowledge for spoken words. The measure has an online format, has free access, and allows easy data collection. The test was developed with the intent to enable testing for research purposes with university students. This paper describes the test construction. We cover three phases: 1) collecting stimulus materials and developing the test’s first version, 2) an exploratory item-analysis on the first draft (n= 93), and 3) validating the test (both the second and the final version) by comparing it to two existing tests (n= 270, n= 157). The results indicate that the test is reliable and correlates well with existing Dutch receptive vocabulary tests (convergent validity). The final version of the DAIVT comprises 90 test items and 1 practice item. It can be used freely for research purposes.", "language": "en-us", "libraryCatalog": "OSF Preprints", - "repository": "PsyArXiv", + "repository": "OSF", "shortTitle": "The Dutch Auditory & Image Vocabulary Test (DAIVT)", - "url": "https://psyarxiv.com/nx2b4/", - "attachments": [ - { - "title": "Full Text PDF", - "mimeType": "application/pdf" - } - ], + "url": "https://osf.io/nx2b4", + "attachments": [], "tags": [ - { - "tag": "Cognitive Psychology" - }, { "tag": "Dutch vocabulary" }, - { - "tag": "Language" - }, - { - "tag": "Social and Behavioral Sciences" - }, { "tag": "individual differences" }, @@ -240,7 +210,7 @@ var testCases = [ }, { "type": "web", - "url": "https://osf.io/b2xmp/", + "url": "https://osf.io/preprints/osf/b2xmp", "defer": true, "items": [ { @@ -303,68 +273,33 @@ var testCases = [ "creatorType": "author" } ], - "date": "2020-04-29T12:19:21.907Z", + "date": "2020-04-29", "DOI": "10.31219/osf.io/b2xmp", "abstractNote": "Current demand for SARS-CoV-2 testing is straining material resource and labor capacity around the globe. As a result, the public health and clinical community are hindered in their ability to monitor and contain the spread of COVID-19. Despite broad consensus that more testing is needed, pragmatic guidance towards realizing this objective has been limited. This paper addresses this limitation by proposing a novel and geographically agnostic framework (‘the 4Ps Framework) to guide multidisciplinary, scalable, resource-efficient, and achievable efforts towards enhanced testing capacity. The 4Ps (Prioritize, Propagate, Partition, and Provide) are described in terms of specific opportunities to enhance the volume, diversity, characterization, and implementation of SARS-CoV-2 testing to benefit public health. Coordinated deployment of the strategic and tactical recommendations described in this framework have the potential to rapidly expand available testing capacity, improve public health decision-making in response to the COVID-19 pandemic, and/or to be applied in future emergent disease outbreaks.", "language": "en-us", "libraryCatalog": "OSF Preprints", - "repository": "OSF Preprints", + "repository": "OSF", "shortTitle": "‘All In’", - "url": "https://osf.io/b2xmp/", - "attachments": [ - { - "title": "Full Text PDF", - "mimeType": "application/pdf" - } - ], + "url": "https://osf.io/b2xmp", + "attachments": [], "tags": [ { "tag": "COVID-19" }, - { - "tag": "Diseases" - }, - { - "tag": "Health Policy" - }, - { - "tag": "Life Sciences" - }, - { - "tag": "Medicine and Health Sciences" - }, - { - "tag": "Microbiology" - }, { "tag": "Pandemic" }, - { - "tag": "Public Affairs" - }, { "tag": "Public Health" }, - { - "tag": "Public Policy and Public Administration" - }, { "tag": "RT-PCR" }, { "tag": "SARS-CoV-2" }, - { - "tag": "Social and Behavioral Sciences" - }, { "tag": "Virologic Testing" - }, - { - "tag": "Virology" - }, - { - "tag": "Virus Diseases" } ], "notes": [], @@ -374,8 +309,28 @@ var testCases = [ }, { "type": "web", - "url": "https://osf.io/preprints/discover?provider=OSFORAgriXivORSocArXiv&q=testing", + "url": "https://osf.io/preprints/socarxiv/j7qta", + "defer": true, + "items": [ + { + "itemType": "preprint", + "title": "SocArXiv Papers | The Reliability of Replications: A Study in Computational Reproductions", + "creators": [], + "language": "en-us", + "libraryCatalog": "OSF Preprints", + "shortTitle": "SocArXiv Papers | The Reliability of Replications", + "url": "https://osf.io/preprints/socarxiv/j7qta", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", "defer": true, + "url": "https://osf.io/search?activeFilters=%5B%5D&q=metascience&resourceType=Preprint&sort=-relevance&view_only=", "items": "multiple" } ] From 1c99c1a2b088cbb31218b9ad9f7aff5ea300537f Mon Sep 17 00:00:00 2001 From: aborel Date: Wed, 20 Mar 2024 15:52:41 +0100 Subject: [PATCH 043/158] Zenodo -> InvenioRDM, support more repositories (#3206) Co-authored-by: Abe Jellinek --- InvenioRDM.js | 1260 +++++++++++++++++++++++++++++++++++++++++++++++++ Zenodo.js | 661 -------------------------- 2 files changed, 1260 insertions(+), 661 deletions(-) create mode 100644 InvenioRDM.js delete mode 100644 Zenodo.js diff --git a/InvenioRDM.js b/InvenioRDM.js new file mode 100644 index 00000000000..7ddb53046a1 --- /dev/null +++ b/InvenioRDM.js @@ -0,0 +1,1260 @@ +{ + "translatorID": "a714cb93-6595-482f-b371-a4ca0be14449", + "label": "InvenioRDM", + "creator": "Philipp Zumstein, Sebastian Karcher and contributors", + "target": "^https?://(zenodo\\.org|sandbox\\.zenodo\\.org|data\\.caltech\\.edu|repository\\.tugraz\\.at|researchdata\\.tuwien\\.at|ultraviolet\\.library\\.nyu\\.edu|adc\\.ei-basel\\.hasdai\\.org|fdat\\.uni-tuebingen\\.de|www\\.fdr\\.uni-hamburg\\.de|rodare\\.hzdr\\.de|aperta\\.ulakbim.gov\\.tr|www\\.openaccessrepository\\.it|eic-zenodo\\.sdcc\\.bnl\\.gov)", + "minVersion": "6.0", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 4, + "browserSupport": "gcsibv", + "lastUpdated": "2024-03-20 14:43:12" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2016-2023 Philipp Zumstein, Sebastian Karcher and contributors + + 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 ***** +*/ + +/* +For repositories based on InvenioRDM. Currently supported: +- Zenodo (including the sandbox platform) as of October 2023 +- Caltech Data (California Institute of Technology, USA) +- FDAT Research Data Repository (University of Tübingen, USA) +- TU Graz Repository (Graz University of Technology, Austria) +- TU Wien Research Data (Vienna Technical University, Austria) +- UltraViolet (NYU, USA) + +Also supports some repositories based on Zenodo's pre-October 2023 Invenio code base: +- Aperta (National Academic Network and Information Center, Turkey) +- Center for Sustainable Research Data Management, Universität Hamburg (Hamburg, Germany) +- EIC-Zenodo (Brookhaven National Laboratory, USA) +- INFN Open Access Repository (National Institute for Nuclear Physics, Italy) +- RODARE (Helmholtz-Zentrum Dresden-Rossendorf, Germany) + + +*/ + +// Only the pre-RDM is really necessary +//const invenioRdmRepositories = ['zenodo.org', 'sandbox.zenodo.org', 'data.caltech.edu', 'repository.tugraz.at', 'researchdata.tuwien.at', 'ultraviolet.library.nyu.edu', 'adc.ei-basel.hasdai.org', 'fdat.uni-tuebingen.de']; +const invenioPreRdmRepositories = ['www.fdr.uni-hamburg.de', 'rodare.hzdr.de', 'aperta.ulakbim.gov.tr', 'www.openaccessrepository.it', 'eic-zenodo.sdcc.bnl.gov']; + + +function detectWeb(doc, _url) { + let collections; + if (doc.location.pathname.startsWith('/record')) { + if (invenioPreRdmRepositories.includes(doc.location.hostname)) { + collections = ZU.xpath(doc, '//span[@class="pull-right"]/span[contains(@class, "label-default")]'); + } + else { + collections = doc.querySelectorAll('span[aria-label="Resource type"]'); + if (collections.length == 0) { + // A common variant for other InvenioRDM repositories + collections = doc.querySelectorAll('span[title="Resource type"]'); + } + } + + for (let collection of collections) { + let type = collection.textContent.toLowerCase().trim(); + Zotero.debug('type:', type); + switch (type) { + case "software": + return "computerProgram"; + case "video/audio": + return "videoRecording";//or audioRecording? + case "figure": + case "drawing": + case "photo": + case "diagram": + case "plot": + return "artwork"; + case "presentation": + case "conference paper": + case "poster": + case "lesson": + return "presentation"; + case "book": + return "book"; + case "book section": + return "bookSection"; + case "patent": + return "patent"; + case "report": + case "working paper": + case "project deliverables": + return "report"; + case "preprint": + return "preprint"; + case "thesis": + return "thesis"; + case "dataset": + case "veri seti": + //change when dataset as itemtype is available + return "dataset"; + case "journal article": + return "journalArticle"; + } + } + // Fall-back case + return "journalArticle"; + } + else if (getSearchResults(doc, true)) { + return "multiple"; + } + return false; +} + +function getSearchResults(doc, checkOnly) { + var items = {}; + var found = false; + let rows; + if (invenioPreRdmRepositories.includes(doc.location.hostname)) { + rows = ZU.xpath(doc, '//invenio-search-results//h4/a'); + } + else { + // this section is not rendered in the 6.0 Scaffold browser, OK in v7 + rows = doc.querySelectorAll('h2>a[href*="/records/"]'); + } + //Zotero.debug(rows); + for (let row of rows) { + let href = row.href; + var title = ZU.trimInternal(row.textContent); + if (!href || !title) continue; + if (checkOnly) return true; + found = true; + items[href] = title; + } + return found ? items : false; +} + +async function doWeb(doc, url) { + if (detectWeb(doc, url) == "multiple") { + Zotero.selectItems(getSearchResults(doc, false), function (items) { + if (!items) { + return; + } + let articles = []; + for (let i in items) { + articles.push(i); + } + ZU.processDocuments(articles, scrape); + }); + } + else { + await scrape(doc, url); + } +} + +async function scrape(doc, url) { + let abstract; + let tags; + let text; + let doi = ZU.xpathText(doc, '//meta[@name="citation_doi"]/@content'); + let pdfURL = ZU.xpathText(doc, '//meta[@name="citation_pdf_url"]/@content'); + let cslURL = url.replace(/#.+/, "").replace(/\?.+/, "").replace(/\/export\/.+/, "") + "/export/csl"; + + if (invenioPreRdmRepositories.includes(doc.location.hostname)) { + Zotero.debug('scraping pre-RDM'); + abstract = ZU.xpathText(doc, '//meta[@name="description"]/@content'); + tags = ZU.xpath(doc, '//meta[@name="citation_keywords"]'); + let textPage = await requestText(cslURL); + let newDoc = new DOMParser().parseFromString(textPage, "text/html"); + text = ZU.xpathText(newDoc, '//h3/following-sibling::pre'); + } + else { + tags = Array.from(doc.querySelectorAll('a.subject')).map(el => el.textContent.trim()); + text = await requestText(cslURL); + } + + // use CSL JSON translator + text = text.replace(/publisher_place/, "publisher-place"); + text = text.replace(/container_title/, "container-title"); + + var trans = Zotero.loadTranslator('import'); + trans.setTranslator('bc03b4fe-436d-4a1f-ba59-de4d2d7a63f7'); // CSL JSON + trans.setString(text); + trans.setHandler("itemDone", function (obj, item) { + item.itemType = detectWeb(doc, url); + // The "note" field of CSL maps to Extra. Put it in a note instead + if (item.extra) { + item.notes.push({ note: item.extra }); + item.extra = ""; + } + if (!ZU.fieldIsValidForType('DOI', item.itemType) && doi) { + item.extra = "DOI: " + doi; + } + + //get PDF attachment, otherwise just snapshot. + if (pdfURL) { + item.attachments.push({ url: pdfURL, title: "Full Text PDF", mimeType: "application/pdf" }); + } + else { + item.attachments.push({ url: url, title: "Snapshot", mimeType: "text/html" }); + } + if (invenioPreRdmRepositories.includes(doc.location.hostname)) { + for (let tag of tags) { + item.tags.push(tag.content); + } + } + else { + for (let tag of tags) { + item.tags.push(tag); + } + } + + //something is odd with zenodo's author parsing to CSL on some pages; fix it + //e.g. https://zenodo.org/record/569323 + for (let i = 0; i < item.creators.length; i++) { + let creator = item.creators[i]; + if (!creator.firstName || !creator.firstName.length) { + if (creator.lastName.includes(",")) { + creator.firstName = creator.lastName.replace(/.+?,\s*/, ""); + creator.lastName = creator.lastName.replace(/,.+/, ""); + } + else { + item.creators[i] = ZU.cleanAuthor(creator.lastName, + creator.creatorType, false); + } + } + delete item.creators[i].creatorTypeID; + } + + //Don't use Zenodo as university for theses -- but use as archive + if (item.itemType == "thesis" && item.publisher == "Zenodo") { + item.publisher = ""; + item.archive = "Zenodo"; + } + // or as institution for reports + else if (item.itemType == "report" && item.institution == "Zenodo") { + item.institution = ""; + } + + if (item.date) item.date = ZU.strToISO(item.date); + if (url.includes('#')) { + url = url.substring(0, url.indexOf('#')); + } + item.url = url; + if (abstract) item.abstractNote = abstract; + + if (doc.location.hostname == "zenodo.org") { + item.libraryCatalog = "Zenodo"; + } + + item.itemID = ""; + item.complete(); + }); + trans.translate(); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://zenodo.org/records/54766#.ZEAfIMQpAUE", + "items": [ + { + "itemType": "thesis", + "title": "Measurement and Analysis of Strains Developed on Tie-rods of a Steering System", + "creators": [ + { + "lastName": "Asenov", + "firstName": "Stefan", + "creatorType": "author" + } + ], + "date": "2016-06-03", + "abstractNote": "Modern day manufacturers research and develop vehicles that are equipped\nwith steering assist to help drivers undertake manoeuvres. However the lack of\nresearch for a situation where one tie-rod experiences different strains than the\nopposite one leads to failure in the tie-rod assembly and misalignment in the wheels over time. The performance of the steering system would be improved if this information existed. This bachelor’s dissertation looks into this specific situation and conducts an examination on the tie-rods.\nA simple kinematic model is used to determine how the steering system moves\nwhen there is a steering input. An investigation has been conducted to determine how the system’s geometry affects the strains.\nThe experiment vehicle is a Formula Student car which is designed by the\nstudents of Coventry University. The tests performed show the difference in situations where the two front tyres are on a single surface, two different surfaces – one with high friction, the other with low friction and a situation where there’s an obstacle in the way of one of the tyres.\nThe experiment results show a major difference in strain in the front tie-rods in\nthe different situations. Interesting conclusions can be made due to the results for the different surface situation where one of the tyres receives similar results in bothcompression and tension, but the other one receives results with great difference.\nThis results given in the report can be a starting ground and help with the\nimprovement in steering systems if more research is conducted.", + "archive": "Zenodo", + "extra": "DOI: 10.5281/zenodo.54766", + "libraryCatalog": "Zenodo", + "url": "https://zenodo.org/records/54766", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "strain steering system" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://zenodo.org/records/54747", + "items": [ + { + "itemType": "presentation", + "title": "An introduction to data visualizations for open access advocacy", + "creators": [ + { + "lastName": "Guy", + "firstName": "Marieke", + "creatorType": "presenter" + } + ], + "date": "2015-09-17", + "abstractNote": "Guides you through important steps in developing relevant visualizations by showcasing the work of PASTEUR4OA to develop visualizations from ROARMAP.", + "extra": "DOI: 10.5281/zenodo.54747", + "url": "https://zenodo.org/records/54747", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "Data visualisation" + }, + { + "tag": "Open Access" + }, + { + "tag": "Open Access policy" + }, + { + "tag": "PASTEUR4OA" + }, + { + "tag": "ROARMAP" + } + ], + "notes": [ + { + "note": "Funding by European Commission ROR 00k4n6c32." + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://zenodo.org/records/14837", + "items": [ + { + "itemType": "artwork", + "title": "Figures 8-11 in A new Savignia from Cretan caves (Araneae: Linyphiidae)", + "creators": [ + { + "lastName": "Bosselaers", + "firstName": "Jan", + "creatorType": "author" + }, + { + "lastName": "Henderickx", + "firstName": "Hans", + "creatorType": "author" + } + ], + "date": "2002-11-26", + "abstractNote": "FIGURES 8-11. Savignia naniplopi sp. nov., female paratype. 8, epigyne, ventral view; 9, epigyne, posterior view; 10, epigyne, lateral view; 11, cleared vulva, ventral view. Scale bar: 8-10, 0.30 mm; 11, 0.13 mm.", + "extra": "DOI: 10.5281/zenodo.14837", + "libraryCatalog": "Zenodo", + "shortTitle": "Figures 8-11 in A new Savignia from Cretan caves (Araneae", + "url": "https://zenodo.org/records/14837", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "Arachnida" + }, + { + "tag": "Araneae" + }, + { + "tag": "Crete" + }, + { + "tag": "Greece" + }, + { + "tag": "Linyphiidae" + }, + { + "tag": "Savignia" + }, + { + "tag": "cave" + }, + { + "tag": "new species" + }, + { + "tag": "troglobiont" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://zenodo.org/records/11879", + "items": [ + { + "itemType": "book", + "title": "Sequence Comparison in Historical Linguistics", + "creators": [ + { + "lastName": "List", + "firstName": "Johann-Mattis", + "creatorType": "author" + } + ], + "date": "2014-09-04", + "ISBN": "9783943460728", + "abstractNote": "The comparison of sound sequences (words, morphemes) constitutes the core of many techniques and methods in historical linguistics. With the help of these techniques, corresponding sounds can be determined, historically related words can be identified, and the history of languages can be uncovered. So far, the application of traditional techniques for sequence comparison is very tedious and time-consuming, since scholars have to apply them manually, without computational support. In this study, algorithms from bioinformatics are used to develop computational methods for sequence comparison in historical linguistics. The new methods automatize several steps of the traditional comparative method and can thus help to ease the painstaking work of language comparison.", + "extra": "DOI: 10.5281/zenodo.11879", + "libraryCatalog": "Zenodo", + "place": "Düsseldorf", + "publisher": "Düsseldorf University Press", + "url": "https://zenodo.org/records/11879", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "computational linguistics" + }, + { + "tag": "historical linguistics" + }, + { + "tag": "phonetic alignment" + }, + { + "tag": "sequence comparison" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://zenodo.org/records/45756#.ZEAe1sQpAUE", + "items": [ + { + "itemType": "dataset", + "title": "X-ray diffraction images for DPF3 tandem PHD fingers co-crystallized with an acetylated histone-derived peptide", + "creators": [ + { + "lastName": "Tempel", + "firstName": "Wolfram", + "creatorType": "author" + }, + { + "lastName": "Liu", + "firstName": "Yanli", + "creatorType": "author" + }, + { + "lastName": "Qin", + "firstName": "Su", + "creatorType": "author" + }, + { + "lastName": "Zhao", + "firstName": "Anthony", + "creatorType": "author" + }, + { + "lastName": "Loppnau", + "firstName": "Peter", + "creatorType": "author" + }, + { + "lastName": "Min", + "firstName": "Jinrong", + "creatorType": "author" + } + ], + "date": "2016-02-10", + "DOI": "10.5281/zenodo.45756", + "abstractNote": "This submission includes a tar archive of bzipped diffraction images recorded with the ADSC Q315r detector at the Advanced Photon Source of Argonne National Laboratory, Structural Biology Center beam line 19-ID. Relevant meta data can be found in the headers of those diffraction images.\n\n\nPlease find below the content of an input file XDS.INP for the program XDS (Kabsch, 2010), which may be used for data reduction. The \"NAME_TEMPLATE_OF_DATA_FRAMES=\" item inside XDS.INP may need to be edited to point to the location of the downloaded and untarred images.\n\n\n!!! Paste lines below in to a file named XDS.INP\n\n\nDETECTOR=ADSC  MINIMUM_VALID_PIXEL_VALUE=1  OVERLOAD= 65000\nDIRECTION_OF_DETECTOR_X-AXIS= 1.0 0.0 0.0\nDIRECTION_OF_DETECTOR_Y-AXIS= 0.0 1.0 0.0\nTRUSTED_REGION=0.0 1.05\nMAXIMUM_NUMBER_OF_JOBS=10\nORGX=   1582.82  ORGY=   1485.54\nDETECTOR_DISTANCE= 150\nROTATION_AXIS= -1.0 0.0 0.0\nOSCILLATION_RANGE=1\nX-RAY_WAVELENGTH= 1.2821511\nINCIDENT_BEAM_DIRECTION=0.0 0.0 1.0\nFRACTION_OF_POLARIZATION=0.90\nPOLARIZATION_PLANE_NORMAL= 0.0 1.0 0.0\nSPACE_GROUP_NUMBER=20\nUNIT_CELL_CONSTANTS= 100.030   121.697    56.554    90.000    90.000    90.000\nDATA_RANGE=1  180\nBACKGROUND_RANGE=1 6\nSPOT_RANGE=1 3\nSPOT_RANGE=31 33\nMAX_CELL_AXIS_ERROR=0.03\nMAX_CELL_ANGLE_ERROR=2.0\nTEST_RESOLUTION_RANGE=8.0 3.8\nMIN_RFL_Rmeas= 50\nMAX_FAC_Rmeas=2.0\nVALUE_RANGE_FOR_TRUSTED_DETECTOR_PIXELS= 6000 30000\nINCLUDE_RESOLUTION_RANGE=50.0 1.7\nFRIEDEL'S_LAW= FALSE\nSTARTING_ANGLE= -100      STARTING_FRAME=1\nNAME_TEMPLATE_OF_DATA_FRAMES= ../x247398/t1.0???.img\n\n\n!!! End of XDS.INP", + "libraryCatalog": "Zenodo", + "repository": "Zenodo", + "url": "https://zenodo.org/records/45756", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "Structural Genomics Consortium" + }, + { + "tag": "crystallography" + }, + { + "tag": "diffraction" + }, + { + "tag": "protein structure" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://zenodo.org/search?page=1&size=20&q=&type=video", + "defer": true, + "items": "multiple" + }, + { + "type": "web", + "url": "https://zenodo.org/records/569323", + "items": [ + { + "itemType": "journalArticle", + "title": "A few words about methodology", + "creators": [ + { + "lastName": "Schaffer", + "firstName": "Frederic Charles", + "creatorType": "author" + } + ], + "date": "2016-12-31", + "DOI": "10.5281/zenodo.569323", + "abstractNote": "In mulling over how to most productively respond to the reflections offered by Lahra Smith, Gary Goertz, and Patrick Jackson, I tried to place myself in the armchair of a Qualitative & Multi-Method Research reader. What big methodological questions, I asked myself, are raised by their reviews of my book? How might I weigh in, generatively, on those questions?", + "issue": "1/2", + "libraryCatalog": "Zenodo", + "pages": "52-56", + "publicationTitle": "Qualitative & Multi-Method Research", + "url": "https://zenodo.org/records/569323", + "volume": "14", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "qualitative methods" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://zenodo.org/records/1048320", + "items": [ + { + "itemType": "computerProgram", + "title": "ropensci/codemetar: codemetar: Generate CodeMeta Metadata for R Packages", + "creators": [ + { + "firstName": "Carl", + "lastName": "Boettiger", + "creatorType": "programmer" + }, + { + "firstName": "Maëlle", + "lastName": "Salmon", + "creatorType": "programmer" + }, + { + "firstName": "Noam", + "lastName": "Ross", + "creatorType": "programmer" + }, + { + "firstName": "Arfon", + "lastName": "Smith", + "creatorType": "programmer" + }, + { + "firstName": "Anna", + "lastName": "Krystalli", + "creatorType": "programmer" + } + ], + "date": "2017-11-13", + "abstractNote": "an R package for generating and working with codemeta", + "company": "Zenodo", + "extra": "DOI: 10.5281/zenodo.1048320", + "libraryCatalog": "Zenodo", + "shortTitle": "ropensci/codemetar", + "url": "https://zenodo.org/records/1048320", + "versionNumber": "0.1.2", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://zenodo.org/records/8092340", + "items": [ + { + "itemType": "preprint", + "title": "Creating Virtuous Cycles for DNA Barcoding: A Case Study in Science Innovation, Entrepreneurship, and Diplomacy", + "creators": [ + { + "lastName": "Schindel", + "firstName": "David E.", + "creatorType": "author" + }, + { + "lastName": "Page", + "firstName": "Roderic D. M. Page", + "creatorType": "author" + } + ], + "date": "2023-06-28", + "DOI": "10.5281/zenodo.8092340", + "abstractNote": "This essay on the history of the DNA barcoding enterprise attempts to set the stage for the more scholarly contributions that follow. How did the enterprise begin? What were its goals, how did it develop, and to what degree are its goals being realized? We have taken a keen interest in the barcoding movement and its relationship to taxonomy, collections and biodiversity informatics more broadly considered. This essay integrates our two different perspectives on barcoding. DES was the Executive Secretary of the Consortium for the Barcode of Life from 2004 to 2017, with the mission to support the success of DNA barcoding without being directly involved in generating barcode data. RDMP viewed barcoding as an important entry into the landscape of biodiversity data, with many potential linkages to other components of the landscape. We also saw it as a critical step toward the era of international genomic research that was sure to follow. Like the Mercury Program that paved the way for lunar landings by the Apollo Program, we saw DNA barcoding as the proving grounds for the interdisciplinary and international cooperation that would be needed for success of whole-genome research.", + "libraryCatalog": "Zenodo", + "repository": "Zenodo", + "shortTitle": "Creating Virtuous Cycles for DNA Barcoding", + "url": "https://zenodo.org/records/8092340", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "BOLD" + }, + { + "tag": "Barcode of Life Data System" + }, + { + "tag": "CBoL" + }, + { + "tag": "Consortium for the Barcode of Life" + }, + { + "tag": "DNA barcoding" + }, + { + "tag": "dark taxa" + }, + { + "tag": "preprint" + }, + { + "tag": "specimen voucher" + }, + { + "tag": "taxonomy" + }, + { + "tag": "virtuous cycles" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://data.caltech.edu/records/kas2z-0fe41", + "items": [ + { + "itemType": "dataset", + "title": "Principles of Computation by Competitive Protein Dimerization Networks", + "creators": [ + { + "lastName": "Parres-Gold", + "firstName": "Jacob", + "creatorType": "author" + }, + { + "lastName": "Levine", + "firstName": "Matthew", + "creatorType": "author" + }, + { + "lastName": "Emert", + "firstName": "Benjamin", + "creatorType": "author" + }, + { + "lastName": "Stuart", + "firstName": "Andrew M.", + "creatorType": "author" + }, + { + "lastName": "Elowitz", + "firstName": "Michael B.", + "creatorType": "author" + } + ], + "date": "2023-10-20", + "DOI": "10.22002/kas2z-0fe41", + "abstractNote": "Many biological signaling pathways employ proteins that competitively dimerize in diverse combinations. These dimerization networks can perform biochemical computations, in which the concentrations of monomers (inputs) determine the concentrations of dimers (outputs). Despite their prevalence, little is known about the range of input-output computations that dimerization networks can perform (their \"expressivity\") and how it depends on network size and connectivity. Using a systematic computational approach, we demonstrate that even small dimerization networks (3-6 monomers) can perform diverse multi-input computations. Further, dimerization networks are versatile, performing different computations when their protein components are expressed at different levels, such as in different cell types. Remarkably, individual networks with random interaction affinities, when large enough (≥8 proteins), can perform nearly all (~90%) potential one-input network computations merely by tuning their monomer expression levels. Thus, even the simple process of competitive dimerization provides a powerful architecture for multi-input, cell-type-specific signal processing.", + "language": "eng", + "libraryCatalog": "InvenioRDM", + "repository": "CaltechDATA", + "url": "https://data.caltech.edu/records/kas2z-0fe41", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://repository.tugraz.at/records/7cqqh-nma57", + "items": [ + { + "itemType": "videoRecording", + "title": "Rohdaten zum Lernvideo: Herstellung von Textilbeton", + "creators": [ + { + "lastName": "Harden", + "firstName": "Jakob", + "creatorType": "director" + } + ], + "date": "2023-11-28", + "abstractNote": "Dieser Datensatz beinhaltet die Rohdaten, die für die Produktion des Lernvideos verwendet wurden. Diese bestehen aus den Videoaufzeichnungen, den Präsentationsfolien und der H5P-Datei. Rohdaten und Lernvideo wurden für Lehrzwecke für die VU Konstruktionswerkstoffe [206.455] erstellt. Im Video wird die Herstellung von Probekörpern (Würfel, Balken) aus Textilbeton gezeigt.", + "extra": "DOI: 10.3217/7cqqh-nma57", + "language": "deu", + "libraryCatalog": "InvenioRDM", + "shortTitle": "Rohdaten zum Lernvideo", + "studio": "Graz University of Technology", + "url": "https://repository.tugraz.at/records/7cqqh-nma57", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://researchdata.tuwien.at/records/k1ce7-hrt53", + "items": [ + { + "itemType": "dataset", + "title": "RAAV - Results of the PT-STA accessibility analysis", + "creators": [ + { + "lastName": "Gidam", + "firstName": "Michael", + "creatorType": "author" + }, + { + "lastName": "Dianin", + "firstName": "Alberto", + "creatorType": "author" + }, + { + "lastName": "Hauger", + "firstName": "Georg", + "creatorType": "author" + }, + { + "lastName": "Ravazzoli", + "firstName": "Elisa", + "creatorType": "author" + } + ], + "date": "2023-11-22", + "DOI": "10.48436/k1ce7-hrt53", + "abstractNote": "Dataset description\nAs part of the project \"RAAV - Rural Accessibility and Automated Vehicles\" between the TU Vienna (Austria) and the EURAC institute (Bolzano, Italy), this file serves to summarise the results of a test of the PT-STA method in a comprehensible manner and to make them publicly available.\nContext and methodology\nAn adaption of a classical STA accessibility analysis was formulated and the new method tested on a sample of over 100 individuals in Mühlwald, South Tyrol and over 100 individuals in Sooß, Lower Austria. The test is based on travel diaries, which have been attained in cooperation with and by interviewing said individuals.\nTo be as transparent as possible the data is provided in the Microsoft Excel format with all cell references. By doing this, we ensure that the data can also be used and adapted for other research. The travel diaries on which this research is based on can be accessed here: https://researchdata.tuwien.ac.at/records/hq7b7-xsa12\nTechnical details\nThe dataset contains one Microsoft Excel file containing multiple data sheets. All data from both regions, Mühlwald and Sooß were cumulated. In order to ensure data protection and anonymisation all names, addresses and coordinates of interviewed people, origins and destinations have been deleted from the dataset.\nOther than Microsoft Excel, there is no additional software needed to investigate the data. The first datasheet gives an overview of abbreviations and data stored in each data sheet.", + "libraryCatalog": "InvenioRDM", + "repository": "TU Wien", + "url": "https://researchdata.tuwien.at/records/k1ce7-hrt53", + "versionNumber": "1.0.0", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://ultraviolet.library.nyu.edu/records/vje3m-6z249", + "items": [ + { + "itemType": "dataset", + "title": "Occupy Wall Street Archives Working Group Records FTIR dataset (TAM.630, Box 39, Conservation ID 21_098)", + "creators": [ + { + "lastName": "Jenks", + "firstName": "Josephine", + "creatorType": "author" + }, + { + "lastName": "Stephens", + "firstName": "Catherine", + "creatorType": "author" + }, + { + "lastName": "Pace", + "firstName": "Jessica", + "creatorType": "author" + } + ], + "date": "2023-08-30", + "DOI": "10.58153/vje3m-6z249", + "abstractNote": "This is a technical analysis dataset for cultural heritage materials that are in the collection of New York University Libraries and were examined by the NYU Barbara Goldsmith Preservation & Conservation Department. The materials were examined on June 28, 2021 and are part of the Occupy Wall Street Archives Working Group Records held by the NYU Special Collections (TAM.630, Box 39). The dataset includes a conservation report, FTIR (Fourier Transform Infrared) spectra and, if applicable, a standard visible light image of the object. For more information about this object or its FTIR spectra, please contact the Barbara Goldsmith Preservation & Conservation Department at lib-preservation@nyu.edu", + "language": "eng", + "libraryCatalog": "InvenioRDM", + "repository": "New York University", + "url": "https://ultraviolet.library.nyu.edu/records/vje3m-6z249", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "Spectroscopy, Fourier Transform Infrared" + }, + { + "tag": "conservation science (cultural heritage discipline)" + }, + { + "tag": "preservation (function)" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://adc.ei-basel.hasdai.org/records/4yqf2-z8t98", + "items": [ + { + "itemType": "book", + "title": "THE CHRONICLE & DIRECTORY", + "creators": [ + { + "lastName": "Yorick Jones", + "firstName": "Murrow", + "creatorType": "author" + } + ], + "date": "1874", + "abstractNote": "1874 edition", + "language": "eng", + "libraryCatalog": "InvenioRDM", + "publisher": "Hong Kong Daily Press", + "url": "https://adc.ei-basel.hasdai.org/records/4yqf2-z8t98", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://fdat.uni-tuebingen.de/records/m3y4j-62y93", + "items": [ + { + "itemType": "dataset", + "title": "Dissertation Rohmann: Experimentelle Daten", + "creators": [ + { + "lastName": "Rohmann", + "firstName": "Florian", + "creatorType": "author" + } + ], + "date": "2018-01-19", + "DOI": "10.57754/FDAT.m3y4j-62y93", + "abstractNote": "Eine typische Verhaltensweise beim Fällen numerischer Urteile ist die Ausrichtung an Vergleichswerten. Inwieweit dabei deren Quellen berücksichtigt werden, insbesondere soziale Charakteristika, war Ausgangspunkt von vier Experimenten. Experiment 1 liefert einen Beleg für die Relevanz der Quelle insofern, als die Anpassungen an die Anker stärker im Fall einer glaubwürdigenn(vs. unglaubwürdigen) Quelle ausfielen. Anhand von Experiment 2 und 3 wurde geprüft, ob sich die Ankerquelle auch auf die Richtung des Effekts auswirken, also nicht nur unterschiedlich starke Assimilation, sondern ebenso Kontrast nach sich ziehen kann. Um dies zu testen, wurde auf Quellen zurückgegriffen, die als voreingenommen gelten konnten, wobei der jeweils gesetzte Anker diese Erwartung entweder bestätigte oder verletzte.  Dabei wurde der Eindruck über die Voreingenommenheit zunächst durch Salientmachung von Quellen-Merkmalen (Experiment 2) und später indirekt durch die Erzeugung einer epistemisch ambigen Urteilskonstellation (Experiment 3) verstärkt. Während ein Effekt der Quelle in Experiment 2 ausblieb, wurde in Experiment 3 das vorhergesagte Muster gezeigt: Waren Quellen-Hinweisreiz und Anker    inkongruent (Verletzung der Erwartung), kam es zu einer Assimilation, im Fall von Kongruenz (Bestätigung) hingegen zu Kontrast. Schließlich offenbarte Experiment 4, dass die in Experiment 3 gefundenen Effekte nicht durch eine Warnung vor dem Anker neutralisiert werden konnten.", + "libraryCatalog": "InvenioRDM", + "repository": "University of Tübingen", + "shortTitle": "Dissertation Rohmann", + "url": "https://fdat.uni-tuebingen.de/records/m3y4j-62y93", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "linguistics" + } + ], + "notes": [ + { + "note": "Funding by German Research Foundation (DFG) ROR 018mejw64." + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.fdr.uni-hamburg.de/record/13706", + "items": [ + { + "itemType": "dataset", + "title": "Temporal Model BERT-Large_TempEval-3", + "creators": [ + { + "firstName": "Kirsanov", + "lastName": "Simon", + "creatorType": "author" + } + ], + "date": "2023-11-01", + "DOI": "10.25592/uhhfdm.13706", + "abstractNote": "Temporal Model \"BERT-Large\" finetuned on the \"TempEval-3\" dataset to solve the tasks of extraction and classification of temporal entities. Model produced in the master's thesis \"Extraction and Classification of Time in Unstructured Data [Kirsanov, 2023]\".", + "language": "eng", + "libraryCatalog": "InvenioRDM", + "url": "https://www.fdr.uni-hamburg.de/record/13706", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "aquaint" + }, + { + "tag": "bert" + }, + { + "tag": "information extraction" + }, + { + "tag": "named entity recognition" + }, + { + "tag": "natural language processing" + }, + { + "tag": "ner" + }, + { + "tag": "nlp" + }, + { + "tag": "tempeval" + }, + { + "tag": "temporal extraction" + }, + { + "tag": "temporal tagging" + }, + { + "tag": "timebank" + }, + { + "tag": "timex3" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://rodare.hzdr.de/record/2582", + "items": [ + { + "itemType": "dataset", + "title": "Data publication: SAPPHIRE - Establishment of small animal proton and photon image-guided radiation experiments", + "creators": [ + { + "lastName": "Schneider", + "firstName": "Moritz", + "creatorType": "author" + }, + { + "lastName": "Schilz", + "firstName": "Joshua", + "creatorType": "author" + }, + { + "lastName": "Schürer", + "firstName": "Michael", + "creatorType": "author" + }, + { + "lastName": "Gantz", + "firstName": "Sebastian", + "creatorType": "author" + }, + { + "lastName": "Dreyer", + "firstName": "Anne", + "creatorType": "author" + }, + { + "lastName": "Rothe", + "firstName": "Gerd", + "creatorType": "author" + }, + { + "lastName": "Tillner", + "firstName": "Falk", + "creatorType": "author" + }, + { + "lastName": "Bodenstein", + "firstName": "Elisabeth", + "creatorType": "author" + }, + { + "lastName": "Horst", + "firstName": "Felix", + "creatorType": "author" + }, + { + "lastName": "Beyreuther", + "firstName": "Elke", + "creatorType": "author" + } + ], + "date": "2023-11-28", + "DOI": "10.14278/rodare.2582", + "abstractNote": "This repository contains the data shown in the results part of the paper entitled: SAPPHIRE - Establishment of small animal proton and photon image-guided radiation experiments.", + "language": "eng", + "libraryCatalog": "InvenioRDM", + "repository": "Rodare", + "shortTitle": "Data publication", + "url": "https://rodare.hzdr.de/record/2582", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.openaccessrepository.it/record/143495", + "items": [ + { + "itemType": "presentation", + "title": "Touch Option Model", + "creators": [ + { + "firstName": "Tim", + "lastName": "Xiao", + "creatorType": "presenter" + } + ], + "date": "2023-12-03", + "abstractNote": "The valuation model of a touch option attempt to price Exotics with volatility smile surface. The idea behind Skew Touch is to build a hedging portfolio made of smile contracts (Call/Put or Risk Reversal /Butterfly) which, under volatility flatness assumption (ATM), matches Black-Scholes Vega and its derivatives with respect to FX spot and volatility, Vanna and Volga, of the target Touch Option.", + "extra": "DOI: 10.15161/oar.it/143495", + "language": "eng", + "url": "https://www.openaccessrepository.it/record/143495", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "touch option, barrier option, option valuation model" + } + ], + "notes": [ + { + "note": "https://www.kaggle.com/datasets/davidlee118856/convertible-bond-empirical-study/data" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://eic-zenodo.sdcc.bnl.gov/record/64", + "items": [ + { + "itemType": "presentation", + "title": "Software documentation and the EICUG website maintenance", + "creators": [ + { + "lastName": "Potekhin", + "firstName": "Maxim", + "creatorType": "presenter" + } + ], + "date": "2020-11-12", + "abstractNote": "Presentation for the BNL EIC Group on November 12th, 2020. Status of the EICUG software documentation and the Drupal site maintenance.", + "extra": "DOI: 10.5072/zenodo.64", + "language": "eng", + "url": "https://eic-zenodo.sdcc.bnl.gov/record/64", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "collaborative tools" + }, + { + "tag": "software" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://aperta.ulakbim.gov.tr/record/252039", + "detectedItemType": "dataset", + "items": [ + { + "itemType": "dataset", + "title": "Statik ve Dinamik Mekânsal Panel Veri Modellerinde Sabit Varyanslılığın Testi", + "creators": [ + { + "lastName": "GÜLOĞLU", + "firstName": " BÜLENT", + "creatorType": "author" + }, + { + "lastName": "DOĞAN", + "firstName": " OSMAN", + "creatorType": "author" + }, + { + "lastName": "TAŞPINAR", + "firstName": "SÜLEYMAN", + "creatorType": "author" + } + ], + "date": "2022-10-30", + "DOI": "10.48623/aperta.252038", + "abstractNote": "Bu çalışmada gözlenemeyen sabit bireysel ve zaman etkilerinin bulunduğu mekânsal panel veri modelinde sabit varyanslılığı sınamak amacıyla düzeltilmiş skor fonksiyonlarına dayalı test istatistikleri geliştirilmektedir. Maksimum olabilirlik benzeri yaklaşımı çerçevesinde, skor fonksiyonlarının asimtotik varyanslarını tahmin etmek için martingal farkın dış çarpımı yöntemi kullanılmaktadır. Daha sonra bu varyans tahminleri ve düzeltilmiş skor fonksiyonları kullanılarak, sabit varyanslılığı test etmek için hesaplanması kolay ve güçlü test istatistikleri türetilmektedir. Önerilen test istatistikleri aşağıdaki özelliklere sahip olacaklardır: ·        Geliştirilen testler mekânsal panel modellerindeki hata terimlerinin normal dağılmamasına karşı güçlüdürüler. ·        Önerilen testler yerel parametrik model kurma hatasına güçlü olacak biçimde türetilmişlerdir. ·        Testlerin hesaplanması görece basit olup zaman alıcı sayısal optimizasyon gibi ileri düzey tekniklerin kullanılmasını gerektirmemektedir. Testler sabit bireysel ve zaman etkilerinin olduğu iki yönlü panel veri modelinden grup-içi tahminci kullanılarak elde edilebilmektedir.   Dolayısıyla statik mekânsal panel veri modeli çerçevesinde, önerilen test istatistiği bağımlı değişkendeki ve/veya hata teriminde mekânsal bağımlılığın varlığını gerektirmemektedir. Benzer biçimde dinamik panel veri modeli çerçevesinde geliştirilen test istatistiği i) bağımlı değişkenin mekânsal bağımlılığıyla, ii) bağımlı değişkenin zaman gecikmesiyle, iii) bağımlı değişkenin mekânsal-zaman gecikmesiyle, iv) hata teriminin mekânsal gecikmesiyle ilgili parametrelerin tahminini gerektirmemektedir. Proje çerçevesinde Monte Carlo Simülasyonları yardımıyla test istatistiklerinin sonlu (küçük) örneklem boyut ve güç analizleri yapılmıştır. Ayrıca, yatay kesit ve zaman boyut uzunluğunun, normallik varsayımının ihalalinin, mekânsal ağırlık matrislerinin yapısının, anakitle parametre değerlerindeki değişikliklerin test istaistiklerinin performansları üzerine etkileri de incelenmiştir. Gerçek veriler kullanılarak üç tane ampirik uygulama yapılarak test istatistiklerinin kullanılımı gösterilmiştir. Nihayet MATLAB kodu yazılarak test istatistiklerinin kolay biçimde hesaplanması sağlanmıştır.", + "libraryCatalog": "InvenioRDM", + "url": "https://aperta.ulakbim.gov.tr/record/252039", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "Değişen varyans" + }, + { + "tag": "LM testleri" + }, + { + "tag": "Mekânsal Panel Veri Modelleri" + }, + { + "tag": "Mekânsal bağımlılık" + }, + { + "tag": "Yerel parametrik model kurma hatası" + }, + { + "tag": "İstatistiksel Çıkarım" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://zenodo.org/communities/oat23/records?q=&l=list&p=1&s=10&sort=newest", + "defer": true, + "items": "multiple" + } +] +/** END TEST CASES **/ diff --git a/Zenodo.js b/Zenodo.js deleted file mode 100644 index e6864cfeea8..00000000000 --- a/Zenodo.js +++ /dev/null @@ -1,661 +0,0 @@ -{ - "translatorID": "a714cb93-6595-482f-b371-a4ca0be14449", - "label": "Zenodo", - "creator": "Philipp Zumstein, Sebastian Karcher and contributors", - "target": "^https?://zenodo\\.org", - "minVersion": "6.0", - "maxVersion": "", - "priority": 100, - "inRepository": true, - "translatorType": 4, - "browserSupport": "gcsibv", - "lastUpdated": "2024-02-26 08:39:41" -} - -/* - ***** BEGIN LICENSE BLOCK ***** - - Copyright © 2016-2023 Philipp Zumstein, Sebastian Karcher and contributors - - 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 ***** -*/ - -const datasetType = ZU.fieldIsValidForType('title', 'dataset') - ? 'dataset' - : 'document'; - -function detectWeb(doc, url) { - if (url.includes('/records/')) { - var collections = doc.querySelectorAll('span[aria-label="Resource type"]'); - for (var i = 0; i < collections.length; i++) { - var type = collections[i].textContent.toLowerCase().trim(); - switch (type) { - case "software": - return "computerProgram"; - case "video/audio": - return "videoRecording";//or audioRecording? - case "figure": - case "drawing": - case "photo": - case "diagram": - case "plot": - return "artwork"; - case "presentation": - case "conference paper": - case "poster": - case "lesson": - return "presentation"; - case "book": - return "book"; - case "book section": - return "bookSection"; - case "patent": - return "patent"; - case "report": - case "working paper": - case "project deliverables": - return "report"; - case "preprint": - return "preprint"; - case "thesis": - return "thesis"; - case "dataset": - //change when dataset as itemtype is available - return datasetType; - case "journal article": - return "journalArticle"; - } - } - return "journalArticle"; - } - else if (getSearchResults(doc, true)) { - return "multiple"; - } - return false; -} - -function getSearchResults(doc, checkOnly) { - var items = {}; - var found = false; - // this section is not rendered in the 6.0 Scaffold browser, OK in v7 - var rows = doc.querySelectorAll('h2>a[href*="/records/"]'); - for (var i = 0; i < rows.length; i++) { - var href = rows[i].href; - var title = ZU.trimInternal(rows[i].textContent); - if (!href || !title) continue; - if (checkOnly) return true; - found = true; - items[href] = title; - } - return found ? items : false; -} - - -async function doWeb(doc, url) { - if (detectWeb(doc, url) == "multiple") { - Zotero.selectItems(getSearchResults(doc, false), function (items) { - if (!items) { - return; - } - var articles = []; - for (var i in items) { - articles.push(i); - } - ZU.processDocuments(articles, scrape); - }); - } - else { - await scrape(doc, url); - } -} - - -async function scrape(doc, url) { - var abstract = ZU.xpathText(doc, '//meta[@name="description"]/@content'); - var doi = ZU.xpathText(doc, '//meta[@name="citation_doi"]/@content'); - var pdfURL = ZU.xpathText(doc, '//meta[@name="citation_pdf_url"]/@content'); - var tags = ZU.xpath(doc, '//meta[@name="citation_keywords"]'); - var cslURL = url.replace(/#.+/, "").replace(/\?.+/, "").replace(/\/export\/.+/, "") + "/export/csl"; - // use CSL JSON translator - var text = await requestText(cslURL); - text = text.replace(/publisher_place/, "publisher-place"); - text = text.replace(/container_title/, "container-title"); - - var trans = Zotero.loadTranslator('import'); - trans.setTranslator('bc03b4fe-436d-4a1f-ba59-de4d2d7a63f7'); - trans.setString(text); - trans.setHandler("itemDone", function (obj, item) { - item.itemType = detectWeb(doc, url); - // The "note" field of CSL maps to Extra. Put it in a note instead - if (item.extra) { - item.notes.push({ note: item.extra }); - item.extra = ""; - } - if (!ZU.fieldIsValidForType('DOI', item.itemType) && doi) { - item.extra = "DOI: " + doi; - } - - // workaround for pre 6.0.24 versions that don't have proper item type for data - // if (schemaType && schemaType.includes("Dataset")) { - if (datasetType != "dataset" && ZU.xpathText(doc, '//span[@class="pull-right"]/span[contains(@class, "label-default") and contains(., "Dataset")]')) { - if (item.extra) { - item.extra += "\nType: dataset"; - } - else { - item.extra = "Type: dataset"; - } - } - - //get PDF attachment, otherwise just snapshot. - if (pdfURL) { - item.attachments.push({ url: pdfURL, title: "Zenodo Full Text PDF", mimeType: "application/pdf" }); - } - else { - item.attachments.push({ url: url, title: "Zenodo Snapshot", mimeType: "text/html" }); - } - for (let i = 0; i < tags.length; i++) { - item.tags.push(tags[i].content); - } - - //something is odd with zenodo's author parsing to CSL on some pages; fix it - //e.g. https://zenodo.org/record/569323 - for (let i = 0; i < item.creators.length; i++) { - let creator = item.creators[i]; - if (!creator.firstName || !creator.firstName.length) { - if (creator.lastName.includes(",")) { - creator.firstName = creator.lastName.replace(/.+?,\s*/, ""); - creator.lastName = creator.lastName.replace(/,.+/, ""); - } - else { - item.creators[i] = ZU.cleanAuthor(creator.lastName, - creator.creatorType, false); - } - } - delete item.creators[i].creatorTypeID; - } - - //Don't use Zenodo as university for theses -- but use as archive - if (item.itemType == "thesis" && item.publisher == "Zenodo") { - item.publisher = ""; - item.archive = "Zenodo"; - } - // or as institution for reports - else if (item.itemType == "report" && item.institution == "Zenodo") { - item.institution = ""; - } - - if (item.date) item.date = ZU.strToISO(item.date); - if (url.includes('#')) { - url = url.substring(0, url.indexOf('#')); - } - item.url = url; - if (abstract) item.abstractNote = abstract; - - - item.itemID = ""; - item.complete(); - }); - trans.translate(); -} - -/** BEGIN TEST CASES **/ -var testCases = [ - { - "type": "web", - "url": "https://zenodo.org/records/54766#.ZEAfIMQpAUE", - "items": [ - { - "itemType": "thesis", - "title": "Measurement and Analysis of Strains Developed on Tie-rods of a Steering System", - "creators": [ - { - "lastName": "Asenov", - "firstName": "Stefan", - "creatorType": "author" - } - ], - "date": "2016-06-03", - "abstractNote": "Modern day manufacturers research and develop vehicles that are equipped with steering assist to help drivers undertake manoeuvres. However the lack of research for a situation where one tie-rod experiences different strains than the opposite one leads to failure in the tie-rod assembly and misalignment in the wheels over time. The performance of the steering system would be improved if this information existed. This bachelor’s dissertation looks into this specific situation and conducts an examination on the tie-rods. A simple kinematic model is used to determine how the steering system moves when there is a steering input. An investigation has been conducted to determine how the system’s geometry affects the strains. The experiment vehicle is a Formula Student car which is designed by the students of Coventry University. The tests performed show the difference in situations where the two front tyres are on a single surface, two different surfaces – one with high friction, the other with low friction and a situation where there’s an obstacle in the way of one of the tyres. The experiment results show a major difference in strain in the front tie-rods in the different situations. Interesting conclusions can be made due to the results for the different surface situation where one of the tyres receives similar results in bothcompression and tension, but the other one receives results with great difference. This results given in the report can be a starting ground and help with the improvement in steering systems if more research is conducted.", - "archive": "Zenodo", - "extra": "DOI: 10.5281/zenodo.54766", - "libraryCatalog": "Zenodo", - "url": "https://zenodo.org/records/54766", - "attachments": [ - { - "title": "Zenodo Full Text PDF", - "mimeType": "application/pdf" - } - ], - "tags": [ - { - "tag": "strain steering system" - } - ], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://zenodo.org/records/54747", - "items": [ - { - "itemType": "presentation", - "title": "An introduction to data visualizations for open access advocacy", - "creators": [ - { - "lastName": "Guy", - "firstName": "Marieke", - "creatorType": "presenter" - } - ], - "date": "2015-09-17", - "abstractNote": "Guides you through important steps in developing relevant visualizations by showcasing the work of PASTEUR4OA to develop visualizations from ROARMAP.", - "extra": "DOI: 10.5281/zenodo.54747", - "url": "https://zenodo.org/records/54747", - "attachments": [ - { - "title": "Zenodo Snapshot", - "mimeType": "text/html" - } - ], - "tags": [ - { - "tag": "Data visualisation" - }, - { - "tag": "Open Access" - }, - { - "tag": "Open Access policy" - }, - { - "tag": "PASTEUR4OA" - }, - { - "tag": "ROARMAP" - } - ], - "notes": [ - { - "note": "Funding by European Commission ROR 00k4n6c32." - } - ], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://zenodo.org/records/14837", - "items": [ - { - "itemType": "artwork", - "title": "Figures 8-11 in A new Savignia from Cretan caves (Araneae: Linyphiidae)", - "creators": [ - { - "lastName": "Bosselaers", - "firstName": "Jan", - "creatorType": "author" - }, - { - "lastName": "Henderickx", - "firstName": "Hans", - "creatorType": "author" - } - ], - "date": "2002-11-26", - "abstractNote": "FIGURES 8-11. Savignia naniplopi sp. nov., female paratype. 8, epigyne, ventral view; 9, epigyne, posterior view; 10, epigyne, lateral view; 11, cleared vulva, ventral view. Scale bar: 8-10, 0.30 mm; 11, 0.13 mm.", - "extra": "DOI: 10.5281/zenodo.14837", - "libraryCatalog": "Zenodo", - "shortTitle": "Figures 8-11 in A new Savignia from Cretan caves (Araneae", - "url": "https://zenodo.org/records/14837", - "attachments": [ - { - "title": "Zenodo Snapshot", - "mimeType": "text/html" - } - ], - "tags": [ - { - "tag": "Arachnida" - }, - { - "tag": "Araneae" - }, - { - "tag": "Crete" - }, - { - "tag": "Greece" - }, - { - "tag": "Linyphiidae" - }, - { - "tag": "Savignia" - }, - { - "tag": "cave" - }, - { - "tag": "new species" - }, - { - "tag": "troglobiont" - } - ], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://zenodo.org/records/11879", - "items": [ - { - "itemType": "book", - "title": "Sequence Comparison in Historical Linguistics", - "creators": [ - { - "lastName": "List", - "firstName": "Johann-Mattis", - "creatorType": "author" - } - ], - "date": "2014-09-04", - "ISBN": "9783943460728", - "abstractNote": "The comparison of sound sequences (words, morphemes) constitutes the core of many techniques and methods in historical linguistics. With the help of these techniques, corresponding sounds can be determined, historically related words can be identified, and the history of languages can be uncovered. So far, the application of traditional techniques for sequence comparison is very tedious and time-consuming, since scholars have to apply them manually, without computational support. In this study, algorithms from bioinformatics are used to develop computational methods for sequence comparison in historical linguistics. The new methods automatize several steps of the traditional comparative method and can thus help to ease the painstaking work of language comparison.", - "extra": "DOI: 10.5281/zenodo.11879", - "libraryCatalog": "Zenodo", - "place": "Düsseldorf", - "publisher": "Düsseldorf University Press", - "url": "https://zenodo.org/records/11879", - "attachments": [ - { - "title": "Zenodo Full Text PDF", - "mimeType": "application/pdf" - } - ], - "tags": [ - { - "tag": "computational linguistics" - }, - { - "tag": "historical linguistics" - }, - { - "tag": "phonetic alignment" - }, - { - "tag": "sequence comparison" - } - ], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://zenodo.org/records/45756#.ZEAe1sQpAUE", - "items": [ - { - "itemType": "dataset", - "title": "X-ray diffraction images for DPF3 tandem PHD fingers co-crystallized with an acetylated histone-derived peptide", - "creators": [ - { - "lastName": "Tempel", - "firstName": "Wolfram", - "creatorType": "author" - }, - { - "lastName": "Liu", - "firstName": "Yanli", - "creatorType": "author" - }, - { - "lastName": "Qin", - "firstName": "Su", - "creatorType": "author" - }, - { - "lastName": "Zhao", - "firstName": "Anthony", - "creatorType": "author" - }, - { - "lastName": "Loppnau", - "firstName": "Peter", - "creatorType": "author" - }, - { - "lastName": "Min", - "firstName": "Jinrong", - "creatorType": "author" - } - ], - "date": "2016-02-10", - "DOI": "10.5281/zenodo.45756", - "abstractNote": "This submission includes a tar archive of bzipped diffraction images recorded with the ADSC Q315r detector at the Advanced Photon Source of Argonne National Laboratory, Structural Biology Center beam line 19-ID. Relevant meta data can be found in the headers of those diffraction images. Please find below the content of an input file XDS.INP for the program XDS (Kabsch, 2010), which may be used for data reduction. The \"NAME_TEMPLATE_OF_DATA_FRAMES=\" item inside XDS.INP may need to be edited to point to the location of the downloaded and untarred images. !!! Paste lines below in to a file named XDS.INP DETECTOR=ADSC  MINIMUM_VALID_PIXEL_VALUE=1  OVERLOAD= 65000 DIRECTION_OF_DETECTOR_X-AXIS= 1.0 0.0 0.0 DIRECTION_OF_DETECTOR_Y-AXIS= 0.0 1.0 0.0 TRUSTED_REGION=0.0 1.05 MAXIMUM_NUMBER_OF_JOBS=10 ORGX=   1582.82  ORGY=   1485.54 DETECTOR_DISTANCE= 150 ROTATION_AXIS= -1.0 0.0 0.0 OSCILLATION_RANGE=1 X-RAY_WAVELENGTH= 1.2821511 INCIDENT_BEAM_DIRECTION=0.0 0.0 1.0 FRACTION_OF_POLARIZATION=0.90 POLARIZATION_PLANE_NORMAL= 0.0 1.0 0.0 SPACE_GROUP_NUMBER=20 UNIT_CELL_CONSTANTS= 100.030   121.697    56.554    90.000    90.000    90.000 DATA_RANGE=1  180 BACKGROUND_RANGE=1 6 SPOT_RANGE=1 3 SPOT_RANGE=31 33 MAX_CELL_AXIS_ERROR=0.03 MAX_CELL_ANGLE_ERROR=2.0 TEST_RESOLUTION_RANGE=8.0 3.8 MIN_RFL_Rmeas= 50 MAX_FAC_Rmeas=2.0 VALUE_RANGE_FOR_TRUSTED_DETECTOR_PIXELS= 6000 30000 INCLUDE_RESOLUTION_RANGE=50.0 1.7 FRIEDEL'S_LAW= FALSE STARTING_ANGLE= -100      STARTING_FRAME=1 NAME_TEMPLATE_OF_DATA_FRAMES= ../x247398/t1.0???.img !!! End of XDS.INP", - "libraryCatalog": "Zenodo", - "repository": "Zenodo", - "url": "https://zenodo.org/records/45756", - "attachments": [ - { - "title": "Zenodo Snapshot", - "mimeType": "text/html" - } - ], - "tags": [ - { - "tag": "Structural Genomics Consortium" - }, - { - "tag": "crystallography" - }, - { - "tag": "diffraction" - }, - { - "tag": "protein structure" - } - ], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://zenodo.org/search?page=1&size=20&q=&type=video", - "defer": true, - "items": "multiple" - }, - { - "type": "web", - "url": "https://zenodo.org/records/569323", - "items": [ - { - "itemType": "journalArticle", - "title": "A few words about methodology", - "creators": [ - { - "lastName": "Schaffer", - "firstName": "Frederic Charles", - "creatorType": "author" - } - ], - "date": "2016-12-31", - "DOI": "10.5281/zenodo.569323", - "abstractNote": "In mulling over how to most productively respond to the reflections offered by Lahra Smith, Gary Goertz, and Patrick Jackson, I tried to place myself in the armchair of a Qualitative & Multi-Method Research reader. What big methodological questions, I asked myself, are raised by their reviews of my book? How might I weigh in, generatively, on those questions?", - "issue": "1/2", - "libraryCatalog": "Zenodo", - "pages": "52-56", - "publicationTitle": "Qualitative & Multi-Method Research", - "url": "https://zenodo.org/records/569323", - "volume": "14", - "attachments": [ - { - "title": "Zenodo Full Text PDF", - "mimeType": "application/pdf" - } - ], - "tags": [ - { - "tag": "qualitative methods" - } - ], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://zenodo.org/records/1048320", - "items": [ - { - "itemType": "computerProgram", - "title": "ropensci/codemetar: codemetar: Generate CodeMeta Metadata for R Packages", - "creators": [ - { - "firstName": "Carl", - "lastName": "Boettiger", - "creatorType": "programmer" - }, - { - "firstName": "Maëlle", - "lastName": "Salmon", - "creatorType": "programmer" - }, - { - "firstName": "Noam", - "lastName": "Ross", - "creatorType": "programmer" - }, - { - "firstName": "Arfon", - "lastName": "Smith", - "creatorType": "programmer" - }, - { - "firstName": "Anna", - "lastName": "Krystalli", - "creatorType": "programmer" - } - ], - "date": "2017-11-13", - "abstractNote": "an R package for generating and working with codemeta", - "company": "Zenodo", - "extra": "DOI: 10.5281/zenodo.1048320", - "libraryCatalog": "Zenodo", - "shortTitle": "ropensci/codemetar", - "url": "https://zenodo.org/records/1048320", - "versionNumber": "0.1.2", - "attachments": [ - { - "title": "Zenodo Snapshot", - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://zenodo.org/records/8092340", - "items": [ - { - "itemType": "preprint", - "title": "Creating Virtuous Cycles for DNA Barcoding: A Case Study in Science Innovation, Entrepreneurship, and Diplomacy", - "creators": [ - { - "lastName": "Schindel", - "firstName": "David E.", - "creatorType": "author" - }, - { - "lastName": "Page", - "firstName": "Roderic D. M. Page", - "creatorType": "author" - } - ], - "date": "2023-06-28", - "DOI": "10.5281/zenodo.8092340", - "abstractNote": "This essay on the history of the DNA barcoding enterprise attempts to set the stage for the more scholarly contributions that follow. How did the enterprise begin? What were its goals, how did it develop, and to what degree are its goals being realized? We have taken a keen interest in the barcoding movement and its relationship to taxonomy, collections and biodiversity informatics more broadly considered. This essay integrates our two different perspectives on barcoding. DES was the Executive Secretary of the Consortium for the Barcode of Life from 2004 to 2017, with the mission to support the success of DNA barcoding without being directly involved in generating barcode data. RDMP viewed barcoding as an important entry into the landscape of biodiversity data, with many potential linkages to other components of the landscape. We also saw it as a critical step toward the era of international genomic research that was sure to follow. Like the Mercury Program that paved the way for lunar landings by the Apollo Program, we saw DNA barcoding as the proving grounds for the interdisciplinary and international cooperation that would be needed for success of whole-genome research.", - "libraryCatalog": "Zenodo", - "repository": "Zenodo", - "shortTitle": "Creating Virtuous Cycles for DNA Barcoding", - "url": "https://zenodo.org/records/8092340", - "attachments": [ - { - "title": "Zenodo Full Text PDF", - "mimeType": "application/pdf" - } - ], - "tags": [ - { - "tag": "BOLD" - }, - { - "tag": "Barcode of Life Data System" - }, - { - "tag": "CBoL" - }, - { - "tag": "Consortium for the Barcode of Life" - }, - { - "tag": "DNA barcoding" - }, - { - "tag": "dark taxa" - }, - { - "tag": "preprint" - }, - { - "tag": "specimen voucher" - }, - { - "tag": "taxonomy" - }, - { - "tag": "virtuous cycles" - } - ], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://zenodo.org/communities/oat23/records?q=&l=list&p=1&s=10&sort=newest", - "defer": true, - "items": "multiple" - } -] -/** END TEST CASES **/ From a3591e1ef7cbea4c27ee86667f8bf20c4dddb755 Mon Sep 17 00:00:00 2001 From: Lars Willighagen Date: Mon, 25 Mar 2024 16:09:47 +0100 Subject: [PATCH 044/158] Exclude French plural definite article from citekeys (#3283) --- BibLaTeX.js | 14 +++++++++----- BibTeX.js | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/BibLaTeX.js b/BibLaTeX.js index 805f21d936d..d99ffb035fc 100644 --- a/BibLaTeX.js +++ b/BibLaTeX.js @@ -1,13 +1,11 @@ { "translatorID": "b6e39b57-8942-4d11-8259-342c46ce395f", - "translatorType": 2, "label": "BibLaTeX", "creator": "Simon Kornblith, Richard Karnesky and Anders Johansson", "target": "bib", "minVersion": "2.1.9", - "maxVersion": "null", + "maxVersion": "", "priority": 100, - "inRepository": true, "configOptions": { "getCollections": true }, @@ -17,7 +15,9 @@ "exportFileData": false, "useJournalAbbreviation": false }, - "lastUpdated": "2022-10-12 19:26:00" + "inRepository": true, + "translatorType": 2, + "lastUpdated": "2024-03-25 14:49:42" } /* @@ -371,7 +371,7 @@ var numberRe = /^[0-9]+/; // it includes the indefinite articles of English, German, French and Spanish, as well as a small set of English prepositions whose // force is more grammatical than lexical, i.e. which are likely to strike many as 'insignificant'. // The assumption is that most who want a title word in their key would prefer the first word of significance. -var citeKeyTitleBannedRe = /\b(a|an|the|some|from|on|in|to|of|do|with|der|die|das|ein|eine|einer|eines|einem|einen|un|une|la|le|l'|el|las|los|al|uno|una|unos|unas|de|des|del|d')(\s+|\b)|(<\/?(i|b|sup|sub|sc|span style="small-caps"|span)>)/g; +var citeKeyTitleBannedRe = /\b(a|an|the|some|from|on|in|to|of|do|with|der|die|das|ein|eine|einer|eines|einem|einen|un|une|la|le|l'|les|el|las|los|al|uno|una|unos|unas|de|des|del|d')(\s+|\b)|(<\/?(i|b|sup|sub|sc|span style="small-caps"|span)>)/g; var citeKeyConversionsRe = /%([a-zA-Z])/; var citeKeyConversions = { @@ -882,3 +882,7 @@ function doExport() { Zotero.write("\n"); } +/** BEGIN TEST CASES **/ +var testCases = [ +] +/** END TEST CASES **/ diff --git a/BibTeX.js b/BibTeX.js index a101c8a55a5..9530bee590c 100644 --- a/BibTeX.js +++ b/BibTeX.js @@ -18,7 +18,7 @@ }, "inRepository": true, "translatorType": 3, - "lastUpdated": "2024-03-18 01:19:20" + "lastUpdated": "2024-03-25 14:51:02" } /* @@ -1242,7 +1242,7 @@ var numberRe = /^[0-9]+/; // force is more grammatical than lexical, i.e. which are likely to strike many as 'insignificant'. // The assumption is that most who want a title word in their key would prefer the first word of significance. // Also remove markup -var citeKeyTitleBannedRe = /\b(a|an|the|some|from|on|in|to|of|do|with|der|die|das|ein|eine|einer|eines|einem|einen|un|une|la|le|l\'|el|las|los|al|uno|una|unos|unas|de|des|del|d\')(\s+|\b)|(<\/?(i|b|sup|sub|sc|span style=\"small-caps\"|span)>)/g; +var citeKeyTitleBannedRe = /\b(a|an|the|some|from|on|in|to|of|do|with|der|die|das|ein|eine|einer|eines|einem|einen|un|une|la|le|l\'|les|el|las|los|al|uno|una|unos|unas|de|des|del|d\')(\s+|\b)|(<\/?(i|b|sup|sub|sc|span style=\"small-caps\"|span)>)/g; var citeKeyConversionsRe = /%([a-zA-Z])/; var citeKeyConversions = { From b2c73c96384ae315c4367150ab5c823df353ca9f Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 25 Mar 2024 11:20:08 -0400 Subject: [PATCH 045/158] .eslintrc: Don't add blank line before /** END TEST CASES **/ --- .eslintrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.eslintrc b/.eslintrc index 916ca475da3..300f576547b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -30,6 +30,13 @@ "no-redeclare": ["error", {"builtinGlobals": true}], "linebreak-style": ["error", "unix"], + "lines-around-comment": [ + "error", + { + "ignorePattern": "END TEST CASES" + } + ], + "zotero-translator/not-executable": "error", "zotero-translator/header-valid-json": "error", "zotero-translator/header-translator-id": "error", From e5d3420edfc653700527bfffc76cf1c00c039c1a Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Mon, 25 Mar 2024 11:21:14 -0400 Subject: [PATCH 046/158] Updates to use preprint item type (#3279) --- Europe PMC.js | 45 +++++++++++-------- F1000 Research.js | 64 ++++++++++++++------------- NASA NTRS.js | 44 +++++++++---------- PKP Catalog Systems.js | 18 +++----- Research Square.js | 98 +++++++++++++++++++++--------------------- 5 files changed, 135 insertions(+), 134 deletions(-) diff --git a/Europe PMC.js b/Europe PMC.js index 802611a717c..3417f6adb03 100644 --- a/Europe PMC.js +++ b/Europe PMC.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-06-19 08:52:49" + "lastUpdated": "2024-03-23 01:38:15" } /* @@ -39,7 +39,7 @@ function detectWeb(doc, url) { if (url.includes('/article/')) { if (url.includes('/PPR/')) { - return 'report'; + return 'preprint'; } else { return "journalArticle"; @@ -66,17 +66,18 @@ function getSearchResults(doc, checkOnly) { return found ? items : false; } -function doWeb(doc, url) { - if (detectWeb(doc, url) == "multiple") { - Zotero.selectItems(getSearchResults(doc, false), function (items) { - if (!items) return; - Object.keys(items).forEach(scrape); - }); +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 { let jsonURL = getJSONURL(url); if (jsonURL) { - scrape(jsonURL); + await scrape(jsonURL); } else { Z.debug('Couldn\'t extract ID from URL: ' + url); @@ -84,10 +85,11 @@ function doWeb(doc, url) { } } -function scrape(jsonURL) { - ZU.doGet(jsonURL, function (respText) { - processJSON(JSON.parse(respText)); - }); + +async function scrape(jsonURL) { + // Z.debug(jsonURL); + let respText = await requestJSON(jsonURL); + processJSON(respText); } function getJSONURL(pageURL) { @@ -98,6 +100,7 @@ function getJSONURL(pageURL) { } function processJSON(json) { + // Z.debug(json); if (!json.resultList || !json.resultList.result || !json.resultList.result.length) { Z.debug('Query returned no results'); return; @@ -145,8 +148,7 @@ function processPubTypeList(pubTypeList, item) { if (!pubTypeList || !pubTypeList.pubType) return; if (pubTypeList.pubType.length == 1 && pubTypeList.pubType[0] == 'Preprint') { - item.itemType = 'report'; - item.extra = (item.extra || '') + `Type: article\n`; + item.itemType = 'preprint'; } else { item.itemType = 'journalArticle'; @@ -214,6 +216,7 @@ function processKeywordList(keywordList, item) { } } + /** BEGIN TEST CASES **/ var testCases = [ { @@ -363,7 +366,7 @@ var testCases = [ "url": "https://europepmc.org/article/PPR/PPR358366", "items": [ { - "itemType": "report", + "itemType": "preprint", "title": "Fly ash application in moorum embankment and its stability analysis using FLAC/SLOPE and Response Surface Metho", "creators": [ { @@ -378,11 +381,17 @@ var testCases = [ } ], "date": "2021", + "DOI": "10.21203/rs.3.rs-631949/v1", "abstractNote": "This paper presents the application of fly ash in moorum embankment by partial replacement of moorum with fly ash and its stability analysis has been carried out. An experimental investigation was carried out on moorum blended with fly ash at different proportions of fly ash by dry weight of soil for the moorum embankment stability analysis. The Index properties and strength properties were assessed by performing Atterberg's limit, specific gravity, grain size distribution, compaction test, direct shear test (DST), and California Bearing Ratio (CBR) test respectively. The embankment slope stability analysis was performed using FLAC/SLOPE version 8.10 (Fast Lagrangian Analysis of Continua) software at a various slope angle of 30°, 32°, and 34° and different heights of the embankment of 6 m, 8 m, and 10 m to calculate Factor of Safety (FOS). FOS decreases with the increment of fly ash content, the height of embankment, and slope angle respectively. In addition to the numerical analysis, Response Surface Methodology (RSM) based (Face-Centered Central Composite Design) was used to predict FOS. The developed mathematical equation illustrates that the RSM model was statistically significant and the results give a reliable prediction of FOS.", - "extra": "Type: article", "libraryCatalog": "Europe PMC", + "rights": "cc by", "url": "https://doi.org/10.21203/rs.3.rs-631949/v1", - "attachments": [], + "attachments": [ + { + "title": "Full Text PDF (Open access)", + "mimeType": "application/pdf" + } + ], "tags": [], "notes": [], "seeAlso": [] diff --git a/F1000 Research.js b/F1000 Research.js index 02ff6ac6cc7..88122916262 100644 --- a/F1000 Research.js +++ b/F1000 Research.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-08-16 20:40:08" + "lastUpdated": "2024-03-21 19:05:49" } /* @@ -44,7 +44,7 @@ function detectWeb(doc, url) { if (url.includes('/articles/') && doc.querySelector('meta[name="citation_title"]')) { - return "report"; + return "preprint"; } else if (getSearchResults(doc, true)) { return "multiple"; @@ -85,20 +85,21 @@ function scrape(doc, url) { translator.setDocument(doc); translator.setHandler('itemDone', function (obj, item) { - item.itemType = 'report'; - item.extra = (item.extra || '') + '\nType: article'; // preprint - + item.itemType = 'preprint'; delete item.pages; - delete item.reportType; - - item.reportNumber = `${item.volume}:${item.issue}`; + delete item.genre; + if (item.volume && item.issue) { + item.archiveID = `${item.volume}:${item.issue}`; + } delete item.volume; delete item.issue; delete item.number; - - item.institution = item.publicationTitle; - delete item.publisher; + item.publisher = item.publicationTitle; delete item.publicationTitle; + delete item.distributor; + delete item.company; + delete item.institution; + delete item.label; if (item.date) { item.date = ZU.strToISO(item.date); @@ -110,7 +111,7 @@ function scrape(doc, url) { }); translator.getTranslatorObject(function (trans) { - trans.itemType = "report"; + trans.itemType = "preprint"; trans.doWeb(doc, url); }); } @@ -122,8 +123,8 @@ var testCases = [ "url": "https://f1000research.com/articles/10-614", "items": [ { - "itemType": "report", - "title": "Cerebrospinal fluid neurofilament light levels in CLN2 disease patients treated with enzyme replacement therapy normalise after two years on treatment", + "itemType": "preprint", + "title": "Cerebrospinal fluid neurofilament light chain levels in CLN2 disease patients treated with enzyme replacement therapy normalise after two years on treatment", "creators": [ { "firstName": "Katharina", @@ -186,13 +187,13 @@ var testCases = [ "creatorType": "author" } ], - "date": "2021-07-20", + "date": "2022-01-05", + "DOI": "10.12688/f1000research.54556.2", "abstractNote": "Classic late infantile neuronal ceroid lipofuscinosis (CLN2 disease) is caused by a deficiency of tripeptidyl-peptidase-1. In 2017, the first CLN2 enzyme replacement therapy (ERT) cerliponase alfa (Brineura) was approved by the FDA and EMA. The CLN2 disease clinical rating scale (CLN2 CRS) was developed to monitor loss of motor function, language and vision as well as frequency of generalised tonic clonic seizures. Using CLN2 CRS in an open label clinical trial it was shown that Brineura slowed down the progression of CLN2 symptoms. Neurofilament light chain (NfL) is a protein highly expressed in myelinated axons. An increase of cerebrospinal fluid (CSF) and blood NfL is found in a variety of neuroinflammatory, neurodegenerative, traumatic, and cerebrovascular diseases. We analysed CSF NfL in CLN2 patients treated with Brineura to establish whether it can be used as a possible biomarker of response to therapy. Newly diagnosed patients had CSF samples collected and analysed at first treatment dose and up to 12 weeks post-treatment to look at acute changes. Patients on a compassionate use programme who were already receiving ERT for approximately 1yr had CSF samples collected and NfL analysed over the following 1.3 years (2.3 years post-initiation of ERT) to look at long-term changes. All newly diagnosed patients we investigated with classical late infantile phenotype had high NfL levels >2000 pg/ml at start of treatment. No significant change was observed in NfL up to 12 weeks post-treatment. After one year of ERT, two out of six patients still had high NfL levels, but all patients showed a continued decrease, and all had low NfL levels after two years on ERT. NfL levels appear to correspond and predict improved clinical status of patients on ERT and could be useful as a biomarker to monitor neurodegeneration and verify disease modification in CLN2 patients on ERT.", - "extra": "Type: article", - "institution": "F1000Research", + "archiveID": "10:614", "language": "en", "libraryCatalog": "f1000research.com", - "reportNumber": "10:614", + "repository": "F1000Research", "rights": "http://creativecommons.org/licenses/by/4.0/", "url": "https://f1000research.com/articles/10-614", "attachments": [ @@ -203,7 +204,7 @@ var testCases = [ ], "tags": [ { - "tag": "Enzyme replacment therapy" + "tag": "Enzyme replacement therapy" }, { "tag": "Neurofilament light" @@ -222,7 +223,7 @@ var testCases = [ "url": "https://f1000research.com/articles/10-153", "items": [ { - "itemType": "report", + "itemType": "preprint", "title": "Regional disparities in postnatal care among mothers aged 15-49 years old: An analysis of the Indonesian Demographic and Health Survey 2017", "creators": [ { @@ -252,12 +253,12 @@ var testCases = [ } ], "date": "2021-08-16", + "DOI": "10.12688/f1000research.50938.2", "abstractNote": "Background: In Indonesia, maternal mortality remains high, significantly 61.59% occur in the postnatal period. Postnatal care (PNC) provision is a critical intervention between six hours and 42 days after childbirth and is the primary strategy to reduce maternal mortality rates. However, underutilisation of PNC in Indonesia still remains high, and limited studies have shown the regional disparities of PNC in Indonesia. Methods: This study aims to explore the gaps between regions in PNC service for mothers who have had live births during the last five years in Indonesia. This study was a secondary data analysis study using the Indonesian Demographic and Health Survey (IDHS) in 2017. A total of 13,901 mothers aged 15-49 years having had live births within five years were included. Chi-squared test and binary logistic regression were performed to determine regional disparities in PNC. Results: Results indicated that the prevalence of PNC service utilisation among mothers aged 15-49 years was 70.94%. However, regional gaps in the utilisation of PNC service were indicated. Mothers in the Central of Indonesia have used PNC services 2.54 times compared to mothers in the Eastern of Indonesia (OR = 2.54; 95% CI = 1.77-3.65, p<0.001). Apart from the region, other variables have a positive relationship with PNC service, including wealth quintile, accessibility health facilities, age of children, childbirth order, mother's education, maternal occupation, spouse's age, and spouse's education. Conclusion: The results suggest the need for national policy focuses on service equality, accessible, and reliable implementation to improve postnatal care utilisation among mothers to achieve the maximum results for the Indonesian Universal Health Coverage plan.", - "extra": "Type: article", - "institution": "F1000Research", + "archiveID": "10:153", "language": "en", "libraryCatalog": "f1000research.com", - "reportNumber": "10:153", + "repository": "F1000Research", "rights": "http://creativecommons.org/licenses/by/4.0/", "shortTitle": "Regional disparities in postnatal care among mothers aged 15-49 years old", "url": "https://f1000research.com/articles/10-153", @@ -475,7 +476,7 @@ var testCases = [ "url": "https://hrbopenresearch.org/articles/4-87", "items": [ { - "itemType": "report", + "itemType": "preprint", "title": "Effectiveness of quality improvement strategies for type 1 diabetes in children and adolescents: a systematic review protocol", "creators": [ { @@ -525,12 +526,12 @@ var testCases = [ } ], "date": "2021-08-10", + "DOI": "10.12688/hrbopenres.13223.1", "abstractNote": "Introduction: Optimal glycaemic control is often a challenge in children and adolescents with type 1 diabetes (T1D). Implementation of patient, clinician or organisation-targeted quality improvement (QI) strategies has been proven to be beneficial in terms of improving glycaemic outcomes in adults living with diabetes. This review aims to assess the effectiveness of such QI interventions in improving glycaemic control, care delivery, and screening rates in children and adolescents with T1D. Methods and analysis: MEDLINE, EMBASE, CINAHL and Cochrane CENTRAL databases will be searched for relevant studies up to January 2021. Trial registries, ClinicalTrials.gov and ICTRP, will also be explored for any ongoing trials of relevance. We will include trials which examine QI strategies as defined by a modified version of the Cochrane Effective Practice and Organisation of Care 2015 Taxonomy in children (<18 years) with a diagnosis of T1D. The primary outcome to be assessed is glycated haemoglobin (HbA1c), although a range of secondary outcomes relating to clinical management, adverse events, healthcare engagement, screening rates and psychosocial parameters will also be assessed. Our primary intention is to generate a best-evidence narrative to summarise and synthesise the resulting studies. If a group of studies are deemed to be highly similar, then a meta-analysis using a random effects model will be considered. Cochrane Risk of Bias 1.0 tool will be applied for quality assessment. All screening, data extraction and quality assessment will be performed by two independent researchers. Dissemination: The results of this review will be disseminated through peer-reviewed publication in order to inform invested partners (e.g., Paediatric Endocrinologists) on the potential of QI strategies to improve glycaemic management and other related health outcomes in children with T1D, thereby guiding best practices in the outpatient management of the disorder. PROSPERO registration number: CRD42021233974 (28/02/2021).", - "extra": "Type: article", - "institution": "HRB Open Research", + "archiveID": "4:87", "language": "en", "libraryCatalog": "hrbopenresearch.org", - "reportNumber": "4:87", + "repository": "HRB Open Research", "rights": "http://creativecommons.org/licenses/by/4.0/", "shortTitle": "Effectiveness of quality improvement strategies for type 1 diabetes in children and adolescents", "url": "https://hrbopenresearch.org/articles/4-87", @@ -569,6 +570,7 @@ var testCases = [ }, { "type": "web", + "defer": true, "url": "https://f1000research.com/search?q=test", "items": "multiple" }, @@ -577,7 +579,7 @@ var testCases = [ "url": "https://gatesopenresearch.org/articles/5-122", "items": [ { - "itemType": "report", + "itemType": "preprint", "title": "Young infant clinical signs study­­, Pakistan: a data note", "creators": [ { @@ -612,12 +614,12 @@ var testCases = [ } ], "date": "2021-08-12", + "DOI": "10.12688/gatesopenres.13317.1", "abstractNote": "Neonatal sepsis is the leading cause of child death globally with most of these deaths occurring in the first week of life.  It is of utmost public health importance that clinical signs predictive of severe illness and need for referral are identified early in the course of illness. From 2002-2005, a multi country trial called the Young Infant Clinical Signs Study (YICSS) was conducted in seven sites across three South-Asian (Bangladesh, India, and Pakistan), two African (Ghana, and South Africa), and one South American (Bolivia) country. The study aimed to develop a simplified algorithm to be used by primary healthcare workers for the identification of sick young infants needing prompt referral and treatment. The main study enrolled 8,889 young infants between the ages of 0-59 days old. This dataset contains observations on 2950 young infants aged 0-59 days from the Pakistan site. The data was collected between 2003-2004 with information on the most prevalent signs and symptoms. The data from this study was used to update the Integrated Management of Childhood Illness guidelines. The World Health Organisation (WHO) seven-sign algorithm has been used in other major community-based trials to study possible serious bacterial infection and its treatment regimens.", - "extra": "Type: article", - "institution": "Gates Open Research", + "archiveID": "5:122", "language": "en", "libraryCatalog": "gatesopenresearch.org", - "reportNumber": "5:122", + "repository": "Gates Open Research", "rights": "http://creativecommons.org/licenses/by/4.0/", "shortTitle": "Young infant clinical signs study­­, Pakistan", "url": "https://gatesopenresearch.org/articles/5-122", diff --git a/NASA NTRS.js b/NASA NTRS.js index a3d60011191..766f02ca0c3 100644 --- a/NASA NTRS.js +++ b/NASA NTRS.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-09-01 04:47:52" + "lastUpdated": "2024-03-21 20:00:21" } /* @@ -67,18 +67,16 @@ function getSearchResults(doc, checkOnly) { return found ? items : false; } -function doWeb(doc, url) { - if (detectWeb(doc, url) == "multiple") { - Zotero.selectItems(getSearchResults(doc, false), function (items) { - if (!items) return; - for (let url of Object.keys(items)) { - // don't bother fetching the doc, it's useless - scrape(null, url); - } - }); +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(null, url); + } } else { - scrape(doc, url); + await scrape(doc, url); } } @@ -98,7 +96,8 @@ function mapType(docType) { patent: 'patent', 'computer program': 'computerProgram', 'motion picture|video': 'videoRecording', - 'preprint|manuscript': 'manuscript' + preprint: 'preprint', + manuscript: 'manuscript' }; for (let [regex, itemType] of Object.entries(mapping)) { @@ -216,16 +215,14 @@ function processJSON(json) { return item; } -function scrape(doc, url) { - ZU.doGet(url.replace('/citations', '/api/citations'), function (text) { - let json = JSON.parse(text); - let item = processJSON(json); - item.url = url; - if (doc) { - item.attachments.push({ title: "Snapshot", document: doc }); - } - item.complete(); - }); +async function scrape(doc, url) { + let json = await requestJSON(url.replace('/citations', '/api/citations')); + let item = processJSON(json); + item.url = url; + if (doc) { + item.attachments.push({ title: "Snapshot", document: doc }); + } + item.complete(); } /** BEGIN TEST CASES **/ @@ -550,7 +547,7 @@ var testCases = [ ], "tags": [ { - "tag": "SPACE VEHICLES" + "tag": "Space Vehicles" } ], "notes": [], @@ -609,4 +606,5 @@ var testCases = [ ] } ] + /** END TEST CASES **/ diff --git a/PKP Catalog Systems.js b/PKP Catalog Systems.js index be78c8a1fe2..5b01c02b1a0 100644 --- a/PKP Catalog Systems.js +++ b/PKP Catalog Systems.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-09-24 00:00:56" + "lastUpdated": "2024-03-21 19:10:24" } /* @@ -60,7 +60,7 @@ function detectWeb(doc, url) { return 'book'; } if (generator.startsWith('Open Preprint Systems')) { - return 'report'; + return 'preprint'; } return false; } @@ -68,8 +68,7 @@ function detectWeb(doc, url) { function getSearchResults(doc, checkOnly) { var items = {}; var found = false; - var rows = doc.querySelectorAll('.title a[href*="/view/"], .title a[href*="/catalog/"], \ - .tocTitle a[href*="/view/"], .tocTitle a[href*="/catalog/"]'); + var rows = doc.querySelectorAll('.title a[href*="/view/"], .title a[href*="/catalog/"], .tocTitle a[href*="/view/"], .tocTitle a[href*="/catalog/"]'); for (let row of rows) { let href = row.href; let title = ZU.trimInternal(row.textContent); @@ -107,11 +106,6 @@ function scrape(doc, url) { trans.setDocument(doc); trans.setHandler('itemDone', function (obj, item) { - if (item.itemType == 'report') { - // preprint - item.extra = (item.extra || '') + `\ntype: article\n`; - } - if (!item.title) { item.title = text(doc, '#articleTitle'); } @@ -1381,7 +1375,7 @@ var testCases = [ "url": "https://preprints.scielo.org/index.php/scielo/preprint/view/2577", "items": [ { - "itemType": "report", + "itemType": "preprint", "title": "RETRATO DAS NARRATIVAS DE MAES UNIVERSITARIAS NO CONTEXTO ACADÊMICO", "creators": [ { @@ -1406,11 +1400,11 @@ var testCases = [ } ], "date": "2021-07-05", + "DOI": "10.1590/SciELOPreprints.2577", "abstractNote": "SciELO Preprints Collection is an integral part of SciELO, an international cooperation program aiming at the development of open access scientific communication covering all areas of knowledge. It operates as a collection of non-peer-reviewed manuscripts within the SciELO Network of national and thematic collection of journals.", - "extra": "DOI: 10.1590/SciELOPreprints.2577\ntype: article", - "institution": "SciELO Preprints", "language": "pt", "libraryCatalog": "preprints.scielo.org", + "repository": "SciELO Preprints", "url": "https://preprints.scielo.org/index.php/scielo/preprint/view/2577", "attachments": [ { diff --git a/Research Square.js b/Research Square.js index 3d5fefee050..0a24ff00f11 100644 --- a/Research Square.js +++ b/Research Square.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-07-19 15:56:27" + "lastUpdated": "2024-03-21 19:37:52" } /* @@ -37,8 +37,8 @@ function detectWeb(doc, url) { - if (url.includes('/article/') && doc.querySelector('.page-article')) { - return "report"; + if (url.includes('/article/') && doc.querySelector('[name="citation_title"]')) { + return "preprint"; } else if (getSearchResults(doc, true)) { return "multiple"; @@ -61,65 +61,63 @@ function getSearchResults(doc, checkOnly) { return found ? items : false; } -function doWeb(doc, url) { - if (detectWeb(doc, url) == "multiple") { - Zotero.selectItems(getSearchResults(doc, false), function (items) { - if (items) ZU.processDocuments(Object.keys(items), scrape); - }); +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 { - scrape(doc, url); + await scrape(doc, url); } } -function scrape(doc, url) { +async function scrape(doc, url = doc.location.href) { let bareURL = url.replace(/[?#].*/, ''); let risURL = bareURL .replace('researchsquare.com/article', 'researchsquare.com/api/article') + '.ris'; let pdfURL = bareURL + '.pdf'; - ZU.doGet(risURL, function (text) { - var translator = Zotero.loadTranslator("import"); - translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); - translator.setString(text); - translator.setHandler("itemDone", function (obj, item) { - if (!item.title) { - // ...no title in the RIS sometimes? odd - item.title = attr(doc, 'meta[property="og:title"]', 'content'); - } - - item.itemType = 'report'; - if (!item.extra || !/^type: article/im.test(item.extra)) { - item.extra = (item.extra || '') + '\nType: article'; - } + let text = await requestText(risURL); + var translator = Zotero.loadTranslator("import"); + translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); + translator.setString(text); + translator.setHandler("itemDone", function (obj, item) { + if (!item.title) { + // ...no title in the RIS sometimes? odd + item.title = attr(doc, 'meta[property="og:title"]', 'content'); + } - // research square assigns preprints publication titles based on - // where they've been submitted to, which isn't really right from - // zotero's point of view - delete item.publicationTitle; - delete item.journalAbbreviation; + item.itemType = 'preprint'; - item.attachments.push({ - url: pdfURL, - title: "Full Text PDF", - mimeType: "application/pdf" - }); + // research square assigns preprints publication titles based on + // where they've been submitted to, which isn't really right from + // zotero's point of view + delete item.publicationTitle; + delete item.journalAbbreviation; + item.repository = "Research Square"; + item.attachments.push({ + url: pdfURL, + title: "Full Text PDF", + mimeType: "application/pdf" + }); - for (let creator of item.creators) { - if (creator.fieldMode == 1) { - delete creator.fieldMode; - Object.assign(creator, - ZU.cleanAuthor(creator.lastName, creator.creatorType)); - } + for (let creator of item.creators) { + if (creator.fieldMode == 1) { + delete creator.fieldMode; + Object.assign(creator, + ZU.cleanAuthor(creator.lastName, creator.creatorType)); } + } - item.url = bareURL; + item.url = bareURL; - item.complete(); - }); - translator.translate(); + item.complete(); }); + translator.translate(); } /** BEGIN TEST CASES **/ @@ -129,7 +127,7 @@ var testCases = [ "url": "https://www.researchsquare.com/article/rs-629724/v1", "items": [ { - "itemType": "report", + "itemType": "preprint", "title": "Peptide formation as on the early Earth: from amino acid mixtures to peptides in sulphur dioxide", "creators": [ { @@ -163,9 +161,9 @@ var testCases = [ "firstName": "Christoph" } ], - "date": "July 19, 2021", + "date": "2024-03-21", + "DOI": "10.21203/rs.3.rs-629724/v1", "abstractNote": "The formation of peptide bonds is one of the most important biochemical reaction steps. Without the development of structurally and catalytically active polymers, there would be no life on our planet. Intensive research is being conducted on possible reaction pathways for the formation of complex peptides on the early Earth. Salt-induced peptide formation (SIPF) by metal catalysis is one possible pathway for abiotic peptide synthesis. The high salt concentration supports dehydration in this process. However, the formation of large, complex oligomer systems is prevented by the high thermodynamic barrier of peptide condensation in aqueous solution. Liquid sulphur dioxide proves to be a superior alternative for copper-catalysed peptide condensation. Compared to water, the amino acids are activated in sulphur dioxide, which leads to the incorporation of all 20 proteinogenic amino acids into the resulting proteins and thus to a large variety of products. Strikingly, even extremely low initial reactant concentrations of only 50 mM are sufficient for extensive peptide formation, leading to an overall yield of 2.9% for dialanine in 7 days. The reactions carried out at room temperature and the successful use of the Hadean mineral covellite as a catalyst, suggest a volcanic environment for the formation of the peptide world on early Earth as a likely scenario.", - "extra": "Type: article", "libraryCatalog": "Research Square", "shortTitle": "Peptide formation as on the early Earth", "url": "https://www.researchsquare.com/article/rs-629724/v1", @@ -186,7 +184,7 @@ var testCases = [ "url": "https://www.researchsquare.com/article/rs-624370/v1", "items": [ { - "itemType": "report", + "itemType": "preprint", "title": "A dual mechanism of action of AT-527 against SARS-CoV-2 polymerase", "creators": [ { @@ -305,9 +303,9 @@ var testCases = [ "firstName": "Adrien" } ], - "date": "July 19, 2021", + "date": "2024-03-21", + "DOI": "10.21203/rs.3.rs-624370/v1", "abstractNote": "A worldwide effort is ongoing to discover drugs against the Severe Acute Respiratory Syndrome coronavirus type 2 (SARS-CoV-2), which has so far caused >3.5 million fatalities (https://covid19.who.int/). The virus essential RNA-dependent RNA polymerase complex is targeted by several nucleoside/tide analogues whose mechanisms of action and clinical potential are currently evaluated. The guanosine analogue AT-527, a double prodrug of its 5'-triphosphate AT-9010, is currently in phase III clinical trials as a COVID19 treatment. Here we report the cryo-EM structure at 2.98 Å resolution of the SARS-CoV-2 nsp12-nsp7-(nsp8)2 complex with RNA showing AT-9010 bound at three sites of nsp12. At the RdRp active-site, one AT-9010 is incorporated into the RNA product. Its 2'-methyl group prevents correct alignment of a second AT-9010 occupying the incoming NTP pocket. The 2'-F, 2'-methyl 3'-OH ribose scaffold explains the non-obligate RNA chain-termination potency of this NA series for both HCV NS5 and SARS-CoV RTCs. A third AT-9010 molecule 5'-diphosphate binds to a coronavirus-specific pocket in the nsp12 N-terminus NiRAN domain, a SelO pseudo-kinase structural and functional homologue. This unique binding mode impedes NiRAN-mediated UMPylation of SARS-CoV-2 nsp8 and nsp9 proteins. Our results suggest a mechanism of action for AT-527 in line with a therapeutic use for COVID19.", - "extra": "Type: article", "libraryCatalog": "Research Square", "url": "https://www.researchsquare.com/article/rs-624370/v1", "attachments": [ From 0cd3df5ef769a71a65ce62030bef15e59572d525 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Mon, 25 Mar 2024 11:30:17 -0400 Subject: [PATCH 047/158] Update CrossRef for Preprints et al. (#3278) --- Crossref Unixref XML.js | 61 ++++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/Crossref Unixref XML.js b/Crossref Unixref XML.js index e23cb48b27b..a4cec09276a 100644 --- a/Crossref Unixref XML.js +++ b/Crossref Unixref XML.js @@ -11,7 +11,7 @@ }, "inRepository": true, "translatorType": 1, - "lastUpdated": "2024-02-22 19:17:41" + "lastUpdated": "2024-03-23 02:00:53" } /* @@ -231,7 +231,7 @@ function doImport() { // Reference book entry // Example: doi: 10.1002/14651858.CD002966.pub3 - // Entire edite book. This should _not_ be imported as bookSection + // Entire edited book. This should _not_ be imported as bookSection // Example: doi: 10.4135/9781446200957 var bookType = itemXML[0].hasAttribute("book_type") ? itemXML[0].getAttribute("book_type") : null; @@ -287,7 +287,7 @@ function doImport() { item.place = ZU.xpathText(metadataXML, 'publisher/publisher_place'); } else if ((itemXML = ZU.xpath(doiRecord, 'crossref/standard')).length) { - item = new Zotero.Item("report"); + item = new Zotero.Item('standard'); refXML = ZU.xpath(itemXML, 'standard_metadata'); metadataXML = ZU.xpath(itemXML, 'standard_metadata'); } @@ -303,11 +303,9 @@ function doImport() { } else if ((itemXML = ZU.xpath(doiRecord, 'crossref/database')).length) { - item = new Zotero.Item("report"); // should be dataset + item = new Zotero.Item('dataset'); refXML = ZU.xpath(itemXML, 'dataset'); - item.extra = "Type: dataset"; metadataXML = ZU.xpath(itemXML, 'database_metadata'); - var pubDate = ZU.xpath(refXML, 'database_date/publication_date'); if (!pubDate.length) pubDate = ZU.xpath(metadataXML, 'database_date/publication_date'); item.date = parseDate(pubDate); @@ -330,9 +328,15 @@ function doImport() { } else if ((itemXML = ZU.xpath(doiRecord, 'crossref/posted_content')).length) { - item = new Zotero.Item("report"); // should be preprint - item.type = ZU.xpathText(itemXML, "./@type"); - item.institution = ZU.xpathText(itemXML, "group_title"); + let type = ZU.xpathText(itemXML, "./@type"); + if (type == "preprint") { + item = new Zotero.Item("preprint"); + item.repository = ZU.xpathText(itemXML, "group_title"); + } + else { + item = new Zotero.Item("blogPost"); + item.blogTitle = ZU.xpathText(itemXML, "institution/institution_name"); + } item.date = parseDate(ZU.xpath(itemXML, "posted_date")); } @@ -425,6 +429,9 @@ function doImport() { item.extra = "DOI: " + item.DOI; } } + // I think grabbing the first license will usually make the most sense; + // not sure how many different options they are and how well labelled they are + item.rights = ZU.xpathText(refXML, 'program/license_ref[1]'); item.url = ZU.xpathText(refXML, 'doi_data/resource'); var title = ZU.xpath(refXML, 'titles[1]/title[1]')[0]; if (!title && metadataXML) { @@ -635,7 +642,7 @@ var testCases = [ "input": "\n\n \n \n \n Open Science Framework\n \n \n Steve\n Haroz\n \n \n \n Open Practices in Visualization Research\n \n \n 07\n 03\n 2018\n \n osf.io/8ag3w\n \n

Two fundamental tenants of scientific research are that it can be scrutinized and built-upon. Both require that the collected data and supporting materials be shared, so others can examine, reuse, and extend them. Assessing the accessibility of these components and the paper itself can serve as a proxy for the reliability, replicability, and applicability of a field’s research. In this paper, I describe the current state of openness in visualization research and provide suggestions for authors, reviewers, and editors to improve open practices in the field. A free copy of this paper, the collected data, and the source code are available at https://osf.io/qf9na/

\n
\n \n https://creativecommons.org/licenses/by/4.0/legalcode\n \n \n 10.31219/osf.io/8ag3w\n https://osf.io/8ag3w\n \n
\n
\n
\n
\n", "items": [ { - "itemType": "report", + "itemType": "preprint", "title": "Open Practices in Visualization Research", "creators": [ { @@ -645,10 +652,10 @@ var testCases = [ } ], "date": "2018-07-03", + "DOI": "10.31219/osf.io/8ag3w", "abstractNote": "Two fundamental tenants of scientific research are that it can be scrutinized and built-upon. Both require that the collected data and supporting materials be shared, so others can examine, reuse, and extend them. Assessing the accessibility of these components and the paper itself can serve as a proxy for the reliability, replicability, and applicability of a field’s research. In this paper, I describe the current state of openness in visualization research and provide suggestions for authors, reviewers, and editors to improve open practices in the field. A free copy of this paper, the collected data, and the source code are available at https://osf.io/qf9na/", - "extra": "DOI: 10.31219/osf.io/8ag3w", - "institution": "Open Science Framework", - "reportType": "preprint", + "repository": "Open Science Framework", + "rights": "https://creativecommons.org/licenses/by/4.0/legalcode", "url": "https://osf.io/8ag3w", "attachments": [], "tags": [], @@ -756,6 +763,7 @@ var testCases = [ "language": "en", "pages": "1-9", "publisher": "Wiley", + "rights": "http://doi.wiley.com/10.1002/tdm_license_1.1", "url": "https://onlinelibrary.wiley.com/doi/10.1002/9781119011071.iemp0172", "attachments": [], "tags": [], @@ -869,6 +877,33 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "import", + "input": "\r\n \r\n \r\n \r\n Social sciences\r\n \r\n \r\n Sebastian\r\n Karcher\r\n \r\n \r\n \r\n QDR Creates New Course on Data Management for CITI\r\n \r\n \r\n 3\r\n 31\r\n 2023\r\n \r\n \r\n QDR Blog\r\n \r\n e1574118b63a40b0b56a605bf5e99c48\r\n \r\n https://creativecommons.org/licenses/by/4.0/legalcode\r\n https://creativecommons.org/licenses/by/4.0/legalcode\r\n \r\n \r\n 10.59350/5znft-x4j11\r\n https://qdr.syr.edu/qdr-blog/qdr-creates-new-course-data-management-citi\r\n \r\n \r\n https://qdr.syr.edu/qdr-blog/qdr-creates-new-course-data-management-citi\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n", + "items": [ + { + "itemType": "blogPost", + "title": "QDR Creates New Course on Data Management for CITI", + "creators": [ + { + "creatorType": "author", + "firstName": "Sebastian", + "lastName": "Karcher" + } + ], + "date": "2023-3-31", + "blogTitle": "QDR Blog", + "extra": "DOI: 10.59350/5znft-x4j11", + "language": "en", + "rights": "https://creativecommons.org/licenses/by/4.0/legalcode", + "url": "https://qdr.syr.edu/qdr-blog/qdr-creates-new-course-data-management-citi", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 97cd07f406c6431acaf6054ec23ec372ad52a4ed Mon Sep 17 00:00:00 2001 From: Kun CHEN Date: Tue, 26 Mar 2024 02:19:13 +0800 Subject: [PATCH 048/158] Fix APA PsycNET `fulltext` match issue (#3276) --- APA PsycNET.js | 93 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 91 insertions(+), 2 deletions(-) diff --git a/APA PsycNET.js b/APA PsycNET.js index 8868d0ae165..57f13ab5fed 100644 --- a/APA PsycNET.js +++ b/APA PsycNET.js @@ -207,8 +207,8 @@ async function getIds(doc, url) { } // try to extract uid from the url - if (url.includes('/record/')) { - let m = url.match(/\/record\/([\d-]*)/); + if (url.includes('/record/') || url.includes('/fulltext/')) { + let m = url.match(/\/(?:record|fulltext)\/([\d-]*)/); if (m && m[1]) { return m[1]; } @@ -542,6 +542,95 @@ var testCases = [ } ] }, + { + "type": "web", + "url": "https://psycnet.apa.org/fulltext/2022-40433-002.html", + "items": [ + { + "itemType": "journalArticle", + "title": "Expertise in emotion: A scoping review and unifying framework for individual differences in the mental representation of emotional experience", + "creators": [ + { + "lastName": "Hoemann", + "firstName": "Katie", + "creatorType": "author" + }, + { + "lastName": "Nielson", + "firstName": "Catie", + "creatorType": "author" + }, + { + "lastName": "Yuen", + "firstName": "Ashley", + "creatorType": "author" + }, + { + "lastName": "Gurera", + "firstName": "J. W.", + "creatorType": "author" + }, + { + "lastName": "Quigley", + "firstName": "Karen S.", + "creatorType": "author" + }, + { + "lastName": "Barrett", + "firstName": "Lisa Feldman", + "creatorType": "author" + } + ], + "date": "2021", + "DOI": "10.1037/bul0000327", + "ISSN": "1939-1455", + "abstractNote": "Expertise refers to outstanding skill or ability in a particular domain. In the domain of emotion, expertise refers to the observation that some people are better at a range of competencies related to understanding and experiencing emotions, and these competencies may help them lead healthier lives. These individual differences are represented by multiple constructs including emotional awareness, emotional clarity, emotional complexity, emotional granularity, and emotional intelligence. These constructs derive from different theoretical perspectives, highlight different competencies, and are operationalized and measured in different ways. The full set of relationships between these constructs has not yet been considered, hindering scientific progress and the translation of findings to aid mental and physical well-being. In this article, we use a scoping review procedure to integrate these constructs within a shared conceptual space. Scoping reviews provide a principled means of synthesizing large and diverse literature in a transparent fashion, enabling the identification of similarities as well as gaps and inconsistencies across constructs. Using domain-general accounts of expertise as a guide, we build a unifying framework for expertise in emotion and apply this to constructs that describe how people understand and experience their own emotions. Our approach offers opportunities to identify potential mechanisms of expertise in emotion, encouraging future research on those mechanisms and on educational or clinical interventions. (PsycInfo Database Record (c) 2023 APA, all rights reserved)", + "issue": "11", + "libraryCatalog": "APA PsycNet", + "pages": "1159-1183", + "publicationTitle": "Psychological Bulletin", + "shortTitle": "Expertise in emotion", + "volume": "147", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "Alexithymia" + }, + { + "tag": "Awareness" + }, + { + "tag": "Conceptual Imagery" + }, + { + "tag": "Creativity" + }, + { + "tag": "Emotional Intelligence" + }, + { + "tag": "Emotions" + }, + { + "tag": "Experience Level" + }, + { + "tag": "Experiences (Events)" + }, + { + "tag": "Individual Differences" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, { "type": "web", "url": "http://psycnet.apa.org/buy/2004-16329-002", From de439f74c312f7564de4c9a9f5ed8086e9bf5188 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Wed, 27 Mar 2024 11:52:48 -0400 Subject: [PATCH 049/158] Update TimesMachine (#3286) Co-authored-by: Abe Jellinek --- TimesMachine.js | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/TimesMachine.js b/TimesMachine.js index 41da5eafa7a..58df258ac1b 100644 --- a/TimesMachine.js +++ b/TimesMachine.js @@ -1,7 +1,7 @@ { "translatorID": "86c3832a-ccc6-40ab-b5e9-83892423df11", "label": "TimesMachine", - "creator": "Abe Jellinek", + "creator": "Abe Jellinek, Sebastian Karcher", "target": "^https?://timesmachine\\.nytimes\\.com/timesmachine/", "minVersion": "3.0", "maxVersion": "", @@ -9,13 +9,13 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-08-17 16:19:53" + "lastUpdated": "2024-03-26 18:04:55" } /* ***** BEGIN LICENSE BLOCK ***** - Copyright © 2021 Abe Jellinek + Copyright © 2021-2024 Abe Jellinek, Sebastian Karcher This file is part of Zotero. @@ -36,7 +36,7 @@ */ -function detectWeb(doc, url) { +function detectWeb(doc, _url) { if (doc.querySelector('#index_article_selected_view')) { return "newspaperArticle"; } @@ -64,18 +64,15 @@ function scrape(doc, url) { item.pages = ZU.trimInternal(text(doc, '#page_num_content')) .replace(/ ,/g, ','); - if (item.abstractNote) { - let place = item.abstractNote.match(/^([A-Z]+)\b/); - if (place) { - item.place = ZU.capitalizeTitle(place[0], true); - } - } + // The URL and abstract don't update when you move from issue to article and it duplicates the hostname + item.url = doc.location.href.replace(/\?.+./, ""); + item.abstractNote = text(doc, '.index_article_lede'); let byline = text(doc, '#byline_content').replace(/^\s*by\b/gi, ''); for (let author of byline.split(/ and |, /)) { author = ZU.capitalizeName(author); - if (author == 'Special to The New York Times') { + if (author.toLowerCase() == 'special to the new york times') { continue; } @@ -95,6 +92,7 @@ function scrape(doc, url) { }]; } + item.ISSN = '0362-4331'; item.libraryCatalog = 'TimesMachine'; item.publicationTitle = 'The New York Times'; @@ -124,13 +122,13 @@ var testCases = [ } ], "date": "1969-08-17", - "abstractNote": "BETHEL, N. Y., Aug. 16 -- Despite massive traffic jams, drenching rainstorms and shortages of food, water and medical facilities, about 300,000 young people swarmed over this rural area today for the Woodstock Music and Art Fair.", + "ISSN": "0362-4331", + "abstractNote": "BETHEL, N. Y., Aug. 16 — Despite massive traffic jams, drenching rainstorms and shortages of food, water and medical facilities, about 300,000 young people swarmed over this rural area today for the Woodstock Music and Art Fair.", "language": "en", "libraryCatalog": "TimesMachine", "pages": "1, 80", - "place": "Bethel", "publicationTitle": "The New York Times", - "url": "http://timesmachine.nytimes.com/timesmachine/1969/08/17/89365215.html?pageNumber=1", + "url": "https://timesmachine.nytimes.com/timesmachine/1969/08/17/89365215.html", "attachments": [ { "title": "Full Text PDF", @@ -162,13 +160,13 @@ var testCases = [ "title": "PORTUGAL'S NEEDS DEBATED IN PRESS", "creators": [], "date": "1969-08-17", - "abstractNote": "LISBON, Aug. 16 -- The principal problem facing Portugal today is freedom, according to the leader of the Democratic opposition, but it is education in the view of the head of the regime's political organization.", + "ISSN": "0362-4331", + "abstractNote": "LISBON, Aug. 16 — The principal problem facing Portugal today is freedom, according to the leader of the Democratic opposition, but it is education in the view of the head of the regime's political organization.", "language": "en", "libraryCatalog": "TimesMachine", "pages": "2", - "place": "Lisbon", "publicationTitle": "The New York Times", - "url": "http://timesmachine.nytimes.com/timesmachine/1969/08/17/89365277.html?pageNumber=2", + "url": "https://timesmachine.nytimes.com/timesmachine/1969/08/17/89365277.html", "attachments": [ { "title": "Full Text PDF", @@ -197,13 +195,13 @@ var testCases = [ "title": "Saudis Replacing Bedouin Rifles With Missiles", "creators": [], "date": "1969-08-17", - "abstractNote": "RIYADH, Saudi Arabia, Aug. 16 (Reuters) -- This Islamic kingdom, forged in this century by the rifles of Bedouin nomads in 30 years of desert warfare, is equipping itself for defense in the missile age.", + "ISSN": "0362-4331", + "abstractNote": "RIYADH, Saudi Arabia, Aug. 16 (Reuters) — This Islamic kingdom, forged in this century by the rifles of Bedouin nomads in 30 years of desert warfare, is equipping itself for defense in the missile age.", "language": "en", "libraryCatalog": "TimesMachine", "pages": "16", - "place": "Riyadh", "publicationTitle": "The New York Times", - "url": "http://timesmachine.nytimes.com/timesmachine/1969/08/17/89365432.html?pageNumber=16", + "url": "https://timesmachine.nytimes.com/timesmachine/1969/08/17/89365432.html", "attachments": [ { "title": "Full Text PDF", From ff73d0dcb84f27419499a7ddfa1affb2d6244340 Mon Sep 17 00:00:00 2001 From: Geoff Banh <38046772+geofferb@users.noreply.github.com> Date: Wed, 27 Mar 2024 14:11:37 -0600 Subject: [PATCH 050/158] =?UTF-8?q?Embedded=20Metadata:=20Exclude=20single?= =?UTF-8?q?=20"Cond=C3=A9=20Nast"=20W3=20author=20(#3287)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Embedded Metadata.js | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/Embedded Metadata.js b/Embedded Metadata.js index 36d6fd3bba1..af9e8dc3d49 100644 --- a/Embedded Metadata.js +++ b/Embedded Metadata.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-08-16 15:18:29" + "lastUpdated": "2024-03-27 05:49:28" } /* @@ -693,7 +693,8 @@ function addLowQualityMetadata(doc, newItem) { Array.from(doc.querySelectorAll('meta[name="author" i], meta[property="author" i]')) .map(authorNode => authorNode.content) .filter(content => content && /[^\s,-.;]/.test(content))); - if (w3authors.size) { + // Condé Nast is a company, not an author + if (w3authors.size && !(w3authors.size == 1 && w3authors.has("Condé Nast"))) { for (let author of w3authors) { newItem.creators.push(ZU.cleanAuthor(author, "author")); } @@ -2046,6 +2047,37 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://www.tatler.com/article/clodagh-mckenna-hon-harry-herbert-wedding-george-osborne-highclere-castle", + "items": [ + { + "itemType": "webpage", + "title": "The Queen’s godson married glamorous Irish chef Clodagh McKenna at Highclere this weekend", + "creators": [ + { + "firstName": "Annabel", + "lastName": "Sampson", + "creatorType": "author" + } + ], + "date": "2021-08-16T09:54:36.000Z", + "abstractNote": "The Hon Harry Herbert, son of the 7th Earl of Carnarvon, married Clodagh McKenna in a fairytale wedding attended by everyone from George Osborne and his fiancée, Thea Rogers, to Laura Whitmore", + "language": "en-GB", + "url": "https://www.tatler.com/article/clodagh-mckenna-hon-harry-herbert-wedding-george-osborne-highclere-castle", + "websiteTitle": "Tatler", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 7efeb1955ca2cf284605eee6178e1291024cbda4 Mon Sep 17 00:00:00 2001 From: wolf Date: Mon, 1 Apr 2024 14:55:50 -0400 Subject: [PATCH 051/158] Fix multi detect in JSTOR (#3291) --- JSTOR.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/JSTOR.js b/JSTOR.js index 560b707f49c..8e657369de6 100644 --- a/JSTOR.js +++ b/JSTOR.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2022-09-22 15:58:08" + "lastUpdated": "2024-03-31 15:58:08" } /* @@ -39,7 +39,7 @@ function detectWeb(doc, url) { // See if this is a search results page or Issue content - if (doc.title == "JSTOR: Search Results") { + if (doc.title == "Search results | JSTOR") { return "multiple"; } // Issues with DOIs can't be identified by URL From b6d1b858e853858f0e7e8e807f5123f62ef6ef9c Mon Sep 17 00:00:00 2001 From: Alex T Date: Mon, 1 Apr 2024 21:23:07 +0200 Subject: [PATCH 052/158] Research Square: fix publication date retrieval (#3292) --- Research Square.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Research Square.js b/Research Square.js index 0a24ff00f11..57614c8f612 100644 --- a/Research Square.js +++ b/Research Square.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-03-21 19:37:52" + "lastUpdated": "2024-04-01 19:07:11" } /* @@ -114,6 +114,12 @@ async function scrape(doc, url = doc.location.href) { } item.url = bareURL; + + // RIS contains only the DY tag set to the retrieval date, not the publication one + let pubDate = attr(doc, "meta[name='citation_publication_date']", "content"); + if (pubDate) { + item.date = pubDate; + } item.complete(); }); @@ -161,7 +167,7 @@ var testCases = [ "firstName": "Christoph" } ], - "date": "2024-03-21", + "date": "2021-07-12", "DOI": "10.21203/rs.3.rs-629724/v1", "abstractNote": "The formation of peptide bonds is one of the most important biochemical reaction steps. Without the development of structurally and catalytically active polymers, there would be no life on our planet. Intensive research is being conducted on possible reaction pathways for the formation of complex peptides on the early Earth. Salt-induced peptide formation (SIPF) by metal catalysis is one possible pathway for abiotic peptide synthesis. The high salt concentration supports dehydration in this process. However, the formation of large, complex oligomer systems is prevented by the high thermodynamic barrier of peptide condensation in aqueous solution. Liquid sulphur dioxide proves to be a superior alternative for copper-catalysed peptide condensation. Compared to water, the amino acids are activated in sulphur dioxide, which leads to the incorporation of all 20 proteinogenic amino acids into the resulting proteins and thus to a large variety of products. Strikingly, even extremely low initial reactant concentrations of only 50 mM are sufficient for extensive peptide formation, leading to an overall yield of 2.9% for dialanine in 7 days. The reactions carried out at room temperature and the successful use of the Hadean mineral covellite as a catalyst, suggest a volcanic environment for the formation of the peptide world on early Earth as a likely scenario.", "libraryCatalog": "Research Square", @@ -303,7 +309,7 @@ var testCases = [ "firstName": "Adrien" } ], - "date": "2024-03-21", + "date": "2021-07-19", "DOI": "10.21203/rs.3.rs-624370/v1", "abstractNote": "A worldwide effort is ongoing to discover drugs against the Severe Acute Respiratory Syndrome coronavirus type 2 (SARS-CoV-2), which has so far caused >3.5 million fatalities (https://covid19.who.int/). The virus essential RNA-dependent RNA polymerase complex is targeted by several nucleoside/tide analogues whose mechanisms of action and clinical potential are currently evaluated. The guanosine analogue AT-527, a double prodrug of its 5'-triphosphate AT-9010, is currently in phase III clinical trials as a COVID19 treatment. Here we report the cryo-EM structure at 2.98 Å resolution of the SARS-CoV-2 nsp12-nsp7-(nsp8)2 complex with RNA showing AT-9010 bound at three sites of nsp12. At the RdRp active-site, one AT-9010 is incorporated into the RNA product. Its 2'-methyl group prevents correct alignment of a second AT-9010 occupying the incoming NTP pocket. The 2'-F, 2'-methyl 3'-OH ribose scaffold explains the non-obligate RNA chain-termination potency of this NA series for both HCV NS5 and SARS-CoV RTCs. A third AT-9010 molecule 5'-diphosphate binds to a coronavirus-specific pocket in the nsp12 N-terminus NiRAN domain, a SelO pseudo-kinase structural and functional homologue. This unique binding mode impedes NiRAN-mediated UMPylation of SARS-CoV-2 nsp8 and nsp9 proteins. Our results suggest a mechanism of action for AT-527 in line with a therapeutic use for COVID19.", "libraryCatalog": "Research Square", From d6e325dc1dcc5f6cc635fdf77c6dae2d7b2db6db Mon Sep 17 00:00:00 2001 From: jiaojiaodubai <63148861+jiaojiaodubai@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:03:12 +0800 Subject: [PATCH 053/158] Web of Science Nextgen: Support .cn top-level domain (#3294) --- Web of Science Nextgen.js | 97 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 93 insertions(+), 4 deletions(-) diff --git a/Web of Science Nextgen.js b/Web of Science Nextgen.js index f6025bf9d85..0514e135ea4 100644 --- a/Web of Science Nextgen.js +++ b/Web of Science Nextgen.js @@ -2,14 +2,14 @@ "translatorID": "4a3820a3-a7bd-44a1-8711-acf7b57d2c37", "label": "Web of Science Nextgen", "creator": "Abe Jellinek", - "target": "^https://www\\.webofscience\\.com/", + "target": "^https://(www\\.webofscience\\.com|webofscience\\.clarivate\\.cn)/", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-06-12 14:55:21" + "lastUpdated": "2024-04-03 05:05:34" } /* @@ -147,8 +147,6 @@ function scrape(doc, url) { } - - function getItemID(url) { let idInURL = url.match(/((?:WOS|RSCI|KJD|DIIDW|MEDLINE|DRCI|BCI|SCIELO|ZOOREC|CCC):[^/?&(]+)/); // Z.debug(idInURL) @@ -381,6 +379,97 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://webofscience.clarivate.cn/wos/alldb/full-record/WOS:000454372400003", + "items": [ + { + "itemType": "journalArticle", + "title": "Histopathology of Alcohol-Related Liver Diseases", + "creators": [ + { + "firstName": "Nitzan C.", + "lastName": "Roth", + "creatorType": "author" + }, + { + "firstName": "Jia", + "lastName": "Qin", + "creatorType": "author" + } + ], + "date": "FEB 2019", + "DOI": "10.1016/j.cld.2018.09.001", + "ISSN": "1089-3261, 1557-8224", + "abstractNote": "Excessive alcohol consumption can lead to a spectrum of liver histopathology, including steatosis, steatohepatitis, foamy degeneration, fatty liver with cholestasis, and cirrhosis. Although variability in sampling and pathologist interpretation are of some concern, liver biopsy remains the gold standard for distinguishing between steatohepatitis and noninflammatory histologic patterns of injury that can also cause the clinical syndrome of alcohol-related hepatitis. Liver biopsy is not routinely recommended to ascertain a diagnosis of alcohol-related liver disease in patients with an uncertain alcohol history, because the histologic features of alcohol-related liver diseases can be found in other diseases, including nonalcoholic steatohepatitis and drug-induced liver injury.", + "extra": "Web of Science ID: WOS:000454372400003", + "issue": "1", + "journalAbbreviation": "Clin. Liver Dis.", + "language": "English", + "libraryCatalog": "Clarivate Analytics Web of Science", + "pages": "11-+", + "publicationTitle": "CLINICS IN LIVER DISEASE", + "url": "https://linkinghub.elsevier.com/retrieve/pii/S1089326118300771", + "volume": "23", + "attachments": [], + "tags": [ + { + "tag": "Alcohol-related liver disease" + }, + { + "tag": "Alcoholic fatty liver with cholestasis" + }, + { + "tag": "Alcoholic foamy degeneration" + }, + { + "tag": "Alcoholic hepatitis" + }, + { + "tag": "Alcoholic steatohepatitis" + }, + { + "tag": "BIOPSY" + }, + { + "tag": "CLINICAL-TRIALS" + }, + { + "tag": "DIAGNOSIS" + }, + { + "tag": "FAILURE" + }, + { + "tag": "FATTY LIVER" + }, + { + "tag": "FOAMY DEGENERATION" + }, + { + "tag": "Histology" + }, + { + "tag": "Liver biopsy" + }, + { + "tag": "PROGNOSIS" + }, + { + "tag": "SAMPLING VARIABILITY" + }, + { + "tag": "SCORING SYSTEM" + }, + { + "tag": "STEATOHEPATITIS" + } + ], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 820b2855498591be65dfd8ff71df2c7a81daf0e9 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 4 Apr 2024 11:56:02 -0400 Subject: [PATCH 054/158] CI: Don't try to lint deleted translators --- .ci/helper.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/helper.sh b/.ci/helper.sh index 1e857415d0c..a1421d9a51c 100644 --- a/.ci/helper.sh +++ b/.ci/helper.sh @@ -39,7 +39,8 @@ get_translators_to_check() { # Push to master if [ "${GITHUB_REF:-}" = "refs/heads/master" ]; then before_commit=$(jq -r '.before' $(echo $GITHUB_EVENT_PATH)) - TRANSLATORS_TO_CHECK=$(git diff $before_commit --name-only | { grep -e "^[^/]*.js$" || true; }) + # --diff-filter=d: Exclude deleted files + TRANSLATORS_TO_CHECK=$(git diff $before_commit --name-only --diff-filter=d | { grep -e "^[^/]*.js$" || true; }) # Pull request else # Gets parent commits. Either one or two hashes From 3acc13a70d0833fbda26a781ee9ae4ebdf028ac2 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 4 Apr 2024 12:24:31 -0400 Subject: [PATCH 055/158] CI: Apply --diff-filter=d to all diff calls --- .ci/helper.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.ci/helper.sh b/.ci/helper.sh index a1421d9a51c..7ce49e7fef8 100644 --- a/.ci/helper.sh +++ b/.ci/helper.sh @@ -33,13 +33,14 @@ get_translators_to_check() { # when running from a local development PR branch # # The branching point hash retrieval logic is based on https://stackoverflow.com/a/12185115/3199106 + # + # We get the set of modified files with git diff, passing --diff-filter=d to exclude deleted files. TRANSLATORS_TO_CHECK="" # Push to master if [ "${GITHUB_REF:-}" = "refs/heads/master" ]; then before_commit=$(jq -r '.before' $(echo $GITHUB_EVENT_PATH)) - # --diff-filter=d: Exclude deleted files TRANSLATORS_TO_CHECK=$(git diff $before_commit --name-only --diff-filter=d | { grep -e "^[^/]*.js$" || true; }) # Pull request else @@ -50,11 +51,11 @@ get_translators_to_check() { if [ $num_parent_commits -gt 1 ]; then first_parent=$(git rev-list --first-parent ^master HEAD^2 | tail -n1) branch_point=$(git rev-list "$first_parent^^!") - TRANSLATORS_TO_CHECK=$(git diff HEAD^2 $branch_point --name-only | { grep -e "^[^/]*.js$" || true; }) + TRANSLATORS_TO_CHECK=$(git diff HEAD^2 $branch_point --name-only --diff-filter=d | { grep -e "^[^/]*.js$" || true; }) else first_parent=$(git rev-list --first-parent ^master HEAD | tail -n1) branch_point=$(git rev-list "$first_parent^^!") - TRANSLATORS_TO_CHECK=$(git diff $branch_point --name-only | { grep -e "^[^/]*.js$" || true; }) + TRANSLATORS_TO_CHECK=$(git diff $branch_point --name-only --diff-filter=d | { grep -e "^[^/]*.js$" || true; }) fi fi } From b04cfc962f34e9a1d3ff7cf2c69e8227da9b74e2 Mon Sep 17 00:00:00 2001 From: Georg Mayr-Duffner Date: Thu, 4 Apr 2024 19:59:09 +0200 Subject: [PATCH 056/158] PNX: Remove $$0-prefixed authority information (#3295) --- Primo Normalized XML.js | 46 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/Primo Normalized XML.js b/Primo Normalized XML.js index 1b8c77705d0..69678903d56 100644 --- a/Primo Normalized XML.js +++ b/Primo Normalized XML.js @@ -11,7 +11,7 @@ }, "inRepository": true, "translatorType": 1, - "lastUpdated": "2024-02-27 01:41:07" + "lastUpdated": "2024-04-04 15:46:05" } /* @@ -368,7 +368,10 @@ function stripAuthor(str) { .replace(/\s*:\s+/, " ") // National Library of Russia adds metadata at the end of the author name, // prefixed by 'NLR10::'. Remove it. - .replace(/\bNLR10::.*/, ''); + .replace(/\bNLR10::.*/, '') + // Austrian Libraries add authority data at the end of the author name, + // prefixed by '$$0'. Remove it. + .replace(/\$\$0.*/, ''); } function fetchCreators(item, creators, type, splitGuidance) { @@ -823,6 +826,45 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "import", + "input": "\n\n \n 2174645960003337\n WUW_alma\n WUW_alma2174645960003337\n AC03437319\n MARC21\n Alma\n 43ACC_WUW:2174645960003337\n \n \n book\n Theory of economic dynamics : an essay on cyclical and long-run changes in capitalist economy\n Kalecki, Michał [VerfasserIn]$$QKalecki, Michał$$0(DE-588)118559494$$G(uri)http://d-nb.info/gnd/118559494\n 1. publ.\n London : Allen & Unwin\n 1954\n 178 S., graph. Darst.\n Kapitalismus ; Konjunkturzyklus ; Wirtschaftsentwicklung\n Hier auch spätere, unveränderte Nachdrucke (1956)\n eng\n WU Bibliothekskatalog\n $$IWUW$$LWUW_B_JHB$$1Closed Stacks$$2503328-G$$Savailable$$X43ACC_WUW$$YJHB$$ZMG$$P1\n $$IWUW$$LWUW_B_JHB$$1Level -2 Books$$2320083-M$$Savailable$$X43ACC_WUW$$YJHB$$ZMAG$$P2\n $$IWUW$$LWUW_B_JHB$$1Steindl Collection$$2S/335.5/K14 T3$$Savailable$$X43ACC_WUW$$YJHB$$ZSST$$P3\n 503328-G\n 320083-M\n S/335.5/K14 T3\n by M. Kalecki\n AC03437319\n https://permalink.obvsg.at/wuw/AC03437319\n Kapitalismus | Konjunkturzyklus | Wirtschaftsentwicklung\n Theory of economic dynamics: an essay on cyclical and long-run changes in capitalist economy\n Allen & Unwin\n WU Bibliothekszentrum LC, Signatur: 503328-G\n WU Bibliothekszentrum LC, Signatur: 320083-M\n WU Bibliothekszentrum LC, Signatur: S/335.5/K14 T3\n eng\n Kalecki, Michał\n $$IWUW$$Savailable\n available\n 2\n \n \n Kalecki, Michał [VerfasserIn]\n Michał\n Kalecki 1899-1970 VerfasserIn\n M.\n Kalecki 1899-1970\n Michal\n Kaletskii 1899-1970\n Michel\n http://d-nb.info/gnd/118559494\n Kalecki, Michał 1899-1970 VerfasserIn\n Kalecki, M. 1899-1970\n Kaletskii, Michal 1899-1970\n Kalecki, Michal 1899-1970\n Kalecki, Michel 1899-1970\n Kalecki, M\n Kaletskii, M\n (uri)http://d-nb.info/gnd/118559494\n Theory of economic dynamics an essay on cyclical and long-run changes in capitalist economy\n Hier auch spätere, unveränderte Nachdrucke (1956)\n Kapitalismus ; Konjunkturzyklus ; Wirtschaftsentwicklung\n Kapitalismus\n Konjunkturzyklus\n Wirtschaftsentwicklung\n Wirtschaftliche Entwicklung\n Wirtschaftsdynamik\n Wirtschaftswandel\n Wirtschaftlicher Wandel\n Ökonomische Entwicklung\n http://d-nb.info/gnd/4066438-7\n Zyklus\n Wachstumszyklus\n Konjunkturschwankung\n 4032134-4\n Kapitalistische Gesellschaft\n Kapitalistische Wirtschaft\n Kapitalistisches Gesellschaftssystem\n Kapitalistisches Wirtschaftssystem\n Gesellschaftsordnung\n Antikapitalismus\n 4029577-1\n (DE-588)4029577-1\n (DE-588)4032134-4\n (DE-588)4066438-7\n 1. publ.\n Allen & Unwin\n WUW_alma\n WUW_alma2174645960003337\n book\n 1954\n 19540101\n 19541231\n AC03437319\n 990006667950203337\n WUW_alma\n WUW_SST\n WUW\n WUW_alma\n WUW_SST\n WUW\n 1956\n Allen & Unwin\n 503328-G\n 320083-M\n S/335.5/K14 T3\n by M. Kalecki\n https://permalink.obvsg.at/wuw/AC03437319\n AC03437319\n \n \n THEORY OF ECONOMIC DYNAMICS AN ESSAY ON CYCLICAL AND LONGRUN CHANGES IN CAPITALIST ECONOMY\n 1954\n Kalecki, Michał VerfasserIn\n 1954\n \n \n eng\n 1954\n Kapitalismus\n Konjunkturzyklus\n Wirtschaftsentwicklung\n available\n books\n books\n Kalecki, Michał\n WUW_B_JHB\n T\n Ohne Angabe\n 20170815_785\n 706492797\n 5\n \n \n 99\n WUWAC03437319\n 1954\n WUW990006667950203337\n WUWAC03437319\n WUW_1954\n WUWAC03437319\n WUW_\n WUW_178 S.\n WUW_allen unwin\n WUW_kalecki michal 1899 1970\n WUW_990006667950203337\n \n \n 1\n $$Kwuwwuwwuwkalecki michal$$AA\n $$Kwuwwuwwuwtheory of economic dynamics an essay on cyclical and long run changes in capitalist economy$$AT\n \n \n WUW\n Alma-P\n \n \n 1\n 1\n \n \n Kalecki\n Kalecki, Michał\n $$NKalecki, Michał$$LKalecki$$FMichał$$Rauthor\n $$NKalecki, M$$LKalecki$$FM\n $$NKaletskii, Michal$$LKaletskii$$FMichal\n $$NKalecki, Michal$$LKalecki$$FMichal\n $$NKalecki, Michel$$LKalecki$$FMichel\n $$Nhttp://d-nb.info/gnd/118559494$$Lhttp://d-nb.info/gnd/118559494$$F\n Theory of economic dynamics: an essay on cyclical and long-run changes in capitalist economy\n Theory of economic dynami\n 1956\n 1954\n 1954\n 178 S.\n book\n BOOK\n London\n Allen & Unwin\n 2174645960003337\n https://permalink.obvsg.at/wuw/AC03437319\n 000666795\n -WUW-\n GND: 4029577-1 689 SSS TOP\n GND: 4032134-4 689 SSS TOP\n GND: 4066438-7 689 SSS TOP\n GND: 118559494 100 XXX CRE\n \n \n $$DKalecki, Michał, 1899-1970$$EKalecki, Michał, 1899-1970\n $$DKalecki, M., 1899-1970$$EKalecki, M., 1899-1970\n $$DKaletskii, Michal, 1899-1970$$EKaletskii, Michal, 1899-1970\n $$DKalecki, Michal, 1899-1970$$EKalecki, Michal, 1899-1970\n $$DKalecki, Michel, 1899-1970$$EKalecki, Michel, 1899-1970\n $$DTheory of economic dynamics an essay on cyclical and long-run changes in capitalist economy$$ETheory of economic dynamics an essay on cyclical and long-run changes in capitalist economy\n $$D1956$$E1956\n $$TGND$$EKapitalismus$$DKapitalismus\n $$TGND$$EKonjunkturzyklus$$DKonjunkturzyklus\n $$TGND$$EWirtschaftsentwicklung$$DWirtschaftsentwicklung\n $$TGND$$EWirtschaftliche Entwicklung$$DWirtschaftliche Entwicklung\n $$TGND$$EWirtschaftsdynamik$$DWirtschaftsdynamik\n $$TGND$$EWirtschaftswandel$$DWirtschaftswandel\n $$TGND$$EWirtschaftlicher Wandel$$DWirtschaftlicher Wandel\n $$TGND$$EÖkonomische Entwicklung$$DÖkonomische Entwicklung\n $$TGND$$Ehttp://d-nb.info/gnd/4066438-7$$Dhttp://d-nb.info/gnd/4066438-7\n $$TGND$$EZyklus$$DZyklus\n $$TGND$$EWachstumszyklus$$DWachstumszyklus\n $$TGND$$EKonjunkturschwankung$$DKonjunkturschwankung\n $$TGND$$E4032134-4$$D4032134-4\n $$TGND$$EKapitalistische Gesellschaft$$DKapitalistische Gesellschaft\n $$TGND$$EKapitalistische Wirtschaft$$DKapitalistische Wirtschaft\n $$TGND$$EKapitalistisches Gesellschaftssystem$$DKapitalistisches Gesellschaftssystem\n $$TGND$$EKapitalistisches Wirtschaftssystem$$DKapitalistisches Wirtschaftssystem\n $$TGND$$EGesellschaftsordnung$$DGesellschaftsordnung\n $$TGND$$EAntikapitalismus$$DAntikapitalismus\n $$TGND$$E4029577-1$$D4029577-1\n $$IWUW$$D503328-G$$E503328-g$$T\n $$IWUW$$D320083-M$$E320083-m$$T\n $$IWUW$$DS/335.5/K14 T3$$Es/335.5/k14 t3$$T8\n \n", + "items": [ + { + "itemType": "book", + "title": "Theory of economic dynamics: an essay on cyclical and long-run changes in capitalist economy", + "creators": [ + { + "firstName": "Michał", + "lastName": "Kalecki", + "creatorType": "author" + } + ], + "date": "1954", + "abstractNote": "Hier auch spätere, unveränderte Nachdrucke (1956)", + "callNumber": "503328-G, 320083-M, S/335.5/K14 T3", + "edition": "1. publ.", + "language": "eng", + "numPages": "178", + "place": "London", + "publisher": "Allen & Unwin", + "attachments": [], + "tags": [ + { + "tag": "Kapitalismus" + }, + { + "tag": "Konjunkturzyklus" + }, + { + "tag": "Wirtschaftsentwicklung" + } + ], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 5af5f73c11baf3bef7789b0e142e047b0e6de7e4 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 5 Apr 2024 04:17:28 -0400 Subject: [PATCH 057/158] Twitter: Detect on x.com as well for mobile app The iOS app uses x.com, while the website still uses twitter.com. --- Twitter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Twitter.js b/Twitter.js index d21419f5d92..28b2e3698c5 100644 --- a/Twitter.js +++ b/Twitter.js @@ -2,14 +2,14 @@ "translatorID": "31659710-d04e-45d0-84ba-8e3f5afc4a54", "label": "Twitter", "creator": "Bo An, Dan Stillman", - "target": "^https?://([^/]+\\.)?twitter\\.com/", + "target": "^https?://([^/]+\\.)?(twitter|x)\\.com/", "minVersion": "4.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-08-17 18:35:48" + "lastUpdated": "2024-04-05 08:16:53" } /* From 82f28ce75ae49df934069200d9a8822023dc7f48 Mon Sep 17 00:00:00 2001 From: Geoff Banh <38046772+geofferb@users.noreply.github.com> Date: Thu, 11 Apr 2024 13:25:04 -0600 Subject: [PATCH 058/158] YouTube: Fix missing fields when run from translation-server (#3293) --- YouTube.js | 133 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 80 insertions(+), 53 deletions(-) diff --git a/YouTube.js b/YouTube.js index 7cbcfe771b8..599bd230af2 100644 --- a/YouTube.js +++ b/YouTube.js @@ -1,7 +1,7 @@ { "translatorID": "d3b1d34c-f8a1-43bb-9dd6-27aa6403b217", "label": "YouTube", - "creator": "Sean Takats, Michael Berkowitz, Matt Burton and Rintze Zelle", + "creator": "Sean Takats, Michael Berkowitz, Matt Burton, Rintze Zelle, and Geoff Banh", "target": "^https?://([^/]+\\.)?youtube\\.com/", "minVersion": "3.0", "maxVersion": "", @@ -9,13 +9,13 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-02-05 18:28:26" + "lastUpdated": "2024-04-05 04:04:37" } /* ***** BEGIN LICENSE BLOCK ***** - Copyright © 2015-2019 Sean Takats, Michael Berkowitz, Matt Burton and Rintze Zelle + Copyright © 2015-2024 Sean Takats, Michael Berkowitz, Matt Burton, Rintze Zelle, and Geoff Banh This file is part of Zotero. @@ -36,7 +36,7 @@ */ function detectWeb(doc, url) { - if (url.search(/\/watch\?(?:.*)\bv=[0-9a-zA-Z_-]+/) != -1) { + if (/\/watch\?(?:.*)\bv=[0-9a-zA-Z_-]+/.test(url)) { return "videoRecording"; } // Search results @@ -87,62 +87,89 @@ function doWeb(doc, url) { } } +function getMetaContent(doc, attrName, value) { + return attr(doc, 'meta[' + attrName + '="' + value + '"]', 'content'); +} + function scrape(doc, url) { var item = new Zotero.Item("videoRecording"); - - let jsonLD; - try { - jsonLD = JSON.parse(text(doc, 'script[type="application/ld+json"]')); - } - catch (e) { - jsonLD = {}; - } - - /* YouTube won't update the meta tags for the user, - * if they open e.g. a suggested video in the same tab. - * Thus we scrape them from screen instead. - */ - - item.title = text(doc, '#info-contents h1.title') // Desktop - || text(doc, '#title') - || text(doc, '.slim-video-information-title'); // Mobile - // try to scrape only the canonical url, excluding additional query parameters - item.url = url.replace(/^(.+\/watch\?v=[0-9a-zA-Z_-]+).*/, "$1").replace('m.youtube.com', 'www.youtube.com'); - item.runningTime = text(doc, '#movie_player .ytp-time-duration') // Desktop - || text(doc, '.ytm-time-display .time-second'); // Mobile after unmute - if (!item.runningTime && jsonLD.duration) { // Mobile before unmute - let duration = parseInt(jsonLD.duration.substring(2)); - let hours = String(Math.floor(duration / 3600)).padStart(2, '0'); - let minutes = String(Math.floor(duration % 3600 / 60)).padStart(2, '0'); - let seconds = String(duration % 60).padStart(2, '0'); - if (duration >= 3600) { // Include hours - item.runningTime = `${hours}:${minutes}:${seconds}`; + if (!Zotero.isServer) { + let jsonLD; + try { + jsonLD = JSON.parse(text(doc, 'script[type="application/ld+json"]')); } - else { // Just include minutes and seconds - item.runningTime = `${minutes}:${seconds}`; + catch (e) { + jsonLD = {}; } - } - item.date = ZU.strToISO( - text(doc, '#info-strings yt-formatted-string') // Desktop + /* YouTube won't update the meta tags for the user, + * if they open e.g. a suggested video in the same tab. + * Thus we scrape them from screen instead. + */ + + item.title = text(doc, '#info-contents h1.title') // Desktop + || text(doc, '#title') + || text(doc, '.slim-video-information-title'); // Mobile + // try to scrape only the canonical url, excluding additional query parameters + item.url = url.replace(/^(.+\/watch\?v=[0-9a-zA-Z_-]+).*/, "$1").replace('m.youtube.com', 'www.youtube.com'); + item.runningTime = text(doc, '#movie_player .ytp-time-duration') // Desktop + || text(doc, '.ytm-time-display .time-second'); // Mobile after unmute + if (!item.runningTime && jsonLD.duration) { // Mobile before unmute + let duration = parseInt(jsonLD.duration.substring(2)); + let hours = String(Math.floor(duration / 3600)).padStart(2, '0'); + let minutes = String(Math.floor(duration % 3600 / 60)).padStart(2, '0'); + let seconds = String(duration % 60).padStart(2, '0'); + if (duration >= 3600) { // Include hours + item.runningTime = `${hours}:${minutes}:${seconds}`; + } + else { // Just include minutes and seconds + item.runningTime = `${minutes}:${seconds}`; + } + } + + item.date = ZU.strToISO( + text(doc, '#info-strings yt-formatted-string') // Desktop || attr(doc, 'ytm-factoid-renderer:last-child > div', 'aria-label') // Mobile if description has been opened - ) || jsonLD.uploadDate; // Mobile on initial page load - - var author = text(doc, '#meta-contents #text-container .ytd-channel-name') // Desktop - || text(doc, '#upload-info #text-container .ytd-channel-name') - || text(doc, '.slim-owner-channel-name'); // Mobile - if (author) { - item.creators.push({ - lastName: author, - creatorType: "author", - fieldMode: 1 - }); + ) || jsonLD.uploadDate; // Mobile on initial page load + + var author = text(doc, '#meta-contents #text-container .ytd-channel-name') // Desktop + || text(doc, '#upload-info #text-container .ytd-channel-name') + || text(doc, '.slim-owner-channel-name'); // Mobile + if (author) { + item.creators.push({ + lastName: author, + creatorType: "author", + fieldMode: 1 + }); + } + var description = text(doc, '#description .content') + || text(doc, '#description') + || text(doc, 'ytm-expandable-video-description-body-renderer .collapsed-string-container'); + if (description) { + item.abstractNote = description; + } } - var description = text(doc, '#description .content') - || text(doc, '#description') - || text(doc, 'ytm-expandable-video-description-body-renderer .collapsed-string-container'); - if (description) { - item.abstractNote = description; + else { + // required for translator server, which doesn't load the page's JS + item.title = getMetaContent(doc, 'name', 'title'); + item.url = getMetaContent(doc, 'property', 'og:url'); + let isoDuration = getMetaContent(doc, 'itemprop', 'duration'); + // Convert ISO 8601 duration to HH:MM:SS + item.runningTime = isoDuration.replace(/^PT/, '').replace(/H/, ':').replace(/M/, ':') +.replace(/S/, ''); + item.date = ZU.strToISO(getMetaContent(doc, 'itemprop', 'uploadDate')); + let author = attr(doc, 'link[itemprop="name"]', 'content'); + if (author) { + item.creators.push({ + lastName: author, + creatorType: "author", + fieldMode: 1 + }); + } + let description = getMetaContent(doc, 'name', 'description'); + if (description) { + item.abstractNote = description; + } } item.complete(); From b3dd2b40c1bdc6427299153aff584945ae55dff7 Mon Sep 17 00:00:00 2001 From: sebastian-berlin-wmse <36327337+sebastian-berlin-wmse@users.noreply.github.com> Date: Tue, 23 Apr 2024 20:47:31 +0200 Subject: [PATCH 059/158] Add translator for LIBRIS ISBN (#3184) --- LIBRIS ISBN.js | 103 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 LIBRIS ISBN.js diff --git a/LIBRIS ISBN.js b/LIBRIS ISBN.js new file mode 100644 index 00000000000..d22322ec8ad --- /dev/null +++ b/LIBRIS ISBN.js @@ -0,0 +1,103 @@ +{ + "translatorID": "5f506a9a-8076-4e1e-950c-f55d32003aae", + "label": "LIBRIS ISBN", + "creator": "Sebastian Berlin", + "target": "", + "minVersion": "5.0", + "maxVersion": "", + "priority": 98, + "inRepository": true, + "translatorType": 8, + "lastUpdated": "2024-04-23 18:44:30" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2023 Sebastian Berlin + + 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(item) { + if (typeof item.ISBN !== 'string') { + return false; + } + + // Filter by country code 91 (Sweden). + let isbn = ZU.cleanISBN(item.ISBN); + return /^(97[8-9])?91/.test(isbn); +} + +async function doSearch(item) { + let isbn = ZU.cleanISBN(item.ISBN); + let url = `http://libris.kb.se/xsearch?query=ISBN:${isbn}`; + let xmlText = await ZU.requestText(url); + let doc = ((new DOMParser()).parseFromString(xmlText, 'text/xml')); + let record = doc.querySelector('collection > record'); + if (!record) { + return; + } + + let marcXml = new XMLSerializer().serializeToString(record); + let translator = Zotero.loadTranslator('import'); + translator.setTranslator('edd87d07-9194-42f8-b2ad-997c4c7deefd'); + translator.setString(marcXml); + translator.setHandler('itemDone', (_obj, item) => { + // Yes, it is a book + item.tags = item.tags.filter(tag => (tag.tag || tag) !== 'Bok'); + item.complete(); + }); + translator.translate(); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "search", + "input": { + "ISBN": "978-91-977109-4-7" + }, + "items": [ + { + "itemType": "book", + "title": "Så fungerar Wikipedia: allt du behöver veta om hur man bidrar, om kritiken och kvalitetssatsningarna", + "creators": [ + { + "firstName": "Lennart", + "lastName": "Guldbrandsson", + "creatorType": "author" + } + ], + "date": "2008", + "ISBN": "9789197710947", + "edition": "Ny utg.", + "libraryCatalog": "LIBRIS ISBN", + "numPages": "244", + "place": "Ronneby", + "publisher": "Hexa", + "shortTitle": "Så fungerar Wikipedia", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + } +] +/** END TEST CASES **/ From ffb252e58b2ff0a6344e06d2f8928828ef9c0e7f Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 24 Apr 2024 11:00:03 -0400 Subject: [PATCH 060/158] Note HTML & Note Markdown: Add annotation key to all reader links (#3298) --- Note HTML.js | 8 +++++--- Note Markdown.js | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Note HTML.js b/Note HTML.js index c2def8beea5..3d43bb8cbf0 100644 --- a/Note HTML.js +++ b/Note HTML.js @@ -14,7 +14,7 @@ }, "inRepository": true, "translatorType": 2, - "lastUpdated": "2024-02-13 18:47:05" + "lastUpdated": "2024-04-24 14:50:00" } /* @@ -103,10 +103,12 @@ function doExport() { linkText = 'snapshot'; } else { - openURI += '?page=' + (position.pageIndex + 1) - + (annotation.annotationKey ? '&annotation=' + annotation.annotationKey : ''); + openURI += '?page=' + (position.pageIndex + 1); linkText = 'pdf'; } + if (annotation.annotationKey) { + openURI += '&annotation=' + annotation.annotationKey; + } let a = doc.createElement('a'); a.href = openURI; diff --git a/Note Markdown.js b/Note Markdown.js index 27ff2292641..611f3aa04d0 100644 --- a/Note Markdown.js +++ b/Note Markdown.js @@ -14,7 +14,7 @@ }, "inRepository": true, "translatorType": 2, - "lastUpdated": "2024-03-19 15:35:00" + "lastUpdated": "2024-04-24 14:50:00" } /* @@ -1534,10 +1534,12 @@ function convert(doc) { linkText = 'snapshot'; } else { - openURI += '?page=' + (position.pageIndex + 1) - + (annotation.annotationKey ? '&annotation=' + annotation.annotationKey : ''); + openURI += '?page=' + (position.pageIndex + 1); linkText = 'pdf'; } + if (annotation.annotationKey) { + openURI += '&annotation=' + annotation.annotationKey; + } let a = doc.createElement('a'); a.href = openURI; From 3871bb2a11b03885f45d35e20bab3f321d9578dd Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 9 May 2024 12:39:36 -0400 Subject: [PATCH 061/158] Springer Link: Support new book chapter list structure Fixes #3302 --- Springer Link.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Springer Link.js b/Springer Link.js index 3321f5755f2..8062ce1b6ad 100644 --- a/Springer Link.js +++ b/Springer Link.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-03-11 17:59:13" + "lastUpdated": "2024-05-09 16:39:27" } /* @@ -89,6 +89,11 @@ function getResultList(doc) { if (!results.length) { results = doc.querySelectorAll('li[data-test="chapter"] h4.c-card__title > a, li[data-test="chapter"] h3.c-card__title > a'); } + // https://link.springer.com/book/10.1007/978-3-476-05742-6 + // https://link.springer.com/book/10.1007/978-3-319-63324-4 + if (!results.length) { + results = doc.querySelectorAll('li[data-test="chapter"] [data-test^="chapter-title"] > a'); + } // https://link.springer.com/journal/11192/volumes-and-issues/129-1 if (!results.length) { results = doc.querySelectorAll('section ol article.c-card-open h3 > a'); @@ -647,6 +652,16 @@ var testCases = [ "type": "web", "url": "https://link.springer.com/journal/10473/volumes-and-issues/44-3", "items": "multiple" + }, + { + "type": "web", + "url": "https://link.springer.com/book/10.1007/978-3-319-63324-4", + "items": "multiple" + }, + { + "type": "web", + "url": "https://link.springer.com/book/10.1007/978-3-476-05742-6", + "items": "multiple" } ] /** END TEST CASES **/ From d0e7827d061329d9830675ef9effafe590f0b06d Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Thu, 9 May 2024 12:56:03 -0400 Subject: [PATCH 062/158] Fix EBSCOhost Title & PDF download (#3300) --- EBSCOhost.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/EBSCOhost.js b/EBSCOhost.js index ff9ee402759..00fdd9601ed 100644 --- a/EBSCOhost.js +++ b/EBSCOhost.js @@ -8,8 +8,8 @@ "priority": 100, "inRepository": true, "translatorType": 4, - "browserSupport": "gcsib", - "lastUpdated": "2021-10-11 01:07:25" + "browserSupport": "gcsibv", + "lastUpdated": "2024-04-15 01:50:53" } /* @@ -56,7 +56,7 @@ function detectWeb(doc, url) { * given the text of the delivery page, downloads an item */ function downloadFunction(text, url, prefs) { - if (text.search(/^TY\s\s?-/m) == -1) { + if (!(/^TY\s\s?-/m.test(text))) { text = "\nTY - JOUR\n" + text; // this is probably not going to work if there is garbage text in the begining } @@ -87,12 +87,14 @@ function downloadFunction(text, url, prefs) { let subtitle; // EBSCOhost uses nonstandard tags to represent journal titles on some items + // Sometimes T2 also just duplicates the journal title across along with JO/JF/J1 // no /g flag so we don't create duplicate tags let journalRe = /^(JO|JF|J1)/m; - if (journalRe.test(text)) { + let journalTitleRe = /^(?:JO|JF|J1)\s\s?-\s?(.*)/m; + if (journalTitleRe.test(text)) { let subtitleRe = /^T2\s\s?-\s?(.*)/m; let subtitleMatch = text.match(subtitleRe); - if (subtitleMatch) { + if (subtitleMatch && subtitleMatch[1] != text.match(journalTitleRe)[1]) { // if there's already something in T2, store it and erase it from the RIS subtitle = subtitleMatch[1]; text = text.replace(subtitleRe, ''); @@ -100,7 +102,7 @@ function downloadFunction(text, url, prefs) { text = text.replace(journalRe, 'T2'); } - + // Let's try to keep season info // Y1 - 1993///Winter93 // Y1 - 2009///Spring2009 @@ -115,7 +117,7 @@ function downloadFunction(text, url, prefs) { translator.setString(text); // eslint-disable-next-line padded-blocks translator.setHandler("itemDone", function (obj, item) { - + /* Fix capitalization issues */ // title if (!item.title && prefs.itemTitle) { @@ -204,7 +206,8 @@ function downloadFunction(text, url, prefs) { item.attachments.push({ url: prefs.pdfURL, title: "EBSCO Full Text", - mimeType: "application/pdf" + mimeType: "application/pdf", + proxy: false }); item.complete(); } @@ -401,6 +404,8 @@ function findPdfUrl(pdfDoc) { /** * borrowed from http://www.webtoolkit.info/javascript-base64.html */ +// We should have this available now - leaving in the code just in case +/* var base64KeyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; function utf8Encode(string) { @@ -450,7 +455,7 @@ function btoa(input) { + base64KeyStr.charAt(enc3) + base64KeyStr.charAt(enc4); } return output; -} +} */ /** * end borrowed code From c46011097e3c599a295d1846bf6beefc89c05647 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 10 May 2024 13:08:23 -0400 Subject: [PATCH 063/158] CI: Don't report lint error when testCases is empty --- .ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js b/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js index de1b97f73c4..9e55111787b 100644 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js @@ -55,8 +55,8 @@ module.exports = { }); } - const nodes = declaration.declarations[0].init.elements || []; - if (!nodes.length) { + const nodes = declaration.declarations[0].init.elements; + if (!Array.isArray(nodes)) { context.report({ node: declaration, message: 'testCases must be an array', From 650cbb8564a79a02a8a107502221cc7e5e27d598 Mon Sep 17 00:00:00 2001 From: Joey Takeda Date: Wed, 15 May 2024 08:10:26 -0700 Subject: [PATCH 064/158] Rewrite of DHQ Translator (#3306) Co-authored-by: Abe Jellinek --- Digital Humanities Quarterly.js | 223 +++++++++++++++++++++++--------- 1 file changed, 159 insertions(+), 64 deletions(-) diff --git a/Digital Humanities Quarterly.js b/Digital Humanities Quarterly.js index 2751dd738e0..7b8906d017c 100644 --- a/Digital Humanities Quarterly.js +++ b/Digital Humanities Quarterly.js @@ -9,104 +9,199 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2012-09-20 20:46:53" + "lastUpdated": "2024-05-15 15:07:13" } -function detectWeb(doc, url) { - if (doc.evaluate('//div[@class="DHQarticle"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) { +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2012-2024 Michael Berkowitz + + 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 (doc.querySelector('.DHQarticle')) { return "journalArticle"; - } else if (doc.evaluate('//div[@id="mainContent"]/div/p', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) { + } + if (doc.querySelector('#toc') && getSearchResults(doc, true)) { return "multiple"; } + return false; } -function xpathtext(doc, xpath, xdoc) { - return Zotero.Utilities.trimInternal(doc.evaluate(xpath, xdoc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent); +function getSearchResults(doc, checkOnly) { + var items = {}; + var found = false; + var rows = doc.querySelectorAll('#toc .articleInfo > a:first-of-type'); + for (let row of rows) { + let href = row.href; + let title = ZU.trimInternal(row.textContent); + if (!href || !title) continue; + if (checkOnly) return true; + found = true; + items[href] = title; + } + return found ? items : false; } -function doWeb(doc, url) { - var articles = new Array(); +async function doWeb(doc, url) { if (detectWeb(doc, url) == "multiple") { - var items = new Object; - var arts = doc.evaluate('//div[@id="mainContent"]/div/p/a', doc, null, XPathResult.ANY_TYPE, null); - var art; - while (art = arts.iterateNext()) { - items[art.href] = art.textContent; + let items = await Zotero.selectItems(getSearchResults(doc, false)); + if (!items) return; + for (let url of Object.keys(items)) { + scrape(await requestDocument(url)); } - - Zotero.selectItems(items, function (items) { - if (!items) { - return true; - } - for (var i in items) { - articles.push(i); - } - scrape(articles, function () { - }); + } + else { + scrape(doc, url); + } +} + + +function scrape(doc, url = doc.location.href) { + // Get the metadata + const main = doc.querySelector('#mainContent'); + // Of the form "YYYY Volume.Issue" + const [year, volume, issue] = text(main, '.toolbar > a').split(/[\s\\.]+/); + const title = ZU.trimInternal(text(main, 'h1.articleTitle')); + const authors = main.querySelectorAll('.DHQheader .author'); + const abstract = ZU.trimInternal(text(main, '#abstract > p')); + const license = ZU.trimInternal(text(main, ".license > a[rel='license']:last-of-type")); + // Build item + const item = new Z.Item("journalArticle"); + item.url = doc.location.href; + item.title = title; + item.creators = [...authors].map((author) => { + return ZU.cleanAuthor(text(author, 'a:first-child'), "author"); + }); + item.publicationTitle = "Digital Humanities Quarterly"; + item.ISSN = "1938-4122"; + item.date = year; + item.volume = volume; + item.issue = issue; + item.abstractNote = abstract; + item.rights = license; + const pdfLink = main.querySelector('.toolbar > a[href$=".pdf"]'); + if (pdfLink) { + item.attachments.push({ + url: pdfLink.href, + title: "Full Text PDF", + mimeType: "application/pdf" }); - } + } else { - articles = [url]; - scrape(articles); + item.attachments.push({ + document: doc, + title: "Snapshot" + }); } - Zotero.debug(articles);} + item.complete(); +} -function scrape(articles){ - Zotero.Utilities.processDocuments(articles, function(newDoc) { - var item = new Zotero.Item("journalArticle"); - item.url = newDoc.location.href; - item.title = xpathtext(newDoc, '//h1[@class="articleTitle"]', newDoc); - var voliss = xpathtext(newDoc, '//div[@id="pubInfo"]', newDoc); - voliss = voliss.match(/(.*)Volume\s+(\d+)\s+Number\s+(\d+)/); - item.date = voliss[1]; - item.volume = voliss[2]; - item.issue = voliss[3]; - var authors = newDoc.evaluate('//div[@class="author"]', newDoc, null, XPathResult.ANY_TYPE, null); - var aut; - while (aut = authors.iterateNext()) { - item.creators.push(Zotero.Utilities.cleanAuthor(xpathtext(newDoc, './a[1]', aut), "author")); - } - item.attachments = [{url:item.url, title:"DHQ Snapshot", mimeType:"text/html"}]; - item.complete(); - }, function() {});}/** BEGIN TEST CASES **/ +/** BEGIN TEST CASES **/ var testCases = [ { "type": "web", - "url": "http://www.digitalhumanities.org/dhq/vol/5/2/000094/000094.html", + "url": "https://www.digitalhumanities.org/dhq/vol/5/2/index.html", + "items": "multiple" + }, + { + "type": "web", + "url": "https://www.digitalhumanities.org/dhq/vol/17/1/000671/000671.html", "items": [ { "itemType": "journalArticle", + "title": "Introduction to Special Issue: Project Resiliency in the Digital Humanities", "creators": [ { - "firstName": "Wesley", - "lastName": "Beal", + "firstName": "Martin", + "lastName": "Holmes", + "creatorType": "author" + }, + { + "firstName": "Janelle", + "lastName": "Jenstad", + "creatorType": "author" + }, + { + "firstName": "J. Matthew", + "lastName": "Huculak", "creatorType": "author" } ], - "notes": [], - "tags": [], - "seeAlso": [], + "date": "2023", + "ISSN": "1938-4122", + "abstractNote": "This introduction to the Project Resiliency issue argues that we have work to do in getting projects to the point of being done and archivable. The Endings Project, a collaboration between three developers, three humanities scholars, and three librarians, arose from the maintenance burden accrued by the Humanities Computing and Media Centre at the University of Victoria and our desire to design projects that, from their inception, are ready for long-term archiving. After describing the events leading up to the Endings Symposium and briefly summarizing the articles in this issue, we discuss the necessity of a culture of constraint if we wish to preserve digital humanities projects in the same way that libraries preserve books.", + "issue": "1", + "libraryCatalog": "Digital Humanities Quarterly", + "publicationTitle": "Digital Humanities Quarterly", + "rights": "Creative Commons Attribution-NoDerivatives 4.0 International License", + "shortTitle": "Introduction to Special Issue", + "url": "https://www.digitalhumanities.org/dhq/vol/17/1/000671/000671.html", + "volume": "17", "attachments": [ { - "url": "http://www.digitalhumanities.org/dhq/vol/5/2/000094/000094.html", - "title": "DHQ Snapshot", - "mimeType": "text/html" + "title": "Full Text PDF", + "mimeType": "application/pdf" } ], - "url": "http://www.digitalhumanities.org/dhq/vol/5/2/000094/000094.html", - "title": "Network Narration in John Dos Passos’s U.S.A. Trilogy", - "date": "2011", - "volume": "5", - "issue": "2", - "libraryCatalog": "Digital Humanities Quarterly", - "accessDate": "CURRENT_TIMESTAMP" + "tags": [], + "notes": [], + "seeAlso": [] } ] }, { "type": "web", - "url": "http://www.digitalhumanities.org/dhq/vol/5/1/index.html", - "items": "multiple" + "url": "https://www.digitalhumanities.org/dhq/vol/17/2/000699/000699.html", + "items": [ + { + "itemType": "journalArticle", + "title": "ᐊᒐᐦᑭᐯᐦᐃᑲᓇ ᒫᒥᑐᓀᔨᐦᐃᒋᑲᓂᐦᑳᓂᕽ | acahkipehikana mâmitoneyihicikanihkânihk | Programming with Cree# and Ancestral Code: Nehiyawewin Spirit Markings in an Artificial Brain", + "creators": [ + { + "firstName": "Jon", + "lastName": "Corbett", + "creatorType": "author" + } + ], + "date": "2023", + "ISSN": "1938-4122", + "abstractNote": "In this article, I discuss my project “Ancestral Code”, which consists of an integrated development environment (IDE) and the Nehiyaw (Plains Cree) based programming languages called Cree# (pronounced: Cree-Sharp) and ᐊᒋᒧ (âcimow). These languages developed in response to western perspectives on human-computer relationships, which I challenge and reframe in Nehiyaw/Indigenous contexts.", + "issue": "2", + "libraryCatalog": "Digital Humanities Quarterly", + "publicationTitle": "Digital Humanities Quarterly", + "rights": "Creative Commons Attribution-NoDerivatives 4.0 International License", + "shortTitle": "ᐊᒐᐦᑭᐯᐦᐃᑲᓇ ᒫᒥᑐᓀᔨᐦᐃᒋᑲᓂᐦᑳᓂᕽ | acahkipehikana mâmitoneyihicikanihkânihk | Programming with Cree# and Ancestral Code", + "url": "https://www.digitalhumanities.org/dhq/vol/17/2/000699/000699.html", + "volume": "17", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] -/** END TEST CASES **/ \ No newline at end of file +/** END TEST CASES **/ From c140b805886f37e6021b8b62925e41f23f994007 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Fri, 17 May 2024 16:20:43 -0400 Subject: [PATCH 065/158] Update Datacite JSON (#3280) --- DOI Content Negotiation.js | 45 ++-- DOI.js | 11 +- Datacite JSON.js | 445 ++++++++++++++++++++++++++++++++++++- 3 files changed, 467 insertions(+), 34 deletions(-) diff --git a/DOI Content Negotiation.js b/DOI Content Negotiation.js index fa4e9a090b8..0679000d6d5 100644 --- a/DOI Content Negotiation.js +++ b/DOI Content Negotiation.js @@ -8,7 +8,7 @@ "priority": 100, "inRepository": true, "translatorType": 8, - "lastUpdated": "2023-09-22 09:54:11" + "lastUpdated": "2024-03-22 04:02:26" } /* @@ -132,13 +132,13 @@ var testCases = [ "title": "Code criminel de l'empereur Charles V vulgairement appellé la Caroline contenant les loix qui sont suivies dans les jurisdictions criminelles de l'Empire et à l'usage des conseils de guerre des troupes suisses.", "creators": [ { - "firstName": "", "lastName": "Heiliges Römisches Reich Deutscher Nation", - "creatorType": "author" + "creatorType": "author", + "fieldMode": 1 }, { - "firstName": "Franz Adam. Éditeur Scientifique", "lastName": "Vogel", + "firstName": "Franz Adam. Éditeur Scientifique", "creatorType": "contributor" }, { @@ -147,26 +147,29 @@ var testCases = [ "creatorType": "contributor" }, { - "firstName": "", "lastName": "Université De Lorraine-Direction De La Documentation Et De L'Edition", - "creatorType": "contributor" + "creatorType": "contributor", + "fieldMode": 1 } ], "date": "1734", - "DOI": "10.12763/ona1045", - "accessDate": "2019-02-02T02:31:57Z", - "language": "fre", + "DOI": "10.12763/ONA1045", + "language": "fr", "libraryCatalog": "DOI.org (Datacite)", "pages": "39.79 MB, 402 pages", - "relations": [], "url": "http://docnum.univ-lorraine.fr/pulsar/RCR_543952102_NA1045.pdf", "attachments": [], "tags": [ - "Droit" + { + "tag": "Droit" + } ], "notes": [ - "

Other

\nLe code est accompagné de commentaires de F. A. Vogel, qui signe l'épitre dédicatoire

Other

\nReliure 18è siècle

Other

\nEx-libris manuscrit \"Ex libris Dufour\"" - ] + { + "note": "

Other

\nLe code est accompagné de commentaires de F. A. Vogel, qui signe l'épitre dédicatoire

Other

\nReliure 18è siècle

Other

\nEx-libris manuscrit \"Ex libris Dufour\"" + } + ], + "seeAlso": [] } ] }, @@ -181,24 +184,24 @@ var testCases = [ "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" + "creatorType": "author", + "firstName": "Paolo", + "lastName": "Muner" } ], "date": "01/2014", "DOI": "10.7336/academicus.2014.09.05", - "ISSN": "20793715", - "accessDate": "2019-02-02T03:28:48Z", + "ISSN": "20793715, 23091088", + "abstractNote": "The complicated, troubled and tragic events of a wealthy family from Vlorë, Albania, which a century ago expanded its business to Italy, in Brindisi and Trieste, and whose grand land tenures and financial properties in Albania were nationalized by Communism after the Second World War. Hence the life-long solitary and hopeless fight of the last heir of the family to reconquer his patrimony that had been nationalized by Communism. Such properties would have been endowed to a planned foundation, which aims at perpetuating the memory of his brother, who was active in the resistance movement during the war and therefore hung by the Germans. His main institutional purpose is to help students from the Vlorë area to attend the University of Trieste. The paper is a travel in time through history, sociology and the consolidation of a state’s fundamentals, by trying to read the past aiming to understand the presence and save the future. The paper highlights the need to consider past models of social solidarity meanwhile renewing the actual one. This as a re-establishment of rule and understanding, a strategy to cope with pressures to renegotiate the social contract, as a universal need, by considering the past’s experiences as a firm base for successful social interaction. All this, inside a story which in the first look seems to be too personal and narrow, meanwhile it highlights the present and the past in a natural organic connection, dedicated to a nation in continuous struggle for its social reconstruction.", "libraryCatalog": "DOI.org (Crossref)", "pages": "69-78", "publicationTitle": "Academicus International Scientific Journal", - "relations": [], - "url": "http://academicus.edu.al/?subpage=volumes&nr=9", + "url": "https://www.medra.org/servlet/MREngine?hdl=10.7336/academicus.2014.09.05", "volume": "9", "attachments": [], "tags": [], - "notes": [] + "notes": [], + "seeAlso": [] } ] }, diff --git a/DOI.js b/DOI.js index 1637c397de5..9a8d7a90f9b 100644 --- a/DOI.js +++ b/DOI.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-10-18 11:11:59" + "lastUpdated": "2024-03-22 04:01:25" } /* @@ -278,9 +278,10 @@ var testCases = [ { "type": "web", "url": "https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/BEJTMI", + "detectedItemType": "journalArticle", "items": [ { - "itemType": "document", + "itemType": "dataset", "title": "Transfer of 50 thousand improved genetically improved farmed tilapia (GIFT) fry to Nigeria", "creators": [ { @@ -296,14 +297,14 @@ var testCases = [ { "lastName": "WorldFish", "creatorType": "contributor", - "fieldMode": true + "fieldMode": 1 } ], "date": "2023", + "DOI": "10.7910/DVN/BEJTMI", "abstractNote": "The data contains the list of female broodstock that produced improved GIFT fry sent to Nigeria in three batches in 2022", - "extra": "Type: dataset\nDOI: 10.7910/DVN/BEJTMI", "libraryCatalog": "DOI.org (Datacite)", - "publisher": "Harvard Dataverse", + "repository": "Harvard Dataverse", "url": "https://dataverse.harvard.edu/citation?persistentId=doi:10.7910/DVN/BEJTMI", "attachments": [], "tags": [], diff --git a/Datacite JSON.js b/Datacite JSON.js index 508230703bf..8d42846788f 100644 --- a/Datacite JSON.js +++ b/Datacite JSON.js @@ -8,7 +8,7 @@ "priority": 100, "inRepository": true, "translatorType": 1, - "lastUpdated": "2023-07-06 12:34:43" + "lastUpdated": "2024-03-23 00:20:22" } /* @@ -59,7 +59,7 @@ function parseInput() { function detectImport() { var parsedData = parseInput(); - if (parsedData && parsedData.schemaVersion && parsedData.schemaVersion.startsWith("http://datacite.org/schema/")) { + if (parsedData && (parsedData.schemaVersion && parsedData.schemaVersion.startsWith("http://datacite.org/schema/") || /datacite/i.test(parsedData.agency))) { return true; } return false; @@ -67,6 +67,7 @@ function detectImport() { /* eslint-disable camelcase*/ var mappingTypes = { + article: "preprint", book: "book", chapter: "bookSection", "article-journal": "journalArticle", @@ -106,12 +107,17 @@ function doImport() { var data = parseInput(); var type = "journalArticle"; + // we're using the citeproc mapping for pre v4 DataCite Kernel if (data.types.citeproc && mappingTypes[data.types.citeproc]) { type = mappingTypes[data.types.citeproc]; } if (["softwaresourcecode", "softwareapplication", "mobileapplication", "videogame", "webapplication"].includes(data.types.schemaOrg.toLowerCase())) { type = "computerProgram"; } + if (data.types.resourceTypeGeneral == "BookChapter") { + // for some reason datacite maps some BookChapters to citeproc article + type = "bookSection"; + } var item = new Zotero.Item(type); if (data.types.citeproc == "dataset" && datasetType == "document") { @@ -178,9 +184,12 @@ function doImport() { } } } - - item.publisher = data.publisher; - + if (typeof (data.publisher) == "object") { + item.publisher = data.publisher.name; + } + else { + item.publisher = data.publisher; + } let dates = {}; if (data.dates) { for (let date of data.dates) { @@ -212,7 +221,7 @@ function doImport() { if (data.sizes) { item.pages = item.artworkSize = data.sizes.join(", "); } - item.versionNumber = data.version; + item.version = data.version; if (data.rightsList) { item.rights = data.rightsList.map(x => x.rights).join(", "); } @@ -249,7 +258,68 @@ function doImport() { } } } - + if (data.relatedItems) { + for (let container of data.relatedItems) { + // For containers following Metadata Kernel 4.4 update + if (container.relationType == "IsPublishedIn") { + // we only grab the container info for IsPublishedIn, i.e. mostly books for chapter & journals + item.volume = container.volume; + if (container.titles) { + if (Array.isArray(container.titles) && container.titles.length) { + item.publicationTitle = container.titles[0].title; + } + else { + item.publicationTitle = container.titles.title; + } + } + if (container.relatedItemIdentifier) { + if (container.relatedItemIdentifier.relatedItemIdentifierType == "ISSN") { + item.ISSN = container.relatedItemIdentifier.relatedItemIdentifier; + } + else if (container.relatedItemIdentifier.relatedItemIdentifierType == "ISBN") { + item.ISBN = container.relatedItemIdentifier.relatedItemIdentifier; + } + } + item.issue = container.issue; + if (container.publicationYear) { + item.date = container.publicationYear; + } + if (container.firstPage && container.lastPage) { + item.pages = container.firstPage + "-" + container.lastPage; + } + else { + item.pages = (container.firstPage || "") + (container.lastPage || ""); + } + + item.edition = container.edition; + if (container.contributor && Array.isArray(container.contributor)) { + for (let contributor of container.contributor) { + let role = "contributor"; + if (contributor.contributorType == "Editor") { + role = "editor"; + } + 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, true)); + } + else { + item.creators.push({ lastName: contributor.name, creatorType: role, fieldMode: 1 }); + } + } + } + break; + } + else { + continue; + } + } + } if (data.relatedIdentifiers) { for (let relates of data.relatedIdentifiers) { if (!item.ISSN && relates.relatedIdentifierType == "ISSN") { @@ -260,7 +330,9 @@ function doImport() { } } } - + // remove duplicate creators (they'll have had multiple roles in datacite metadata) + let uniqueCreatorSet = new Set(item.creators.map(JSON.stringify)); + item.creators = Array.from(uniqueCreatorSet).map(JSON.parse); item.complete(); } @@ -569,6 +641,363 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "import", + "input": "{\r\n \"id\": \"https://doi.org/10.17885/heiup.jts.2018.1-2.23812\",\r\n \"doi\": \"10.17885/heiup.jts.2018.1-2.23812\",\r\n \"url\": \"https://heiup.uni-heidelberg.de/journals/index.php/transcultural/article/view/23812\",\r\n \"types\": {\r\n \"resourceTypeGeneral\": \"Text\",\r\n \"resourceType\": \"Article\",\r\n \"schemaOrg\": \"ScholarlyArticle\",\r\n \"citeproc\": \"article-journal\",\r\n \"bibtex\": \"article\",\r\n \"ris\": \"RPRT\"\r\n },\r\n \"creators\": [\r\n {\r\n \"nameType\": \"Personal\",\r\n \"name\": \"Gadkar-Wilcox, Wynn\",\r\n \"givenName\": \"Wynn\",\r\n \"familyName\": \"Gadkar-Wilcox\"\r\n }\r\n ],\r\n \"titles\": [\r\n {\r\n \"title\": \"Universality, Modernity and Cultural Borrowing Among Vietnamese Intellectuals, 1877–1919\"\r\n }\r\n ],\r\n \"publisher\": \"The Journal of Transcultural Studies\",\r\n \"container\": {\r\n \"type\": \"Series\",\r\n \"title\": \"The Journal of Transcultural Studies\",\r\n \"firstPage\": \"No 1\",\r\n \"lastPage\": \"2 (2018)\"\r\n },\r\n \"subjects\": [\r\n\r\n ],\r\n \"contributors\": [\r\n\r\n ],\r\n \"dates\": [\r\n {\r\n \"date\": \"2018-07-16\",\r\n \"dateType\": \"Submitted\"\r\n },\r\n {\r\n \"date\": \"2018-09-27\",\r\n \"dateType\": \"Accepted\"\r\n },\r\n {\r\n \"date\": \"2019-01-16\",\r\n \"dateType\": \"Updated\"\r\n },\r\n {\r\n \"date\": \"2018-12-20\",\r\n \"dateType\": \"Issued\"\r\n }\r\n ],\r\n \"publicationYear\": \"2018\",\r\n \"language\": \"en\",\r\n \"identifiers\": [\r\n {\r\n \"identifierType\": \"DOI\",\r\n \"identifier\": \"https://doi.org/10.17885/heiup.jts.2018.1-2.23812\"\r\n },\r\n {\r\n \"identifierType\": \"publisherId\",\r\n \"identifier\": \"22-2384-23812\"\r\n }\r\n ],\r\n \"sizes\": [\r\n \"33–52 Pages\"\r\n ],\r\n \"formats\": [\r\n\r\n ],\r\n \"rightsList\": [\r\n {\r\n \"rights\": \"This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.\",\r\n \"rightsUri\": \"http://creativecommons.org/licenses/by-nc/4.0\"\r\n }\r\n ],\r\n \"descriptions\": [\r\n {\r\n \"description\": \"After 1897, as the power of the Nguyen Monarchy was increasingly restricted by a centralizing administration in French Indochina, it sought to retain its relevance by grappling with reformist ideas, especially those associated with Xu Jiyu, Tan Sitong, and Liang Qichao. This paper examines the influence of those thinkers on the policy questions of 1877, 1904, and 1919 and proposes that even when the monarchy was defending more traditional ideas against reform, these new conceptions were fundamentally transforming the thinking of even more conservative elites.\",\r\n \"descriptionType\": \"Abstract\"\r\n },\r\n {\r\n \"description\": \"The Journal of Transcultural Studies, No 1-2 (2018)\",\r\n \"descriptionType\": \"SeriesInformation\"\r\n }\r\n ],\r\n \"geoLocations\": [\r\n\r\n ],\r\n \"fundingReferences\": [\r\n\r\n ],\r\n \"relatedIdentifiers\": [\r\n\r\n ],\r\n \"schemaVersion\": \"http://datacite.org/schema/kernel-4\",\r\n \"providerId\": \"gesis\",\r\n \"clientId\": \"gesis.ubhd\",\r\n \"agency\": \"DataCite\",\r\n \"state\": \"findable\"\r\n}", + "items": [ + { + "itemType": "journalArticle", + "title": "Universality, Modernity and Cultural Borrowing Among Vietnamese Intellectuals, 1877–1919", + "creators": [ + { + "lastName": "Gadkar-Wilcox", + "firstName": "Wynn", + "creatorType": "author" + } + ], + "date": "2018-12-20", + "DOI": "10.17885/heiup.jts.2018.1-2.23812", + "abstractNote": "After 1897, as the power of the Nguyen Monarchy was increasingly restricted by a centralizing administration in French Indochina, it sought to retain its relevance by grappling with reformist ideas, especially those associated with Xu Jiyu, Tan Sitong, and Liang Qichao. This paper examines the influence of those thinkers on the policy questions of 1877, 1904, and 1919 and proposes that even when the monarchy was defending more traditional ideas against reform, these new conceptions were fundamentally transforming the thinking of even more conservative elites.", + "language": "en", + "pages": "33–52 Pages", + "publicationTitle": "The Journal of Transcultural Studies", + "rights": "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.", + "url": "https://heiup.uni-heidelberg.de/journals/index.php/transcultural/article/view/23812", + "attachments": [], + "tags": [], + "notes": [ + { + "note": "

SeriesInformation

\nThe Journal of Transcultural Studies, No 1-2 (2018)" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "import", + "input": "{\r\n \"id\": \"https://doi.org/10.5281/zenodo.5513598\",\r\n \"doi\": \"10.5281/ZENODO.5513598\",\r\n \"url\": \"https://zenodo.org/record/5513598\",\r\n \"types\": {\r\n \"ris\": \"GEN\",\r\n \"bibtex\": \"misc\",\r\n \"citeproc\": \"article\",\r\n \"schemaOrg\": \"CreativeWork\",\r\n \"resourceTypeGeneral\": \"Preprint\"\r\n },\r\n \"creators\": [\r\n {\r\n \"name\": \"Walsh, Michael\",\r\n \"givenName\": \"Michael\",\r\n \"familyName\": \"Walsh\",\r\n \"affiliation\": [\r\n {\r\n \"name\": \"Sorbonne University Abu Dhabi\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"titles\": [\r\n {\r\n \"title\": \"Non-healthcare occupational exposure to SARS-CoV-2 across industries in the United States before March 2020: a dataset generating protocol\"\r\n }\r\n ],\r\n \"publisher\": {\r\n \"name\": \"Zenodo\"\r\n },\r\n \"container\": {\r\n \"type\": \"Series\",\r\n \"identifier\": \"https://zenodo.org/communities/covid-19\",\r\n \"identifierType\": \"URL\"\r\n },\r\n \"subjects\": [\r\n {\r\n \"subject\": \"applied epidemiology\"\r\n },\r\n {\r\n \"subject\": \"COVID-19\"\r\n },\r\n {\r\n \"subject\": \"SARS-CoV-2\"\r\n },\r\n {\r\n \"subject\": \"emerging infectious disease\"\r\n },\r\n {\r\n \"subject\": \"global health\"\r\n },\r\n {\r\n \"subject\": \"occupational health\"\r\n },\r\n {\r\n \"subject\": \"environmental health\"\r\n },\r\n {\r\n \"subject\": \"pandemic\"\r\n },\r\n {\r\n \"subject\": \"united states\"\r\n }\r\n ],\r\n \"contributors\": [],\r\n \"dates\": [\r\n {\r\n \"date\": \"2021-09-17\",\r\n \"dateType\": \"Issued\"\r\n }\r\n ],\r\n \"publicationYear\": 2021,\r\n \"language\": \"en\",\r\n \"identifiers\": [\r\n {\r\n \"identifier\": \"https://zenodo.org/record/5513598\",\r\n \"identifierType\": \"URL\"\r\n }\r\n ],\r\n \"sizes\": [],\r\n \"formats\": [],\r\n \"version\": \"1.0\",\r\n \"rightsList\": [\r\n {\r\n \"rights\": \"Creative Commons Attribution 4.0 International\",\r\n \"rightsUri\": \"https://creativecommons.org/licenses/by/4.0/legalcode\",\r\n \"schemeUri\": \"https://spdx.org/licenses/\",\r\n \"rightsIdentifier\": \"cc-by-4.0\",\r\n \"rightsIdentifierScheme\": \"SPDX\"\r\n },\r\n {\r\n \"rights\": \"Open Access\",\r\n \"rightsUri\": \"info:eu-repo/semantics/openAccess\"\r\n }\r\n ],\r\n \"descriptions\": [\r\n {\r\n \"description\": \"This dataset generating protocol provides a way to establish baseline measures for non- healthcare occupational exposure to SARS-CoV-2 across Census coded industries in the United States before March 2020. These estimates will be derived from the following data sources. The SARS-CoV-2 Occupational Exposure Risk Matrix (SOEM) will provide baseline estimates for non- healthcare occupational exposure to SARS-CoV-2 across Census coded occupations in the United States before March 2020. The Employed Labor Force Query System (ELFQS) will provide employed worker population estimates for number of civilian workers above 15 years of age per Census occupation code per Census industry code from 2015 to 2019. By way of statistical methods, this dataset will extend the SOEM from the level of occupations to the level of industries. The baseline measures that will be introduced in this dataset should be of immediate use to policymakers, practitioners, and researchers seeking understand the risk of occupational exposure to SARS-CoV-2 across industries in the United States before March 2020. They should also prove useful to individuals and institutions seeking to understand the impact of later interventions designed to mitigate occupational exposure to SARS-CoV-2 across industries in the United States.\",\r\n \"descriptionType\": \"Abstract\"\r\n },\r\n {\r\n \"description\": \"{\\\"references\\\": [\\\"Getting your workplace ready for COVID-19. World Health Organization website. Accessed on September 5, 2021. URL=https://www.who.int/docs/default-source/coronaviruse/getting- workplace-ready-for-covid-19.pdf.\\\", \\\"Occupational Health Subcommittee Epidemiological Classification of COVID-19 Work- Relatedness and Documentation of Public-Facing Occupations. Council for State and Territorial Epidemiologists Website. Accessed on September 5, 2021. URL= https://www.cste.org/resource/resmgr/occupationalhealth/publications/OH_Docs.zip.\\\", \\\"About O*NET. Occupational Information Network website. Accessed on September 5, 2021. URL=https://www.onetcenter.org/overview.html.\\\", \\\"Technical information. Employed Labor Force (ELF) query system website. Last reviewed on October 2, 2020. Accessed on September 5, 2021. URL=https://wwwn.cdc.gov/Wisards/cps/cps_techinfo.aspx#tic2.\\\", \\\"Walsh M. Measuring non-healthcare occupational exposure to SARS-CoV-2 across occupational groups in the United States: Version 2. Protocols.io. dx.doi.org/10.17504/protocols.io.bw9gph3w.\\\"]}\",\r\n \"descriptionType\": \"Other\"\r\n }\r\n ],\r\n \"geoLocations\": [],\r\n \"fundingReferences\": [],\r\n \"relatedIdentifiers\": [\r\n {\r\n \"relationType\": \"IsVersionOf\",\r\n \"relatedIdentifier\": \"10.5281/zenodo.5513597\",\r\n \"relatedIdentifierType\": \"DOI\"\r\n },\r\n {\r\n \"relationType\": \"IsPartOf\",\r\n \"relatedIdentifier\": \"https://zenodo.org/communities/covid-19\",\r\n \"relatedIdentifierType\": \"URL\"\r\n }\r\n ],\r\n \"relatedItems\": [],\r\n \"schemaVersion\": \"http://datacite.org/schema/kernel-4\",\r\n \"providerId\": \"cern\",\r\n \"clientId\": \"cern.zenodo\",\r\n \"agency\": \"datacite\",\r\n \"state\": \"findable\"\r\n}", + "items": [ + { + "itemType": "preprint", + "title": "Non-healthcare occupational exposure to SARS-CoV-2 across industries in the United States before March 2020: a dataset generating protocol", + "creators": [ + { + "lastName": "Walsh", + "firstName": "Michael", + "creatorType": "author" + } + ], + "date": "2021-09-17", + "DOI": "10.5281/ZENODO.5513598", + "abstractNote": "This dataset generating protocol provides a way to establish baseline measures for non- healthcare occupational exposure to SARS-CoV-2 across Census coded industries in the United States before March 2020. These estimates will be derived from the following data sources. The SARS-CoV-2 Occupational Exposure Risk Matrix (SOEM) will provide baseline estimates for non- healthcare occupational exposure to SARS-CoV-2 across Census coded occupations in the United States before March 2020. The Employed Labor Force Query System (ELFQS) will provide employed worker population estimates for number of civilian workers above 15 years of age per Census occupation code per Census industry code from 2015 to 2019. By way of statistical methods, this dataset will extend the SOEM from the level of occupations to the level of industries. The baseline measures that will be introduced in this dataset should be of immediate use to policymakers, practitioners, and researchers seeking understand the risk of occupational exposure to SARS-CoV-2 across industries in the United States before March 2020. They should also prove useful to individuals and institutions seeking to understand the impact of later interventions designed to mitigate occupational exposure to SARS-CoV-2 across industries in the United States.", + "language": "en", + "repository": "Zenodo", + "rights": "Creative Commons Attribution 4.0 International, Open Access", + "url": "https://zenodo.org/record/5513598", + "attachments": [], + "tags": [ + { + "tag": "COVID-19" + }, + { + "tag": "SARS-CoV-2" + }, + { + "tag": "applied epidemiology" + }, + { + "tag": "emerging infectious disease" + }, + { + "tag": "environmental health" + }, + { + "tag": "global health" + }, + { + "tag": "occupational health" + }, + { + "tag": "pandemic" + }, + { + "tag": "united states" + } + ], + "notes": [ + { + "note": "

Other

\n{\"references\": [\"Getting your workplace ready for COVID-19. World Health Organization website. Accessed on September 5, 2021. URL=https://www.who.int/docs/default-source/coronaviruse/getting- workplace-ready-for-covid-19.pdf.\", \"Occupational Health Subcommittee Epidemiological Classification of COVID-19 Work- Relatedness and Documentation of Public-Facing Occupations. Council for State and Territorial Epidemiologists Website. Accessed on September 5, 2021. URL= https://www.cste.org/resource/resmgr/occupationalhealth/publications/OH_Docs.zip.\", \"About O*NET. Occupational Information Network website. Accessed on September 5, 2021. URL=https://www.onetcenter.org/overview.html.\", \"Technical information. Employed Labor Force (ELF) query system website. Last reviewed on October 2, 2020. Accessed on September 5, 2021. URL=https://wwwn.cdc.gov/Wisards/cps/cps_techinfo.aspx#tic2.\", \"Walsh M. Measuring non-healthcare occupational exposure to SARS-CoV-2 across occupational groups in the United States: Version 2. Protocols.io. dx.doi.org/10.17504/protocols.io.bw9gph3w.\"]}" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "import", + "input": "{\r\n \"id\": \"https://doi.org/10.48648/yhp7-0g75\",\r\n \"doi\": \"10.48648/YHP7-0G75\",\r\n \"url\": \"https://zmfp.de/beitraege/mathematikapps-fuer-die-grundschule-analysieren\",\r\n \"types\": {\r\n \"ris\": \"JOUR\",\r\n \"bibtex\": \"article\",\r\n \"citeproc\": \"article-journal\",\r\n \"schemaOrg\": \"ScholarlyArticle\",\r\n \"resourceTypeGeneral\": \"JournalArticle\"\r\n },\r\n \"creators\": [\r\n {\r\n \"name\": \"Walter, Daniel\",\r\n \"nameType\": \"Personal\",\r\n \"givenName\": \"Daniel\",\r\n \"familyName\": \"Walter\",\r\n \"affiliation\": [\r\n {\r\n \"name\": \"University of Bremen\",\r\n \"schemeUri\": \"https://ror.org\",\r\n \"affiliationIdentifier\": \"https://ror.org/04ers2y35\",\r\n \"affiliationIdentifierScheme\": \"ROR\"\r\n }\r\n ],\r\n \"nameIdentifiers\": []\r\n },\r\n {\r\n \"name\": \"Schwätzer, Ulrich\",\r\n \"nameType\": \"Personal\",\r\n \"givenName\": \"Ulrich\",\r\n \"familyName\": \"Schwätzer\",\r\n \"affiliation\": [\r\n {\r\n \"name\": \"University of Duisburg-Essen\",\r\n \"schemeUri\": \"https://ror.org\",\r\n \"affiliationIdentifier\": \"https://ror.org/04mz5ra38\",\r\n \"affiliationIdentifierScheme\": \"ROR\"\r\n }\r\n ],\r\n \"nameIdentifiers\": []\r\n }\r\n ],\r\n \"titles\": [\r\n {\r\n \"lang\": \"de\",\r\n \"title\": \"Mathematikapps für die Grundschule analysieren\",\r\n \"titleType\": null\r\n }\r\n ],\r\n \"publisher\": {\r\n \"name\": \"Gesellschaft für Didaktik der Mathematik e.V.\"\r\n },\r\n \"subjects\": [\r\n {\r\n \"subject\": \"FOS: Educational sciences\",\r\n \"valueUri\": \"\",\r\n \"schemeUri\": \"http://www.oecd.org/science/inno/38235147.pdf\",\r\n \"subjectScheme\": \"Fields of Science and Technology (FOS)\",\r\n \"classificationCode\": \"5.3\"\r\n }\r\n ],\r\n \"contributors\": [],\r\n \"dates\": [],\r\n \"publicationYear\": 2023,\r\n \"language\": \"de\",\r\n \"identifiers\": [],\r\n \"sizes\": [],\r\n \"formats\": [],\r\n \"rightsList\": [\r\n {\r\n \"rights\": \"Creative Commons Attribution Share Alike 4.0 International\",\r\n \"rightsUri\": \"https://creativecommons.org/licenses/by-sa/4.0/legalcode\",\r\n \"schemeUri\": \"https://spdx.org/licenses/\",\r\n \"rightsIdentifier\": \"cc-by-sa-4.0\",\r\n \"rightsIdentifierScheme\": \"SPDX\"\r\n }\r\n ],\r\n \"descriptions\": [\r\n {\r\n \"lang\": null,\r\n \"description\": \"Die Nutzung digitaler Medien ist derzeit nicht nur bezogen auf den Mathematik-unterricht der Grundschule ein Schwerpunktthema der schulischen Bildung. Dabei wird vor allem der Einsatz von Apps kontrovers diskutiert. Während auf der einen Seite von empirisch erprobten Positivbeispielen berichtet wird, so stehen auf der anderen Seite zahlreiche Apps in der Kritik. Dieser Artikel befasst sich mit der Frage, inwiefern eine kriteriengeleitete Analyse des Bestandes von Mathema-tik–apps sowohl Anliegen der Praxis als auch der Forschung unterstützen kann. Hierzu wird im Theorieteil zunächst der Forschungsstand zur Einschätzung von Mathematikapps dargelegt. Nachdem bestehende Forschungserkenntnisse berich-tet und Kriterien zur Analyse von Apps begründet dargelegt werden, erfolgt die Darstellung von Ergebnissen einer Analyse von 227 Mathematikapps. Die Überle-gungen münden in eine kritische Diskussion, die eine Zusammenfassung der Ergebnisse, Konsequenzen für die Praxis und Forschung sowie Ausführungen zu Grenzen des Beitrags enthält. \",\r\n \"descriptionType\": \"Abstract\"\r\n }\r\n ],\r\n \"geoLocations\": [],\r\n \"fundingReferences\": [],\r\n \"relatedIdentifiers\": [],\r\n \"relatedItems\": [\r\n {\r\n \"titles\": [\r\n {\r\n \"title\": \"Zeitschrift für Mathematikdidaktik in Forschung und Praxis\"\r\n }\r\n ],\r\n \"volume\": \"4\",\r\n \"relationType\": \"IsPublishedIn\",\r\n \"publicationYear\": \"2023\",\r\n \"relatedItemType\": \"Journal\",\r\n \"relatedItemIdentifier\": {\r\n \"relatedItemIdentifier\": \"2701-9012\",\r\n \"relatedItemIdentifierType\": \"ISSN\"\r\n }\r\n }\r\n ],\r\n \"schemaVersion\": \"http://datacite.org/schema/kernel-4\",\r\n \"providerId\": \"uyzi\",\r\n \"clientId\": \"uyzi.zmfp\",\r\n \"agency\": \"datacite\",\r\n \"state\": \"findable\"\r\n}", + "items": [ + { + "itemType": "journalArticle", + "title": "Mathematikapps für die Grundschule analysieren", + "creators": [ + { + "lastName": "Walter", + "firstName": "Daniel", + "creatorType": "author" + }, + { + "lastName": "Schwätzer", + "firstName": "Ulrich", + "creatorType": "author" + } + ], + "date": "2023", + "DOI": "10.48648/YHP7-0G75", + "ISSN": "2701-9012", + "abstractNote": "Die Nutzung digitaler Medien ist derzeit nicht nur bezogen auf den Mathematik-unterricht der Grundschule ein Schwerpunktthema der schulischen Bildung. Dabei wird vor allem der Einsatz von Apps kontrovers diskutiert. Während auf der einen Seite von empirisch erprobten Positivbeispielen berichtet wird, so stehen auf der anderen Seite zahlreiche Apps in der Kritik. Dieser Artikel befasst sich mit der Frage, inwiefern eine kriteriengeleitete Analyse des Bestandes von Mathema-tik–apps sowohl Anliegen der Praxis als auch der Forschung unterstützen kann. Hierzu wird im Theorieteil zunächst der Forschungsstand zur Einschätzung von Mathematikapps dargelegt. Nachdem bestehende Forschungserkenntnisse berich-tet und Kriterien zur Analyse von Apps begründet dargelegt werden, erfolgt die Darstellung von Ergebnissen einer Analyse von 227 Mathematikapps. Die Überle-gungen münden in eine kritische Diskussion, die eine Zusammenfassung der Ergebnisse, Konsequenzen für die Praxis und Forschung sowie Ausführungen zu Grenzen des Beitrags enthält.", + "language": "de", + "publicationTitle": "Zeitschrift für Mathematikdidaktik in Forschung und Praxis", + "rights": "Creative Commons Attribution Share Alike 4.0 International", + "url": "https://zmfp.de/beitraege/mathematikapps-fuer-die-grundschule-analysieren", + "volume": "4", + "attachments": [], + "tags": [ + { + "tag": "FOS: Educational sciences" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "import", + "input": "{\r\n \"id\": \"https://doi.org/10.48548/pubdata-155\",\r\n \"doi\": \"10.48548/PUBDATA-155\",\r\n \"url\": \"https://pubdata.leuphana.de/handle/20.500.14123/175\",\r\n \"types\": {\r\n \"ris\": \"CHAP\",\r\n \"bibtex\": \"inbook\",\r\n \"citeproc\": \"chapter\",\r\n \"schemaOrg\": \"Chapter\",\r\n \"resourceType\": \"BookChapter\",\r\n \"resourceTypeGeneral\": \"BookChapter\"\r\n },\r\n \"creators\": [\r\n {\r\n \"name\": \"Barron, Anne\",\r\n \"nameType\": \"Personal\",\r\n \"givenName\": \"Anne\",\r\n \"familyName\": \"Barron\",\r\n \"affiliation\": [\r\n {\r\n \"name\": \"Institute of English Studies (IES), Leuphana Universität Lüneburg\",\r\n \"affiliationIdentifier\": \"https://ror.org/02w2y2t16\",\r\n \"affiliationIdentifierScheme\": \"ROR\"\r\n }\r\n ],\r\n \"nameIdentifiers\": [\r\n {\r\n \"schemeUri\": \"https://orcid.org\",\r\n \"nameIdentifier\": \"https://orcid.org/0000-0003-2962-7985\",\r\n \"nameIdentifierScheme\": \"ORCID\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"titles\": [\r\n {\r\n \"title\": \"Sorry Miss, I Completely Forgot about It\"\r\n },\r\n {\r\n \"title\": \"Apologies and Vocatives in Ireland and England\",\r\n \"titleType\": \"Subtitle\"\r\n }\r\n ],\r\n \"publisher\": {\r\n \"name\": \"Medien- und Informationszentrum, Leuphana Universität Lüneburg\"\r\n },\r\n \"container\": {},\r\n \"subjects\": [],\r\n \"contributors\": [\r\n {\r\n \"name\": \"Medien- Und Informationszentrum\",\r\n \"nameType\": \"Organizational\",\r\n \"affiliation\": [\r\n {\r\n \"name\": \"Leuphana Universität Lüneburg\",\r\n \"affiliationIdentifier\": \"https://ror.org/02w2y2t16\",\r\n \"affiliationIdentifierScheme\": \"ROR\"\r\n }\r\n ],\r\n \"contributorType\": \"DataCurator\",\r\n \"nameIdentifiers\": []\r\n },\r\n {\r\n \"name\": \"Medien- Und Informationszentrum\",\r\n \"nameType\": \"Organizational\",\r\n \"affiliation\": [\r\n {\r\n \"name\": \"Leuphana Universität Lüneburg\",\r\n \"affiliationIdentifier\": \"https://ror.org/02w2y2t16\",\r\n \"affiliationIdentifierScheme\": \"ROR\"\r\n }\r\n ],\r\n \"contributorType\": \"DataManager\",\r\n \"nameIdentifiers\": []\r\n },\r\n {\r\n \"name\": \"Medien- Und Informationszentrum\",\r\n \"nameType\": \"Organizational\",\r\n \"affiliation\": [\r\n {\r\n \"name\": \"Leuphana Universität Lüneburg\",\r\n \"affiliationIdentifier\": \"https://ror.org/02w2y2t16\",\r\n \"affiliationIdentifierScheme\": \"ROR\"\r\n }\r\n ],\r\n \"contributorType\": \"HostingInstitution\",\r\n \"nameIdentifiers\": []\r\n },\r\n {\r\n \"name\": \"Technische Informationsbibliothek (TIB) Hannover\",\r\n \"nameType\": \"Organizational\",\r\n \"affiliation\": [\r\n {\r\n \"name\": \"Niedersächsische Ministerium für Wissenschaft und Kultur\",\r\n \"affiliationIdentifier\": \"https://ror.org/0116z8r77\",\r\n \"affiliationIdentifierScheme\": \"ROR\"\r\n }\r\n ],\r\n \"contributorType\": \"RegistrationAgency\",\r\n \"nameIdentifiers\": [\r\n {\r\n \"schemeUri\": \"https://ror.org\",\r\n \"nameIdentifier\": \"https://ror.org/04aj4c181\",\r\n \"nameIdentifierScheme\": \"ROR\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"dates\": [\r\n {\r\n \"date\": \"2024-02-27\",\r\n \"dateType\": \"Accepted\"\r\n },\r\n {\r\n \"date\": \"2021-11-30\",\r\n \"dateType\": \"Issued\"\r\n },\r\n {\r\n \"date\": \"2024-02-27\",\r\n \"dateType\": \"Submitted\"\r\n },\r\n {\r\n \"date\": \"2024-02-27\",\r\n \"dateType\": \"Available\"\r\n }\r\n ],\r\n \"publicationYear\": 2024,\r\n \"language\": \"en\",\r\n \"identifiers\": [\r\n {\r\n \"identifier\": \"https://hdl.handle.net/20.500.14123/175\",\r\n \"identifierType\": \"Handle\"\r\n },\r\n {\r\n \"identifier\": \"https://nbn-resolving.org/urn:nbn:de:gbv:luen4-dspace-20.500.14123/175-7\",\r\n \"identifierType\": \"URN\"\r\n }\r\n ],\r\n \"sizes\": [\r\n \"741001 b\"\r\n ],\r\n \"formats\": [\r\n \"application/pdf\"\r\n ],\r\n \"version\": \"1\",\r\n \"rightsList\": [\r\n {\r\n \"rights\": \"Anonymous\"\r\n },\r\n {\r\n \"lang\": \"en-US\",\r\n \"rights\": \"Creative Commons Attribution 4.0 International\",\r\n \"rightsUri\": \"https://creativecommons.org/licenses/by/4.0/legalcode\",\r\n \"schemeUri\": \"https://spdx.org/licenses/\",\r\n \"rightsIdentifier\": \"cc-by-4.0\",\r\n \"rightsIdentifierScheme\": \"SPDX\"\r\n }\r\n ],\r\n \"descriptions\": [\r\n {\r\n \"description\": \"The study of the pragmatics of Irish English is a recent endeavour. Since its beginnings, a substantial amount of scholarship has been conducted in a cross-varietal design with the aim of highlighting shared and specific features of Irish English vis-à-vis other varieties of English. A particular focus of such variational pragmatic research has been on speech act realisations. Cross-varietal studies on apologies in Irish English remain, however, limited. The present chapter addresses this research gap in the study of apologies in Irish English. It takes a variational pragmatic approach to the study of remedial apologies, contrasting apologies in Irish English and in English English empirically using comparable data . Specifically, production questionnaire data is investigated and norms of appropriate verbal apologetic behaviour contrasted. The analysis centres on the apology strategies and modification employed across varieties and on their linguistic realisations, and a particular focus is placed on the cross-varietal use of alerters and vocatives in apologising. Findings point to the universality of apology strategies, while also revealing variety-preferential pragmatic differences. Specifically, the Irish English data reveals a higher use of vocatives, many playing a relational function in the data, and thus suggesting higher levels of relational orientation in the Irish English data relative to the English English data. In addition, a higher use of upgrading strategies and explanations, many communicating an active speaker role, is recorded in the Irish English data pointing to a comparatively higher redress of speakers’ loss of positive face.\",\r\n \"descriptionType\": \"Abstract\"\r\n }\r\n ],\r\n \"geoLocations\": [],\r\n \"fundingReferences\": [],\r\n \"relatedIdentifiers\": [\r\n {\r\n \"relationType\": \"IsVariantFormOf\",\r\n \"relatedIdentifier\": \"10.4324/9781003025078-6\",\r\n \"relatedIdentifierType\": \"DOI\"\r\n },\r\n {\r\n \"relationType\": \"IsPublishedIn\",\r\n \"relatedIdentifier\": \"978-0-367-85639-7\",\r\n \"relatedIdentifierType\": \"ISBN\"\r\n }\r\n ],\r\n \"relatedItems\": [\r\n {\r\n \"titles\": [\r\n {\r\n \"title\": \"Expanding the Landscapes of Irish English Research\"\r\n }\r\n ],\r\n \"creators\": [],\r\n \"lastPage\": \"128\",\r\n \"firstPage\": \"109\",\r\n \"publisher\": \"Routledge\",\r\n \"contributors\": [],\r\n \"relationType\": \"IsPublishedIn\",\r\n \"publicationYear\": \"2022\",\r\n \"relatedItemType\": \"Book\",\r\n \"relatedItemIdentifier\": {\r\n \"relatedItemIdentifier\": \"10.4324/9781003025078-6\",\r\n \"relatedItemIdentifierType\": \"DOI\"\r\n }\r\n }\r\n ],\r\n \"schemaVersion\": \"http://datacite.org/schema/kernel-4\",\r\n \"providerId\": \"pvre\",\r\n \"clientId\": \"pvre.aqmlok\",\r\n \"agency\": \"datacite\",\r\n \"state\": \"findable\"\r\n}", + "items": [ + { + "itemType": "bookSection", + "title": "Sorry Miss, I Completely Forgot about It: Apologies and Vocatives in Ireland and England", + "creators": [ + { + "lastName": "Barron", + "firstName": "Anne", + "creatorType": "author" + }, + { + "lastName": "Medien- Und Informationszentrum", + "creatorType": "contributor", + "fieldMode": 1 + }, + { + "lastName": "Technische Informationsbibliothek (TIB) Hannover", + "creatorType": "contributor", + "fieldMode": 1 + } + ], + "date": "2022", + "ISBN": "978-0-367-85639-7", + "abstractNote": "The study of the pragmatics of Irish English is a recent endeavour. Since its beginnings, a substantial amount of scholarship has been conducted in a cross-varietal design with the aim of highlighting shared and specific features of Irish English vis-à-vis other varieties of English. A particular focus of such variational pragmatic research has been on speech act realisations. Cross-varietal studies on apologies in Irish English remain, however, limited. The present chapter addresses this research gap in the study of apologies in Irish English. It takes a variational pragmatic approach to the study of remedial apologies, contrasting apologies in Irish English and in English English empirically using comparable data . Specifically, production questionnaire data is investigated and norms of appropriate verbal apologetic behaviour contrasted. The analysis centres on the apology strategies and modification employed across varieties and on their linguistic realisations, and a particular focus is placed on the cross-varietal use of alerters and vocatives in apologising. Findings point to the universality of apology strategies, while also revealing variety-preferential pragmatic differences. Specifically, the Irish English data reveals a higher use of vocatives, many playing a relational function in the data, and thus suggesting higher levels of relational orientation in the Irish English data relative to the English English data. In addition, a higher use of upgrading strategies and explanations, many communicating an active speaker role, is recorded in the Irish English data pointing to a comparatively higher redress of speakers’ loss of positive face.", + "bookTitle": "Expanding the Landscapes of Irish English Research", + "extra": "DOI: 10.48548/PUBDATA-155", + "language": "en", + "pages": "109-128", + "publisher": "Medien- und Informationszentrum, Leuphana Universität Lüneburg", + "rights": "Anonymous, Creative Commons Attribution 4.0 International", + "url": "https://pubdata.leuphana.de/handle/20.500.14123/175", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "import", + "input": "{\r\n \"id\": \"https://doi.org/10.25656/01:28324\",\r\n \"doi\": \"10.25656/01:28324\",\r\n \"url\": \"https://www.pedocs.de/frontdoor.php?source_opus=28324\",\r\n \"types\": {\r\n \"ris\": \"CHAP\",\r\n \"bibtex\": \"misc\",\r\n \"citeproc\": \"article\",\r\n \"schemaOrg\": \"Chapter\",\r\n \"resourceTypeGeneral\": \"BookChapter\"\r\n },\r\n \"creators\": [\r\n {\r\n \"name\": \"Bonnet, Andreas\",\r\n \"givenName\": \"Andreas\",\r\n \"familyName\": \"Bonnet\",\r\n \"nameIdentifiers\": [\r\n {\r\n \"schemeUri\": \"https://www.dnb.de/gnd\",\r\n \"nameIdentifier\": \"122894715\",\r\n \"nameIdentifierScheme\": \"GND\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Bakels, Elena\",\r\n \"givenName\": \"Elena\",\r\n \"familyName\": \"Bakels\",\r\n \"nameIdentifiers\": [\r\n {\r\n \"schemeUri\": \"https://www.dnb.de/gnd\",\r\n \"nameIdentifier\": \"1204016224\",\r\n \"nameIdentifierScheme\": \"GND\"\r\n }\r\n ]\r\n },\r\n {\r\n \"name\": \"Hericks, Uwe\",\r\n \"givenName\": \"Uwe\",\r\n \"familyName\": \"Hericks\",\r\n \"nameIdentifiers\": [\r\n {\r\n \"schemeUri\": \"https://www.dnb.de/gnd\",\r\n \"nameIdentifier\": \"129263400\",\r\n \"nameIdentifierScheme\": \"GND\"\r\n }\r\n ]\r\n }\r\n ],\r\n \"titles\": [\r\n {\r\n \"lang\": \"de\",\r\n \"title\": \"Die Professionalisierung von Lehrpersonen aus praxeologischer Perspektive. Professionelles Handeln als Entscheiden\"\r\n }\r\n ],\r\n \"publisher\": {\r\n \"name\": \"Verlag Julius Klinkhardt : Bad Heilbrunn\"\r\n },\r\n \"subjects\": [\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"370 Education\",\r\n \"subjectScheme\": \"DDC\",\r\n \"classificationCode\": \"370\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"370 Erziehung, Schul- und Bildungswesen\",\r\n \"subjectScheme\": \"DDC\",\r\n \"classificationCode\": \"370\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Professionalität\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Professionalisierung\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Lehrer\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Lehramtsstudent\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Praxeologie\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Entscheidung\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Erwartung\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Habitus\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Norm\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Standardisierung\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Mathematikunterricht\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Englischunterricht\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"subject\": \"Pädagogisches Handeln\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Professionalism\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Professionality\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Professionalization\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Teacher\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Student teachers\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Expectancy\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Habits\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Standard setting\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Standards\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Mathematics lessons\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Teaching of mathematics\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"English language lessons\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Teaching of English\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"subject\": \"Mathematics\"\r\n },\r\n {\r\n \"subject\": \"FOS: Mathematics\",\r\n \"schemeUri\": \"http://www.oecd.org/science/inno/38235147.pdf\",\r\n \"subjectScheme\": \"Fields of Science and Technology (FOS)\"\r\n }\r\n ],\r\n \"contributors\": [\r\n {\r\n \"name\": \"DIPF | Leibniz-Institut für Bildungsforschung und Bildungsinformation\",\r\n \"nameType\": \"Organizational\",\r\n \"contributorType\": \"HostingInstitution\",\r\n \"nameIdentifiers\": {\r\n \"schemeUri\": \"https://ror.org\",\r\n \"nameIdentifier\": \"https://ror.org/0327sr118\",\r\n \"nameIdentifierScheme\": \"ROR\"\r\n }\r\n }\r\n ],\r\n \"dates\": [\r\n {\r\n \"date\": \"2023\",\r\n \"dateType\": \"Issued\"\r\n },\r\n {\r\n \"date\": \"2024-02-21\",\r\n \"dateType\": \"Updated\"\r\n }\r\n ],\r\n \"publicationYear\": 2023,\r\n \"language\": \"de\",\r\n \"identifiers\": [\r\n {\r\n \"identifier\": \"https://nbn-resolving.org/urn:nbn:de:0111-pedocs-283244\",\r\n \"identifierType\": \"URN\"\r\n }\r\n ],\r\n \"rightsList\": [\r\n {\r\n \"rights\": \"Creative Commons Namensnennung - Nicht kommerziell - Keine Bearbeitungen 4.0 International\",\r\n \"rightsUri\": \"http://creativecommons.org/licenses/by-nc-nd/4.0/deed.de\",\r\n \"rightsIdentifier\": \"cc by nc nd 4.0 international\"\r\n }\r\n ],\r\n \"descriptions\": [\r\n {\r\n \"description\": \"Hinzke, Jan-Hendrik [Hrsg.]; Keller-Schneider, Manuela [Hrsg.]: Professionalität und Professionalisierung von Lehrpersonen. Perspektiven, theoretische Rahmungen und empirische Zugänge. Bad Heilbrunn : Verlag Julius Klinkhardt 2023, S. 179-196. - (Studien zur Professionsforschung und Lehrer:innenbildung)\",\r\n \"descriptionType\": \"SeriesInformation\"\r\n },\r\n {\r\n \"lang\": \"de\",\r\n \"description\": \"Insbesondere rekonstruktive Untersuchungen haben die Bedeutsamkeit impliziter Wissensbestände für die Professionalisierung von Lehrpersonen herausgearbeitet. Diese Linie der Professionsforschung untersucht mit Hilfe soziologischer Theorien und rekonstruktiver Methoden, welchen Einfluss sozialisatorisch erworbene Wissensbestände und die Strukturen der Organisation Schule auf das Handeln von Lehrpersonen haben. Im Zentrum dieses Aufsatzes stehen die praxeologisch zentralen Begriffe Habitus und Norm sowie die systemtheoretische Konzeptualisierung von (organisationalem) Handeln als Umgang mit Kontingenz durch das Treffen von Entscheidungen. Die Ausführungen werden an ersten Daten aus dem Projekt Professionalisierung von Lehrpersonen der Fächer Mathematik und Englisch (ProME) illustriert. In diesem Projekt wird untersucht, wie Lehrpersonen der Fächer Mathematik und Englisch im Spannungsfeld von Habitus, Organisations- und Identitätsnormen zu ihren alltäglichen Handlungsentscheidungen kommen. (DIPF/Orig.)\",\r\n \"descriptionType\": \"Abstract\"\r\n },\r\n {\r\n \"lang\": \"en\",\r\n \"description\": \"Reconstructive research into teacher knowledge has established the crucial role of implicit knowledge. This line of enquiry uses sociological theories and interpretative methods to establish the impact of a-theoretical knowledge or narrative knowledge on teachers’ actions. In this paper we use the praxeological concepts of habitus and norm alongside the systemtheoretical notion of decision-making in order to conceptualize how individuals act in organizational contexts. We exemplify this with first data from our project Professionalisation of Teachers of Maths and English (ProME). This project examines, how teachers of Maths and English navigate the tensions between habitus, organizational norms, and identity-norms in their dairly decision-making. (DIPF/Orig.)\",\r\n \"descriptionType\": \"Abstract\"\r\n }\r\n ],\r\n \"relatedIdentifiers\": [\r\n {\r\n \"relationType\": \"IsVariantFormOf\",\r\n \"relatedIdentifier\": \"https://doi.org/10.35468/6043-09\",\r\n \"resourceTypeGeneral\": \"Text\",\r\n \"relatedIdentifierType\": \"DOI\"\r\n },\r\n {\r\n \"relationType\": \"IsPublishedIn\",\r\n \"relatedIdentifier\": \"978-3-7815-6043-7\",\r\n \"relatedIdentifierType\": \"ISBN\"\r\n },\r\n {\r\n \"relationType\": \"IsPublishedIn\",\r\n \"relatedIdentifier\": \"978-3-7815-2600-6 \",\r\n \"relatedIdentifierType\": \"ISBN\"\r\n }\r\n ],\r\n \"relatedItems\": [\r\n {\r\n \"issue\": \"\",\r\n \"titles\": {\r\n \"title\": \"Professionalität und Professionalisierung von Lehrpersonen. Perspektiven, theoretische Rahmungen und empirische Zugänge\"\r\n },\r\n \"volume\": \"Studien zur Professionsforschung und Lehrer:innenbildung\",\r\n \"lastPage\": \"196\",\r\n \"firstPage\": \"179\",\r\n \"publisher\": \"Verlag Julius Klinkhardt : Bad Heilbrunn\",\r\n \"relationType\": \"IsPublishedIn\",\r\n \"publicationYear\": \"2023\",\r\n \"relatedItemType\": \"Book\",\r\n \"relatedItemIdentifier\": {\r\n \"relatedItemIdentifier\": \"978-3-7815-6043-7\",\r\n \"relatedItemIdentifierType\": \"ISBN\"\r\n }\r\n }\r\n ],\r\n \"schemaVersion\": \"http://datacite.org/schema/kernel-4\",\r\n \"providerId\": \"mjvh\",\r\n \"clientId\": \"mjvh.pedocs\",\r\n \"agency\": \"datacite\",\r\n \"state\": \"findable\"\r\n}", + "items": [ + { + "itemType": "bookSection", + "title": "Die Professionalisierung von Lehrpersonen aus praxeologischer Perspektive. Professionelles Handeln als Entscheiden", + "creators": [ + { + "lastName": "Bonnet", + "firstName": "Andreas", + "creatorType": "author" + }, + { + "lastName": "Bakels", + "firstName": "Elena", + "creatorType": "author" + }, + { + "lastName": "Hericks", + "firstName": "Uwe", + "creatorType": "author" + }, + { + "lastName": "DIPF | Leibniz-Institut für Bildungsforschung und Bildungsinformation", + "creatorType": "contributor", + "fieldMode": 1 + } + ], + "date": "2023", + "ISBN": "978-3-7815-6043-7", + "abstractNote": "Reconstructive research into teacher knowledge has established the crucial role of implicit knowledge. This line of enquiry uses sociological theories and interpretative methods to establish the impact of a-theoretical knowledge or narrative knowledge on teachers’ actions. In this paper we use the praxeological concepts of habitus and norm alongside the systemtheoretical notion of decision-making in order to conceptualize how individuals act in organizational contexts. We exemplify this with first data from our project Professionalisation of Teachers of Maths and English (ProME). This project examines, how teachers of Maths and English navigate the tensions between habitus, organizational norms, and identity-norms in their dairly decision-making. (DIPF/Orig.)", + "bookTitle": "Professionalität und Professionalisierung von Lehrpersonen. Perspektiven, theoretische Rahmungen und empirische Zugänge", + "extra": "DOI: 10.25656/01:28324", + "language": "de", + "pages": "179-196", + "publisher": "Verlag Julius Klinkhardt : Bad Heilbrunn", + "rights": "Creative Commons Namensnennung - Nicht kommerziell - Keine Bearbeitungen 4.0 International", + "url": "https://www.pedocs.de/frontdoor.php?source_opus=28324", + "volume": "Studien zur Professionsforschung und Lehrer:innenbildung", + "attachments": [], + "tags": [ + { + "tag": "370 Education" + }, + { + "tag": "370 Erziehung, Schul- und Bildungswesen" + }, + { + "tag": "Englischunterricht" + }, + { + "tag": "English language lessons" + }, + { + "tag": "Entscheidung" + }, + { + "tag": "Erwartung" + }, + { + "tag": "Expectancy" + }, + { + "tag": "FOS: Mathematics" + }, + { + "tag": "Habits" + }, + { + "tag": "Habitus" + }, + { + "tag": "Lehramtsstudent" + }, + { + "tag": "Lehrer" + }, + { + "tag": "Mathematics" + }, + { + "tag": "Mathematics lessons" + }, + { + "tag": "Mathematikunterricht" + }, + { + "tag": "Norm" + }, + { + "tag": "Praxeologie" + }, + { + "tag": "Professionalisierung" + }, + { + "tag": "Professionalism" + }, + { + "tag": "Professionality" + }, + { + "tag": "Professionalität" + }, + { + "tag": "Professionalization" + }, + { + "tag": "Pädagogisches Handeln" + }, + { + "tag": "Standard setting" + }, + { + "tag": "Standardisierung" + }, + { + "tag": "Standards" + }, + { + "tag": "Student teachers" + }, + { + "tag": "Teacher" + }, + { + "tag": "Teaching of English" + }, + { + "tag": "Teaching of mathematics" + } + ], + "notes": [ + { + "note": "

SeriesInformation

\nHinzke, Jan-Hendrik [Hrsg.]; Keller-Schneider, Manuela [Hrsg.]: Professionalität und Professionalisierung von Lehrpersonen. Perspektiven, theoretische Rahmungen und empirische Zugänge. Bad Heilbrunn : Verlag Julius Klinkhardt 2023, S. 179-196. - (Studien zur Professionsforschung und Lehrer:innenbildung)" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "import", + "input": "{\r\n \"id\": \"https://doi.org/10.11588/arthistoricum.1141.c16127\",\r\n \"doi\": \"10.11588/ARTHISTORICUM.1141.C16127\",\r\n \"url\": \"https://books.ub.uni-heidelberg.de//arthistoricum/catalog/book/1141/chapter/16127\",\r\n \"types\": {\r\n \"ris\": \"CHAP\",\r\n \"bibtex\": \"misc\",\r\n \"citeproc\": \"article\",\r\n \"schemaOrg\": \"Chapter\",\r\n \"resourceType\": \"Chapter\",\r\n \"resourceTypeGeneral\": \"BookChapter\"\r\n },\r\n \"creators\": [\r\n {\r\n \"name\": \"Rasche, Adelheid\",\r\n \"nameType\": \"Personal\",\r\n \"givenName\": \"Adelheid\",\r\n \"familyName\": \"Rasche\",\r\n \"affiliation\": [],\r\n \"nameIdentifiers\": []\r\n },\r\n {\r\n \"name\": \"Großmann, G. Ulrich\",\r\n \"nameType\": \"Personal\",\r\n \"givenName\": \"G. Ulrich\",\r\n \"familyName\": \"Großmann\",\r\n \"affiliation\": [],\r\n \"nameIdentifiers\": []\r\n }\r\n ],\r\n \"titles\": [\r\n {\r\n \"title\": \"Luxury in Silk. Eighteenth-Century Fashion: English summary of the book Luxus in Seide\"\r\n },\r\n {\r\n \"title\": \"Luxury in Silk. Eighteenth-Century Fashion: English summary of the book Luxus in Seide\",\r\n \"titleType\": \"TranslatedTitle\"\r\n }\r\n ],\r\n \"publisher\": {\r\n \"name\": \"arthistoricum.net\"\r\n },\r\n \"container\": {\r\n \"type\": \"Series\",\r\n \"identifier\": \"10.11588/arthistoricum.1141\",\r\n \"identifierType\": \"DOI\"\r\n },\r\n \"subjects\": [\r\n {\r\n \"subject\": \"gnd/4054289-0\"\r\n },\r\n {\r\n \"subject\": \"gnd/4039792-0\"\r\n },\r\n {\r\n \"subject\": \"gnd/4031011-5\"\r\n }\r\n ],\r\n \"contributors\": [],\r\n \"dates\": [\r\n {\r\n \"date\": \"2023\",\r\n \"dateType\": \"Issued\"\r\n }\r\n ],\r\n \"publicationYear\": 2023,\r\n \"language\": \"de\",\r\n \"identifiers\": [],\r\n \"sizes\": [],\r\n \"formats\": [],\r\n \"rightsList\": [\r\n {\r\n \"rightsUri\": \"https://www.ub.uni-heidelberg.de/service/openaccess/lizenzen/freier-zugang.html\"\r\n }\r\n ],\r\n \"descriptions\": [],\r\n \"geoLocations\": [],\r\n \"fundingReferences\": [],\r\n \"relatedIdentifiers\": [\r\n {\r\n \"relationType\": \"IsPartOf\",\r\n \"relatedIdentifier\": \"10.11588/arthistoricum.1141\",\r\n \"relatedIdentifierType\": \"DOI\"\r\n }\r\n ],\r\n \"relatedItems\": [\r\n {\r\n \"titles\": [\r\n {\r\n \"title\": \"Luxus in Seide\"\r\n },\r\n {\r\n \"title\": \"Luxus in Seide\",\r\n \"titleType\": \"TranslatedTitle\"\r\n }\r\n ],\r\n \"creators\": [],\r\n \"contributors\": [],\r\n \"relationType\": \"IsPublishedIn\",\r\n \"relatedItemType\": \"Book\",\r\n \"relatedItemIdentifier\": {\r\n \"relatedItemIdentifier\": \"https://books.ub.uni-heidelberg.de//arthistoricum/catalog/book/1141\",\r\n \"relatedItemIdentifierType\": \"URL\"\r\n }\r\n }\r\n ],\r\n \"schemaVersion\": \"http://datacite.org/schema/kernel-4\",\r\n \"providerId\": \"vgzm\",\r\n \"clientId\": \"gesis.ubhd\",\r\n \"agency\": \"datacite\",\r\n \"state\": \"findable\"\r\n}", + "items": [ + { + "itemType": "bookSection", + "title": "Luxury in Silk. Eighteenth-Century Fashion: English summary of the book Luxus in Seide", + "creators": [ + { + "lastName": "Rasche", + "firstName": "Adelheid", + "creatorType": "author" + }, + { + "lastName": "Großmann", + "firstName": "G. Ulrich", + "creatorType": "author" + } + ], + "date": "2023", + "bookTitle": "Luxus in Seide", + "extra": "DOI: 10.11588/ARTHISTORICUM.1141.C16127", + "language": "de", + "publisher": "arthistoricum.net", + "url": "https://books.ub.uni-heidelberg.de//arthistoricum/catalog/book/1141/chapter/16127", + "attachments": [], + "tags": [ + { + "tag": "gnd/4031011-5" + }, + { + "tag": "gnd/4039792-0" + }, + { + "tag": "gnd/4054289-0" + } + ], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 6a0d413b798017387d2e0467cb46ba0f70f808ef Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 24 May 2024 13:09:02 -0400 Subject: [PATCH 066/158] Twitter: Quick fix for translation error We've lost URL unshortening on most versions of the site for now, but at least it doesn't error. They seem to be A/B testing, or maybe just randomizing, the way links are displayed. Sometimes (and *always* with an ad blocker enabled) I'm actually seeing links displayed in full on the page, without t.co shortening; without an ad blocker, it varies between that layout and one where the full URLs are nowhere in the page source, meaning there's likely no way for us to unshorten them. https://forums.zotero.org/discussion/114434/twitter-x-translator-extension-resorts-to-generic-embedded-metadata --- Twitter.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Twitter.js b/Twitter.js index 28b2e3698c5..528fd4c61bc 100644 --- a/Twitter.js +++ b/Twitter.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-04-05 08:16:53" + "lastUpdated": "2024-05-24 17:08:12" } /* @@ -38,6 +38,7 @@ let titleRe = /^(?:\(\d+\) )?(.+) .* (?:Twitter|X): .([\S\s]+). \/ (?:Twitter|X)/; +let domainRe = /https?:\/\/(?:www\.)?([^/]+)+/; function detectWeb(doc, url) { if (url.includes('/status/')) { @@ -61,7 +62,10 @@ function unshortenURLs(doc, str) { function unshortenURL(doc, tCoURL) { var a = doc.querySelector('a[href*="' + tCoURL + '"]'); - return (a ? a.textContent.replace(/…$/, '') : false) || tCoURL; + if (!a || !domainRe.test(a.textContent)) { + return tCoURL; + } + return a.textContent.replace(/…$/, ''); } function extractURLs(doc, str) { @@ -245,7 +249,7 @@ function scrape(doc, url) { title += " " + (i + 1); } // Include domain in parentheses - let domain = url.match(/https?:\/\/(?:www\.)?([^/]+)+/)[1]; + let domain = url.match(domainRe)[1]; if (domain != 't.co') { title += ` (${domain})`; } From 8f6c91b0d6a6d895170fd6c46b733bd2d8ad419b Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 29 May 2024 13:10:22 -0400 Subject: [PATCH 067/158] De Gruyter: Fix books being saved as sections https://forums.zotero.org/discussion/105177/zotero-connector-saving-book-as-book-chapter-from-de-gruyter --- De Gruyter.js | 64 +++++++++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/De Gruyter.js b/De Gruyter.js index 7972fc1fbe0..8489a8ab973 100644 --- a/De Gruyter.js +++ b/De Gruyter.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-09-02 21:52:03" + "lastUpdated": "2024-05-29 17:10:18" } /* @@ -37,23 +37,20 @@ function detectWeb(doc, url) { - let title = attr(doc, 'meta[name="citation_title"]', 'content'); - if (title) { - if (doc.querySelector('meta[name="citation_isbn"]')) { - let bookTitle = attr(doc, 'meta[name="citation_inbook_title"]', 'content'); - if (!bookTitle || title == bookTitle) { - return "book"; + let pageCategory = doc.body.getAttribute('data-pagecategory'); + switch (pageCategory) { + case 'book': + return 'book'; + case 'chapter': + return 'bookSection'; + case 'article': + return 'journalArticle'; + case 'search': + case 'journal': + default: + if (getSearchResults(doc, true)) { + return "multiple"; } - else { - return "bookSection"; - } - } - else { - return "journalArticle"; - } - } - else if (getSearchResults(doc, true)) { - return "multiple"; } return false; } @@ -147,7 +144,17 @@ function scrape(doc, url) { }); translator.getTranslatorObject(function (trans) { - if (detectWeb(doc, url) == 'bookSection') { + let detectedType = detectWeb(doc, url); + if (detectedType == 'book') { + // Delete citation_inbook_title if this is actually a book, not a book section + // Prevents EM from mis-detecting as a bookSection in a way that even setting + // trans.itemType can't override + let bookTitleMeta = doc.querySelector('meta[name="citation_inbook_title"]'); + if (bookTitleMeta) { + bookTitleMeta.remove(); + } + } + else if (detectedType == 'bookSection') { trans.itemType = 'bookSection'; } trans.addCustomFields({ @@ -181,19 +188,15 @@ var testCases = [ "ISSN": "2196-7121", "abstractNote": "Die Geschichte homosexueller Menschen im modernen Deutschland besteht nicht nur aus Verfolgung und Diskriminierung, obschon sie oft als solche erinnert wird. Wohl haben homosexuelle Männer unter massiver Verfolgung gelitten, und auch lesbische Frauen waren vielen Diskriminierungen ausgesetzt. Doch die Geschichte der letzten 200 Jahre weist nicht nur jene Transformation im Umgang mit Homosexualität auf, die ab den 1990er Jahren zur Gleichberechtigung führte, sondern mehrere, inhaltlich sehr verschiedene Umbrüche. Wir haben es weder mit einem Kontinuum der Repression noch mit einer linearen Emanzipationsgeschichte zu tun, sondern mit einer höchst widersprüchlichen langfristigen Entwicklung.", "issue": "3", - "language": "de", + "language": "en", "libraryCatalog": "www.degruyter.com", "pages": "377-414", "publicationTitle": "Vierteljahrshefte für Zeitgeschichte", + "rights": "De Gruyter expressly reserves the right to use all content for commercial text and data mining within the meaning of Section 44b of the German Copyright Act.", "shortTitle": "Homosexuelle im modernen Deutschland", "url": "https://www.degruyter.com/document/doi/10.1515/vfzg-2021-0028/html", "volume": "69", - "attachments": [ - { - "title": "Full Text PDF", - "mimeType": "application/pdf" - } - ], + "attachments": [], "tags": [ { "tag": "Emancipation" @@ -230,12 +233,13 @@ var testCases = [ "creatorType": "author" } ], - "date": "2021-08-25", + "date": "2021-07-30", "ISBN": "9781487518806", "abstractNote": "Bringing together themes in the history of art, punishment, religion, and the history of medicine, Picturing Punishment provides new insights into the wider importance of the criminal to civic life.", "language": "en", "libraryCatalog": "www.degruyter.com", "publisher": "University of Toronto Press", + "rights": "De Gruyter expressly reserves the right to use all content for commercial text and data mining within the meaning of Section 44b of the German Copyright Act.", "shortTitle": "Picturing Punishment", "url": "https://www.degruyter.com/document/doi/10.3138/9781487518806/html", "attachments": [ @@ -307,14 +311,15 @@ var testCases = [ "creatorType": "author" } ], - "date": "2021-08-25", + "date": "2021-07-30", "ISBN": "9781487518806", "abstractNote": "5 Serving the Public Good: Reform, Prestige, and the Productive Criminal Body in Amsterdam was published in Picturing Punishment on page 135.", - "bookTitle": "Picturing Punishment: The Spectacle and Material Afterlife of the Criminal Body in the Dutch Republic", + "bookTitle": "Picturing Punishment", "language": "en", "libraryCatalog": "www.degruyter.com", "pages": "135-157", "publisher": "University of Toronto Press", + "rights": "De Gruyter expressly reserves the right to use all content for commercial text and data mining within the meaning of Section 44b of the German Copyright Act.", "shortTitle": "5 Serving the Public Good", "url": "https://www.degruyter.com/document/doi/10.3138/9781487518806-008/html", "attachments": [], @@ -362,6 +367,7 @@ var testCases = [ "libraryCatalog": "www.degruyter.com", "pages": "1101-1103", "publicationTitle": "Zeitschrift für Kristallographie - New Crystal Structures", + "rights": "De Gruyter expressly reserves the right to use all content for commercial text and data mining within the meaning of Section 44b of the German Copyright Act.", "url": "https://www.degruyter.com/document/doi/10.1515/ncrs-2021-0236/html", "volume": "236", "attachments": [ @@ -414,6 +420,7 @@ var testCases = [ "libraryCatalog": "www.degruyter.com", "pages": "1101-1103", "publicationTitle": "Zeitschrift für Kristallographie - New Crystal Structures", + "rights": "De Gruyter expressly reserves the right to use all content for commercial text and data mining within the meaning of Section 44b of the German Copyright Act.", "url": "https://www.degruyter.com/document/doi/10.1515/ncrs-2021-0236/html", "volume": "236", "attachments": [ @@ -431,6 +438,7 @@ var testCases = [ { "type": "web", "url": "https://www.degruyter.com/search?query=test", + "defer": true, "items": "multiple" }, { From b947ce66c9da49c9019bafd6098dafe8335a98ea Mon Sep 17 00:00:00 2001 From: Brendan O'Connell <68507084+brendan-oconnell@users.noreply.github.com> Date: Tue, 4 Jun 2024 20:15:43 +0200 Subject: [PATCH 068/158] Add PubFactory Journals (#3009) Co-authored-by: Abe Jellinek --- PubFactory Journals.js | 717 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 717 insertions(+) create mode 100644 PubFactory Journals.js diff --git a/PubFactory Journals.js b/PubFactory Journals.js new file mode 100644 index 00000000000..32bca32f485 --- /dev/null +++ b/PubFactory Journals.js @@ -0,0 +1,717 @@ +{ + "translatorID": "8d1fb775-df6d-4069-8830-1dfe8e8387dd", + "label": "PubFactory Journals", + "creator": "Brendan O'Connell", + "target": "^https://([^/]+/view/journals/.+\\.xml|[^.]*journals\\.[^/]+/search)\\b", + "minVersion": "5.0", + "maxVersion": "", + "priority": 200, + "inRepository": true, + "translatorType": 4, + "browserSupport": "gcsibv", + "lastUpdated": "2024-06-04 18:11:19" +} + +/* + ***** 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) { + // EM works well on single articles, so detectWeb() isn't strictly necessary for them. + // However, single articles are included in this translator + // so that 'multiple' doesn't get called for articles with "Related Items" + // e.g. https://avmajournals.avma.org/view/journals/javma/261/4/javma.22.11.0518.xml + // because there are multiple items that match the rows selector in getSearchResults and + // haven't found a way to write a querySelectorAll() that only matches the main article on single pages + // with related items. + if (doc.querySelector('meta[property="og:type"][content="article"]') + && text(doc, '#footerWrap').includes('PubFactory')) { + return "journalArticle"; + } + else if (getSearchResults(doc, true)) { + return 'multiple'; + } + return false; +} + +function getSearchResults(doc, checkOnly) { + var items = {}; + var found = false; + let linkSelector = 'a[href^="/"][href*=".xml"]'; + let rows = doc.querySelectorAll(`#searchContent ${linkSelector}, .issue-toc ${linkSelector}`); + for (let row of rows) { + let href = row.href; + let title = ZU.trimInternal(row.innerText); + if (!href || !title || /\bissue-.+\.xml\b/.test(href)) continue; + if (checkOnly) return true; + found = true; + items[href] = title; + } + 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 url of Object.keys(items)) { + await scrape(await requestDocument(url)); + } + } + else { + await scrape(doc, url); + } +} + +async function scrape(doc, url = doc.location.href) { + if (doc.querySelector('meta[name="citation_pdf_url"]')) { + var pdfURL = attr(doc, 'meta[name="citation_pdf_url"]', "content"); + } + let translator = Zotero.loadTranslator('web'); + // Embedded Metadata + translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48'); + translator.setDocument(doc); + + translator.setHandler('itemDone', (_obj, item) => { + // remove word "Abstract" from abstract if present, e.g. https://journals.ametsoc.org/view/journals/atsc/72/8/jas-d-14-0363.1.xml + var abstract = attr(doc, 'meta[property="og:description"]', "content"); + var cleanAbstract = abstract.replace(/^Abstract\s+/i, ""); + item.abstractNote = cleanAbstract; + if (pdfURL) { + item.attachments = []; + item.attachments.push({ + url: pdfURL, + title: 'Full Text PDF', + mimeType: 'application/pdf' + }); + } + item.complete(); + }); + + let em = await translator.getTranslatorObject(); + em.itemType = 'journalArticle'; + // fix when meta elements are incorrectly placed in body on journal pages + // https://github.com/zotero/translators/pull/3009#discussion_r1268956903 + if (doc.querySelector("body > meta")) { + em.searchForMetaTagsInBody = true; + } + await em.doWeb(doc, url); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://journals.ametsoc.org/view/journals/amsm/59/1/amsm.59.issue-1.xml", + "items": "multiple" + }, + { + "type": "web", + "url": "https://journals.humankinetics.com/view/journals/jab/jab-overview.xml", + "items": "multiple" + }, + { + "type": "web", + "url": "https://avmajournals.avma.org/view/journals/javma/javma-overview.xml", + "items": "multiple" + }, + { + "type": "web", + "url": "https://journals.humankinetics.com/view/journals/ijsnem/33/2/article-p73.xml", + "items": [ + { + "itemType": "journalArticle", + "title": "Fasted Sprint Interval Training Results in Some Beneficial Skeletal Muscle Metabolic, but Similar Metabolomic and Performance Adaptations Compared With Carbohydrate-Fed Training in Recreationally Active Male", + "creators": [ + { + "firstName": "Tom P.", + "lastName": "Aird", + "creatorType": "author" + }, + { + "firstName": "Andrew J.", + "lastName": "Farquharson", + "creatorType": "author" + }, + { + "firstName": "Kate M.", + "lastName": "Bermingham", + "creatorType": "author" + }, + { + "firstName": "Aifric", + "lastName": "O’Sullivan", + "creatorType": "author" + }, + { + "firstName": "Janice E.", + "lastName": "Drew", + "creatorType": "author" + }, + { + "firstName": "Brian P.", + "lastName": "Carson", + "creatorType": "author" + } + ], + "date": "2022/12/26", + "DOI": "10.1123/ijsnem.2022-0142", + "ISSN": "1543-2742, 1526-484X", + "abstractNote": "Endurance training in fasted conditions (FAST) induces favorable skeletal muscle metabolic adaptations compared with carbohydrate feeding (CHO), manifesting in improved exercise performance over time. Sprint interval training (SIT) is a potent metabolic stimulus, however nutritional strategies to optimize adaptations to SIT are poorly characterized. Here we investigated the efficacy of FAST versus CHO SIT (4–6 × 30-s Wingate sprints interspersed with 4-min rest) on muscle metabolic, serum metabolome and exercise performance adaptations in a double-blind parallel group design in recreationally active males. Following acute SIT, we observed exercise-induced increases in pan-acetylation and several genes associated with mitochondrial biogenesis, fatty acid oxidation, and NAD+-biosynthesis, along with favorable regulation of PDK4 (p = .004), NAMPT (p = .0013), and NNMT (p = .001) in FAST. Following 3 weeks of SIT, NRF2 (p = .029) was favorably regulated in FAST, with augmented pan-acetylation in CHO but not FAST (p = .033). SIT induced increases in maximal citrate synthase activity were evident with no effect of nutrition, while 3-hydroxyacyl-CoA dehydrogenase activity did not change. Despite no difference in the overall serum metabolome, training-induced changes in C3:1 (p = .013) and C4:1 (p = .010) which increased in FAST, and C16:1 (p = .046) and glutamine (p = .021) which increased in CHO, were different between groups. Training-induced increases in anaerobic (p = .898) and aerobic power (p = .249) were not influenced by nutrition. These findings suggest some beneficial muscle metabolic adaptations are evident in FAST versus CHO SIT following acute exercise and 3 weeks of SIT. However, this stimulus did not manifest in differential exercise performance adaptations.", + "issue": "2", + "language": "en", + "libraryCatalog": "journals.humankinetics.com", + "pages": "73-83", + "publicationTitle": "International Journal of Sport Nutrition and Exercise Metabolism", + "url": "https://journals.humankinetics.com/view/journals/ijsnem/33/2/article-p73.xml", + "volume": "33", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "exercise" + }, + { + "tag": "fasted" + }, + { + "tag": "fasting" + }, + { + "tag": "metabolism" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://thejns.org/view/journals/j-neurosurg/138/3/article-p587.xml", + "items": [ + { + "itemType": "journalArticle", + "title": "Intraoperative confocal laser endomicroscopy: prospective in vivo feasibility study of a clinical-grade system for brain tumors", + "creators": [ + { + "firstName": "Irakliy", + "lastName": "Abramov", + "creatorType": "author" + }, + { + "firstName": "Marian T.", + "lastName": "Park", + "creatorType": "author" + }, + { + "firstName": "Evgenii", + "lastName": "Belykh", + "creatorType": "author" + }, + { + "firstName": "Alexander B.", + "lastName": "Dru", + "creatorType": "author" + }, + { + "firstName": "Yuan", + "lastName": "Xu", + "creatorType": "author" + }, + { + "firstName": "Timothy C.", + "lastName": "Gooldy", + "creatorType": "author" + }, + { + "firstName": "Lea", + "lastName": "Scherschinski", + "creatorType": "author" + }, + { + "firstName": "S. Harrison", + "lastName": "Farber", + "creatorType": "author" + }, + { + "firstName": "Andrew S.", + "lastName": "Little", + "creatorType": "author" + }, + { + "firstName": "Randall W.", + "lastName": "Porter", + "creatorType": "author" + }, + { + "firstName": "Kris A.", + "lastName": "Smith", + "creatorType": "author" + }, + { + "firstName": "Michael T.", + "lastName": "Lawton", + "creatorType": "author" + }, + { + "firstName": "Jennifer M.", + "lastName": "Eschbacher", + "creatorType": "author" + }, + { + "firstName": "Mark C.", + "lastName": "Preul", + "creatorType": "author" + } + ], + "date": "2022/07/08", + "DOI": "10.3171/2022.5.JNS2282", + "ISSN": "1933-0693, 0022-3085", + "abstractNote": "OBJECTIVE The authors evaluated the feasibility of using the first clinical-grade confocal laser endomicroscopy (CLE) system using fluorescein sodium for intraoperative in vivo imaging of brain tumors. METHODS A CLE system cleared by the FDA was used in 30 prospectively enrolled patients with 31 brain tumors (13 gliomas, 5 meningiomas, 6 other primary tumors, 3 metastases, and 4 reactive brain tissue). A neuropathologist classified CLE images as interpretable or noninterpretable. Images were compared with corresponding frozen and permanent histology sections, with image correlation to biopsy location using neuronavigation. The specificities and sensitivities of CLE images and frozen sections were calculated using permanent histological sections as the standard for comparison. A recently developed surgical telepathology software platform was used in 11 cases to provide real-time intraoperative consultation with a neuropathologist. RESULTS Overall, 10,713 CLE images from 335 regions of interest were acquired. The mean duration of the use of the CLE system was 7 minutes (range 3–18 minutes). Interpretable CLE images were obtained in all cases. The first interpretable image was acquired within a mean of 6 (SD 10) images and within the first 5 (SD 13) seconds of imaging; 4896 images (46%) were interpretable. Interpretable image acquisition was positively correlated with study progression, number of cases per surgeon, cumulative length of CLE time, and CLE time per case (p ≤ 0.01). The diagnostic accuracy, sensitivity, and specificity of CLE compared with frozen sections were 94%, 94%, and 100%, respectively, and the diagnostic accuracy, sensitivity, and specificity of CLE compared with permanent histological sections were 92%, 90%, and 94%, respectively. No difference was observed between lesion types for the time to first interpretable image (p = 0.35). Deeply located lesions were associated with a higher percentage of interpretable images than superficial lesions (p = 0.02). The study met the primary end points, confirming the safety and feasibility and acquisition of noninvasive digital biopsies in all cases. The study met the secondary end points for the duration of CLE use necessary to obtain interpretable images. A neuropathologist could interpret the CLE images in 29 (97%) of 30 cases. CONCLUSIONS The clinical-grade CLE system allows in vivo, intraoperative, high-resolution cellular visualization of tissue microstructure and identification of lesional tissue patterns in real time, without the need for tissue preparation.", + "issue": "3", + "language": "EN", + "libraryCatalog": "thejns.org", + "pages": "587-597", + "publicationTitle": "Journal of Neurosurgery", + "shortTitle": "Intraoperative confocal laser endomicroscopy", + "url": "https://thejns.org/view/journals/j-neurosurg/138/3/article-p587.xml", + "volume": "138", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "confocal laser endomicroscopy" + }, + { + "tag": "fluorescence-guided surgery" + }, + { + "tag": "intraoperative diagnosis" + }, + { + "tag": "neuropathology" + }, + { + "tag": "neurosurgery" + }, + { + "tag": "oncology" + }, + { + "tag": "telemedicine" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://journals.ametsoc.org/view/journals/atsc/72/8/jas-d-14-0363.1.xml", + "items": [ + { + "itemType": "journalArticle", + "title": "Observations of Ice Microphysics through the Melting Layer", + "creators": [ + { + "firstName": "Andrew J.", + "lastName": "Heymsfield", + "creatorType": "author" + }, + { + "firstName": "Aaron", + "lastName": "Bansemer", + "creatorType": "author" + }, + { + "firstName": "Michael R.", + "lastName": "Poellot", + "creatorType": "author" + }, + { + "firstName": "Norm", + "lastName": "Wood", + "creatorType": "author" + } + ], + "date": "2015/08/01", + "DOI": "10.1175/JAS-D-14-0363.1", + "ISSN": "0022-4928, 1520-0469", + "abstractNote": "The detailed microphysical processes and properties within the melting layer (ML)—the continued growth of the aggregates by the collection of the small particles, the breakup of these aggregates, the effects of relative humidity on particle melting—are largely unresolved. This study focuses on addressing these questions for in-cloud heights from just above to just below the ML. Observations from four field programs employing in situ measurements from above to below the ML are used to characterize the microphysics through this region. With increasing temperatures from about −4° to +1°C, and for saturated conditions, slope and intercept parameters of exponential fits to the particle size distributions (PSD) fitted to the data continue to decrease downward, the maximum particle size (largest particle sampled for each 5-s PSD) increases, and melting proceeds from the smallest to the largest particles. With increasing temperature from about −4° to +2°C for highly subsaturated conditions, the PSD slope and intercept continue to decrease downward, the maximum particle size increases, and there is relatively little melting, but all particles experience sublimation.", + "issue": "8", + "language": "EN", + "libraryCatalog": "journals.ametsoc.org", + "pages": "2902-2928", + "publicationTitle": "Journal of the Atmospheric Sciences", + "url": "https://journals.ametsoc.org/view/journals/atsc/72/8/jas-d-14-0363.1.xml", + "volume": "72", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Cloud microphysics" + }, + { + "tag": "Cloud retrieval" + }, + { + "tag": "Cloud water/phase" + }, + { + "tag": "Ice crystals" + }, + { + "tag": "Ice particles" + }, + { + "tag": "In situ atmospheric observations" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://akjournals.com/view/journals/2006/12/2/article-p303.xml?rskey=lLnjOM&result=2", + "items": [ + { + "itemType": "journalArticle", + "title": "Thinking beyond cut-off scores in the assessment of potentially addictive behaviors: A brief illustration in the context of binge-watching", + "creators": [ + { + "firstName": "Pauline", + "lastName": "Billaux", + "creatorType": "author" + }, + { + "firstName": "Joël", + "lastName": "Billieux", + "creatorType": "author" + }, + { + "firstName": "Stéphanie", + "lastName": "Baggio", + "creatorType": "author" + }, + { + "firstName": "Pierre", + "lastName": "Maurage", + "creatorType": "author" + }, + { + "firstName": "Maèva", + "lastName": "Flayelle", + "creatorType": "author" + } + ], + "date": "2023/06/30", + "DOI": "10.1556/2006.2023.00032", + "ISSN": "2063-5303, 2062-5871", + "abstractNote": "While applying a diagnostic approach (i.e., comparing “clinical” cases with “healthy” controls) is part of our methodological habits as researchers and clinicians, this approach has been particularly criticized in the behavioral addictions research field, in which a lot of studies are conducted on “emerging” conditions. Here we exemplify the pitfalls of using a cut-off-based approach in the context of binge-watching (i.e., watching multiple episodes of series back-to-back) by demonstrating that no reliable cut-off scores could be determined with a widely used assessment instrument measuring binge-watching.", + "issue": "2", + "language": "en", + "libraryCatalog": "akjournals.com", + "pages": "303-308", + "publicationTitle": "Journal of Behavioral Addictions", + "shortTitle": "Thinking beyond cut-off scores in the assessment of potentially addictive behaviors", + "url": "https://akjournals.com/view/journals/2006/12/2/article-p303.xml", + "volume": "12", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "addictive behaviors" + }, + { + "tag": "behavioral addictions" + }, + { + "tag": "binge-watching" + }, + { + "tag": "cut-off scores" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://akjournals.com/view/journals/2006/12/2/2006.12.issue-2.xml", + "items": "multiple" + }, + { + "type": "web", + "url": "https://akjournals.com/view/journals/606/aop/issue.xml", + "items": "multiple" + }, + { + "type": "web", + "url": "https://jnccn.org/view/journals/jnccn/21/6/jnccn.21.issue-6.xml", + "items": "multiple" + }, + { + "type": "web", + "url": "https://jnccn.org/view/journals/jnccn/21/6/article-p685.xml", + "items": [ + { + "itemType": "journalArticle", + "title": "Increasing Private Payer and Medicare Coverage of Circulating Tumor DNA Tests: What’s at Stake?", + "creators": [ + { + "firstName": "Mariana P.", + "lastName": "Socal", + "creatorType": "author" + } + ], + "date": "2023/06/01", + "DOI": "10.6004/jnccn.2023.7038", + "ISSN": "1540-1405, 1540-1413", + "abstractNote": "\"Increasing Private Payer and Medicare Coverage of Circulating Tumor DNA Tests: What’s at Stake?\" published on Jun 2023 by National Comprehensive Cancer Network.", + "issue": "6", + "language": "EN", + "libraryCatalog": "jnccn.org", + "pages": "685-686", + "publicationTitle": "Journal of the National Comprehensive Cancer Network", + "shortTitle": "Increasing Private Payer and Medicare Coverage of Circulating Tumor DNA Tests", + "url": "https://jnccn.org/view/journals/jnccn/21/6/article-p685.xml", + "volume": "21", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.ajtmh.org/view/journals/tpmd/109/1/tpmd.109.issue-1.xml", + "items": "multiple" + }, + { + "type": "web", + "url": "https://akjournals.com/view/journals/2006/12/2/article-p303.xml?rskey=lLnjOM&result=2", + "items": [ + { + "itemType": "journalArticle", + "title": "Thinking beyond cut-off scores in the assessment of potentially addictive behaviors: A brief illustration in the context of binge-watching", + "creators": [ + { + "firstName": "Pauline", + "lastName": "Billaux", + "creatorType": "author" + }, + { + "firstName": "Joël", + "lastName": "Billieux", + "creatorType": "author" + }, + { + "firstName": "Stéphanie", + "lastName": "Baggio", + "creatorType": "author" + }, + { + "firstName": "Pierre", + "lastName": "Maurage", + "creatorType": "author" + }, + { + "firstName": "Maèva", + "lastName": "Flayelle", + "creatorType": "author" + } + ], + "date": "2023/06/30", + "DOI": "10.1556/2006.2023.00032", + "ISSN": "2063-5303, 2062-5871", + "abstractNote": "While applying a diagnostic approach (i.e., comparing “clinical” cases with “healthy” controls) is part of our methodological habits as researchers and clinicians, this approach has been particularly criticized in the behavioral addictions research field, in which a lot of studies are conducted on “emerging” conditions. Here we exemplify the pitfalls of using a cut-off-based approach in the context of binge-watching (i.e., watching multiple episodes of series back-to-back) by demonstrating that no reliable cut-off scores could be determined with a widely used assessment instrument measuring binge-watching.", + "issue": "2", + "language": "en", + "libraryCatalog": "akjournals.com", + "pages": "303-308", + "publicationTitle": "Journal of Behavioral Addictions", + "shortTitle": "Thinking beyond cut-off scores in the assessment of potentially addictive behaviors", + "url": "https://akjournals.com/view/journals/2006/12/2/article-p303.xml", + "volume": "12", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "addictive behaviors" + }, + { + "tag": "behavioral addictions" + }, + { + "tag": "binge-watching" + }, + { + "tag": "cut-off scores" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://journals.humankinetics.com/view/journals/jab/39/3/jab.39.issue-3.xml", + "items": "multiple" + }, + { + "type": "web", + "url": "https://journals.ametsoc.org/view/journals/amsm/59/1/amsmonographs-d-18-0006.1.xml?tab_body=abstract-display", + "items": [ + { + "itemType": "journalArticle", + "title": "100 Years of Progress in Atmospheric Observing Systems", + "creators": [ + { + "firstName": "Jeffrey L.", + "lastName": "Stith", + "creatorType": "author" + }, + { + "firstName": "Darrel", + "lastName": "Baumgardner", + "creatorType": "author" + }, + { + "firstName": "Julie", + "lastName": "Haggerty", + "creatorType": "author" + }, + { + "firstName": "R. Michael", + "lastName": "Hardesty", + "creatorType": "author" + }, + { + "firstName": "Wen-Chau", + "lastName": "Lee", + "creatorType": "author" + }, + { + "firstName": "Donald", + "lastName": "Lenschow", + "creatorType": "author" + }, + { + "firstName": "Peter", + "lastName": "Pilewskie", + "creatorType": "author" + }, + { + "firstName": "Paul L.", + "lastName": "Smith", + "creatorType": "author" + }, + { + "firstName": "Matthias", + "lastName": "Steiner", + "creatorType": "author" + }, + { + "firstName": "Holger", + "lastName": "Vömel", + "creatorType": "author" + } + ], + "date": "2018/01/01", + "DOI": "10.1175/AMSMONOGRAPHS-D-18-0006.1", + "abstractNote": "Although atmospheric observing systems were already an important part of meteorology before the American Meteorological Society was established in 1919, the past 100 years have seen a steady increase in their numbers and types. Examples of how observing systems were developed and how they have enabled major scientific discoveries are presented. These examples include observing systems associated with the boundary layer, the upper air, clouds and precipitation, and solar and terrestrial radiation. Widely used specialized observing systems such as radar, lidar, and research aircraft are discussed, and examples of applications to weather forecasting and climate are given. Examples drawn from specific types of chemical measurements, such as ozone and carbon dioxide, are included. Sources of information on observing systems, including other chapters of this monograph, are also discussed. The past 100 years has been characterized by synergism between societal needs for weather observations and the needs of fundamental meteorological research into atmospheric processes. In the latter half of the period, observing system improvements have been driven by the increasing demands for higher-resolution data for numerical models, the need for long-term measurements, and for more global coverage. This has resulted in a growing demand for data access and for integrating data from an increasingly wide variety of observing system types and networks. These trends will likely continue.", + "issue": "1", + "language": "EN", + "libraryCatalog": "journals.ametsoc.org", + "pages": "2.1-2.55", + "publicationTitle": "Meteorological Monographs", + "url": "https://journals.ametsoc.org/view/journals/amsm/59/1/amsmonographs-d-18-0006.1.xml", + "volume": "59", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Aircraft observations" + }, + { + "tag": "Automatic weather stations" + }, + { + "tag": "Dropsondes" + }, + { + "tag": "Profilers" + }, + { + "tag": "Radars/Radar observations" + }, + { + "tag": "Radiosonde observations" + }, + { + "tag": "atmospheric" + } + ], + "notes": [], + "seeAlso": [] + } + ] + } +] +/** END TEST CASES **/ From 047cda3a849a273adadd21644e15bc846f70c1a7 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 13 Jun 2024 12:02:46 -0400 Subject: [PATCH 069/158] EM: Always look for meta tags in head and body (#3318) --- Embedded Metadata.js | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/Embedded Metadata.js b/Embedded Metadata.js index af9e8dc3d49..260675b9740 100644 --- a/Embedded Metadata.js +++ b/Embedded Metadata.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-03-27 05:49:28" + "lastUpdated": "2024-06-13 15:58:28" } /* @@ -179,12 +179,8 @@ function getContentText(doc, name, strict, all) { } function getContent(doc, name, strict) { - var xpath = '/x:html/' - + ( - exports.searchForMetaTagsInBody - ? '*[local-name() = "head" or local-name() = "body"]' - : 'x:head' // default - ) + var xpath = '/x:html' + + '/*[local-name() = "head" or local-name() = "body"]' + '/x:meta[' + (strict ? '@name' : 'substring(@name, string-length(@name)-' + (name.length - 1) + ')') + '="' + name + '"]/'; @@ -240,23 +236,10 @@ function detectWeb(doc, url) { function init(doc, url, callback, forceLoadRDF) { getPrefixes(doc); - 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."); + var metaTags = doc.querySelectorAll("meta"); + Z.debug("Embedded Metadata: found " + metaTags.length + " meta tags"); if (forceLoadRDF /* check if this is called from doWeb */ && !metaTags.length) { - if (!exports.searchForMetaTagsInBody && doc.head) { - Z.debug(doc.head.innerHTML - .replace(/|\/>)/ig, '') - .replace(/]+>/ig, '') - .replace(/(?:\s*[\r\n]\s*)+/g, '\n') - ); - } - else { - Z.debug("Embedded Metadata: No tag found in body or head tag"); - } + Z.debug("Embedded Metadata: No meta tags found"); } var hwType, hwTypeGuess, generatorType, statements = []; @@ -1012,9 +995,6 @@ var exports = { detectWeb: detectWeb, addCustomFields: addCustomFields, itemType: false, - // workaround for meta tags in body caused by parsing invalid HTML; only - // use as a last resort - searchForMetaTagsInBody: false, // activate/deactivate splitting tags in final data cleanup when they contain commas or semicolons splitTags: true, fixSchemaURI: setPrefixRemap From 09e37517585d72c180ace72801d3e53bbd618c23 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 13 Jun 2024 13:13:04 -0400 Subject: [PATCH 070/158] PubFactory Journals: Remove meta-in-body workaround (#3318) --- PubFactory Journals.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/PubFactory Journals.js b/PubFactory Journals.js index 32bca32f485..6dfb98170b5 100644 --- a/PubFactory Journals.js +++ b/PubFactory Journals.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-06-04 18:11:19" + "lastUpdated": "2024-06-13 17:11:59" } /* @@ -109,11 +109,6 @@ async function scrape(doc, url = doc.location.href) { let em = await translator.getTranslatorObject(); em.itemType = 'journalArticle'; - // fix when meta elements are incorrectly placed in body on journal pages - // https://github.com/zotero/translators/pull/3009#discussion_r1268956903 - if (doc.querySelector("body > meta")) { - em.searchForMetaTagsInBody = true; - } await em.doWeb(doc, url); } From 241a99cf7288bd0bb4400c579b3fa42021b3f368 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 13 Jun 2024 15:08:38 -0400 Subject: [PATCH 071/158] ScienceDirect: Asyncify (#3320) Closes #3315 --- ScienceDirect.js | 139 +++++++++++++++++++++-------------------------- 1 file changed, 63 insertions(+), 76 deletions(-) diff --git a/ScienceDirect.js b/ScienceDirect.js index f41ea45bb53..96d78842692 100644 --- a/ScienceDirect.js +++ b/ScienceDirect.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-01-31 19:11:09" + "lastUpdated": "2024-06-13 19:08:28" } function detectWeb(doc, url) { @@ -64,12 +64,11 @@ function detectWeb(doc, url) { return false; } -function getPDFLink(doc, onDone) { +async function getPDFLink(doc) { // No PDF access ("Get Full Text Elsewhere" or "Check for this article elsewhere") if (doc.querySelector('.accessContent') || doc.querySelector('.access-options-link-text') || doc.querySelector('#check-access-popover')) { Zotero.debug("PDF is not available"); - onDone(); - return; + return false; } // Some pages still have the PDF link available @@ -77,8 +76,7 @@ function getPDFLink(doc, onDone) { if (!pdfURL) pdfURL = attr(doc, '[name="citation_pdf_url"]', 'content'); if (pdfURL && pdfURL != '#') { Z.debug('Found intermediate URL in head: ' + pdfURL); - parseIntermediatePDFPage(pdfURL, onDone); - return; + return parseIntermediatePDFPage(pdfURL); } // If intermediate page URL is available, use that directly @@ -86,12 +84,11 @@ function getPDFLink(doc, onDone) { if (intermediateURL) { Zotero.debug("Found embedded PDF URL: " + intermediateURL); if (/[?&]isDTMRedir=(Y|true)/i.test(intermediateURL)) { - onDone(intermediateURL); + return intermediateURL; } else { - parseIntermediatePDFPage(intermediateURL, onDone); + return parseIntermediatePDFPage(intermediateURL); } - return; } // Simulate a click on the "Download PDF" button to open the menu containing the link with the URL @@ -114,8 +111,7 @@ function getPDFLink(doc, onDone) { } if (intermediateURL) { // Zotero.debug("Intermediate PDF URL from drop-down: " + intermediateURL); - parseIntermediatePDFPage(intermediateURL, onDone); - return; + return parseIntermediatePDFPage(intermediateURL); } } @@ -140,8 +136,7 @@ function getPDFLink(doc, onDone) { if (path && pdfExtension && pii && md5 && pid){ pdfURL = `/${path}/${pii}${pdfExtension}?md5=${md5}&pid=${pid}&isDTMRedir=Y`; Zotero.debug("Created PDF URL from JSON data: " + pdfURL); - onDone(pdfURL); - return; + return pdfURL; } else { Zotero.debug("Missing elements in JSON data required for URL creation"); @@ -160,8 +155,7 @@ function getPDFLink(doc, onDone) { if (pdfURL) { pdfURL = pdfURL + '/pdfft?isDTMRedir=true&download=true'; Zotero.debug("Trying to construct PDF URL from canonical link: " + pdfURL); - onDone(pdfURL); - return; + return pdfURL; } // If none of that worked for some reason, get the URL from the initial HTML, @@ -169,42 +163,37 @@ function getPDFLink(doc, onDone) { // never actually used. var url = doc.location.href; Zotero.debug("Refetching HTML for PDF link"); - ZU.processDocuments(url, function (reloadedDoc) { - var intermediateURL = attr(reloadedDoc, '.pdf-download-btn-link', 'href'); - // Zotero.debug("Intermediate PDF URL: " + intermediateURL); - if (intermediateURL) { - parseIntermediatePDFPage(intermediateURL, onDone); - return; - } - onDone(); - }); + let reloadedDoc = await requestDocument(url); + intermediateURL = attr(reloadedDoc, '.pdf-download-btn-link', 'href'); + // Zotero.debug("Intermediate PDF URL: " + intermediateURL); + if (intermediateURL) { + return parseIntermediatePDFPage(intermediateURL); + } + return false; } -function parseIntermediatePDFPage(url, onDone) { +async function parseIntermediatePDFPage(url) { // Get the PDF URL from the meta refresh on the intermediate page Z.debug('Parsing intermediate page to find redirect: ' + url); - ZU.doGet(url, function (html) { - var dp = new DOMParser(); - var doc = dp.parseFromString(html, 'text/html'); - var pdfURL = attr(doc, 'meta[HTTP-EQUIV="Refresh"]', 'CONTENT'); - var otherRedirect = attr(doc, '#redirect-message a', 'href'); - // Zotero.debug("Meta refresh URL: " + pdfURL); - if (pdfURL) { - // Strip '0;URL=' - var matches = pdfURL.match(/\d+;URL=(.+)/); - pdfURL = matches ? matches[1] : null; - } - else if (otherRedirect) { - pdfURL = otherRedirect; - } - else if (url.includes('.pdf')) { - // Sometimes we are already on the PDF page here and therefore - // can simply use the original url as pdfURL. - pdfURL = url; - } - onDone(pdfURL); - }); + let doc = await requestDocument(url); + var pdfURL = attr(doc, 'meta[HTTP-EQUIV="Refresh"]', 'CONTENT'); + var otherRedirect = attr(doc, '#redirect-message a', 'href'); + // Zotero.debug("Meta refresh URL: " + pdfURL); + if (pdfURL) { + // Strip '0;URL=' + var matches = pdfURL.match(/\d+;URL=(.+)/); + pdfURL = matches ? matches[1] : null; + } + else if (otherRedirect) { + pdfURL = otherRedirect; + } + else if (url.includes('.pdf')) { + // Sometimes we are already on the PDF page here and therefore + // can simply use the original url as pdfURL. + pdfURL = url; + } + return pdfURL; } @@ -284,7 +273,9 @@ function attachSupplementary(doc, item) { } -function processRIS(doc, text) { +async function processRIS(doc, text) { + let pdfURL = await getPDFLink(doc); + // T2 doesn't appear to hold the short title anymore. // Sometimes has series title, so I'm mapping this to T3, // although we currently don't recognize that in RIS @@ -395,19 +386,17 @@ function processRIS(doc, text) { item.url = "https:" + item.url; } - getPDFLink(doc, function (pdfURL) { - if (pdfURL) { - item.attachments.push({ - title: 'ScienceDirect Full Text PDF', - url: pdfURL, - mimeType: 'application/pdf', - proxy: false - }); - } - item.complete(); - }); + if (pdfURL) { + item.attachments.push({ + title: 'ScienceDirect Full Text PDF', + url: pdfURL, + mimeType: 'application/pdf', + proxy: false + }); + } + item.complete(); }); - translator.translate(); + await translator.translate(); } @@ -443,7 +432,7 @@ function getArticleList(doc) { ); } -function doWeb(doc, url) { +async function doWeb(doc, url) { if (detectWeb(doc, url) == "multiple") { // search page var itemList = getArticleList(doc); @@ -452,13 +441,14 @@ function doWeb(doc, url) { items[itemList[i].href] = itemList[i].textContent; } - Zotero.selectItems(items, function (selectedItems) { - if (!selectedItems) return; - ZU.processDocuments(Object.keys(selectedItems), scrape); - }); + let selectedItems = await Zotero.selectItems(items); + if (!selectedItems) return; + for (let url of Object.keys(selectedItems)) { + await scrape(await requestDocument(url)); + } } else { - scrape(doc, url); + await scrape(doc, url); } } @@ -487,7 +477,7 @@ function formValuesToPostData(values) { return s.substr(1); } -function scrape(doc, url) { +async function scrape(doc, url) { // On most page the export form uses the POST method var form = ZU.xpath(doc, '//form[@name="exportCite"]')[0]; if (form) { @@ -495,9 +485,10 @@ function scrape(doc, url) { var values = getFormInput(form); values['citation-type'] = 'RIS'; values.format = 'cite-abs'; - ZU.doPost(form.action, formValuesToPostData(values), function (text) { - processRIS(doc, text); + let text = await requestText(form.action, { + body: formValuesToPostData(values) }); + await processRIS(doc, text); return; } @@ -522,9 +513,8 @@ function scrape(doc, url) { if (pii) { let risUrl = '/sdfe/arp/cite?pii=' + pii + '&format=application%2Fx-research-info-systems&withabstract=true'; Z.debug('Fetching RIS using PII: ' + risUrl); - ZU.doGet(risUrl, function (text) { - processRIS(doc, text); - }); + let text = await requestText(risUrl); + await processRIS(doc, text); return; } } @@ -537,17 +527,14 @@ function scrape(doc, url) { Z.debug("Fetching RIS via GET form (old)"); let risUrl = form.action + '?export-format=RIS&export-content=cite-abs'; - ZU.doGet(risUrl, function (text) { - processRIS(doc, text); - }); + let text = await requestText(risUrl); + await processRIS(doc, text); return; } throw new Error("Could not scrape metadata via known methods"); } - - /** BEGIN TEST CASES **/ var testCases = [ { From fa69cf7b6546f3699cfb513433153d0459ad00a9 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 13 Jun 2024 15:43:07 -0400 Subject: [PATCH 072/158] ScienceDirect: Don't save snapshots on search results (#3320) Closes #3316 --- ScienceDirect.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/ScienceDirect.js b/ScienceDirect.js index 96d78842692..9e1e6173055 100644 --- a/ScienceDirect.js +++ b/ScienceDirect.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-06-13 19:08:28" + "lastUpdated": "2024-06-13 19:43:00" } function detectWeb(doc, url) { @@ -273,7 +273,7 @@ function attachSupplementary(doc, item) { } -async function processRIS(doc, text) { +async function processRIS(doc, text, isSearchResult = false) { let pdfURL = await getPDFLink(doc); // T2 doesn't appear to hold the short title anymore. @@ -350,10 +350,12 @@ async function processRIS(doc, text) { if (item.abstractNote) { item.abstractNote = item.abstractNote.replace(/^(Abstract|Summary)[\s:\n]*/, ""); } - item.attachments.push({ - title: "ScienceDirect Snapshot", - document: doc - }); + if (!isSearchResult) { + item.attachments.push({ + title: "ScienceDirect Snapshot", + document: doc + }); + } // attach supplementary data if (Z.getHiddenPref && Z.getHiddenPref("attachSupplementary")) { @@ -444,7 +446,7 @@ async function doWeb(doc, url) { let selectedItems = await Zotero.selectItems(items); if (!selectedItems) return; for (let url of Object.keys(selectedItems)) { - await scrape(await requestDocument(url)); + await scrape(await requestDocument(url), url, true); } } else { @@ -477,7 +479,7 @@ function formValuesToPostData(values) { return s.substr(1); } -async function scrape(doc, url) { +async function scrape(doc, url, isSearchResult = false) { // On most page the export form uses the POST method var form = ZU.xpath(doc, '//form[@name="exportCite"]')[0]; if (form) { @@ -488,7 +490,7 @@ async function scrape(doc, url) { let text = await requestText(form.action, { body: formValuesToPostData(values) }); - await processRIS(doc, text); + await processRIS(doc, text, isSearchResult); return; } @@ -514,7 +516,7 @@ async function scrape(doc, url) { let risUrl = '/sdfe/arp/cite?pii=' + pii + '&format=application%2Fx-research-info-systems&withabstract=true'; Z.debug('Fetching RIS using PII: ' + risUrl); let text = await requestText(risUrl); - await processRIS(doc, text); + await processRIS(doc, text, isSearchResult); return; } } @@ -528,7 +530,7 @@ async function scrape(doc, url) { let risUrl = form.action + '?export-format=RIS&export-content=cite-abs'; let text = await requestText(risUrl); - await processRIS(doc, text); + await processRIS(doc, text, isSearchResult); return; } From 427d10c13708d43fa1266740cc5e7986736a4e32 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 14 Jun 2024 11:38:12 -0400 Subject: [PATCH 073/158] Brill: Update for site changes (#3319) --- Brill.js | 141 +++++++++++++++++++++++-------------------------------- 1 file changed, 60 insertions(+), 81 deletions(-) diff --git a/Brill.js b/Brill.js index dc23091531e..8a43f196b90 100644 --- a/Brill.js +++ b/Brill.js @@ -9,13 +9,13 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-08-17 20:03:38" + "lastUpdated": "2024-06-14 15:36:55" } /* ***** BEGIN LICENSE BLOCK ***** - Copyright © 2021 Abe Jellinek + Copyright © 2024 Abe Jellinek This file is part of Zotero. @@ -41,15 +41,15 @@ function detectWeb(doc, url) { if (url.includes('/journals/')) { return 'journalArticle'; } - else if (url.includes('referenceworks.brillonline.com/entries/')) { - return 'encyclopediaArticle'; - } else { return 'book'; } } - else if (url.includes('bibliographies.brillonline.com/entries/') - && doc.querySelector('#export-form')) { + else if (url.includes('referenceworks.brill.com/display/')) { + return 'encyclopediaArticle'; + } + else if (url.includes('bibliographies.brill.com/items/') + && doc.querySelector('form.export-item')) { return 'journalArticle'; } else if (getSearchResults(doc, true)) { @@ -62,9 +62,12 @@ function getSearchResults(doc, checkOnly) { var items = {}; var found = false; var rows = doc.querySelectorAll('#searchContent .text-headline a, .type-article .text-headline a, .result-item .book-title a'); + if (!rows.length) { + rows = doc.querySelectorAll('#bibliography a.item-container'); + } for (let row of rows) { let href = row.href; - let title = ZU.trimInternal(row.textContent); + let title = ZU.trimInternal(text(row, '.item-title span:last-child') || row.textContent); if (!href || !title) continue; if (checkOnly) return true; found = true; @@ -85,7 +88,7 @@ function doWeb(doc, url) { } function scrape(doc, url) { - if (url.includes('bibliographies.brillonline.com/entries/')) { + if (url.includes('bibliographies.brill.com/items/')) { scrapeBibliography(doc); return; } @@ -107,15 +110,38 @@ function scrape(doc, url) { if (item.itemType == 'book' && item.publicationTitle) { delete item.publicationTitle; } + + if (item.itemType == 'encyclopediaArticle' && !item.encyclopediaTitle) { + item.encyclopediaTitle = text(doc, '.source-link a'); + } if (item.abstractNote && item.abstractNote.endsWith('by Brill.')) { delete item.abstractNote; } + + if (!item.publisher) { + item.publisher = 'Brill'; + } if (!item.creators.length) { - // editors often don't make it into the EM - for (let editor of doc.querySelectorAll('.content-contributor-editor a')) { - item.creators.push(ZU.cleanAuthor(editor.textContent, 'editor')); + let creatorNames = []; + let creatorType = 'author'; + let line = doc.querySelector('.contributor-line'); + if (line) { + switch (text(line, '.creator-type-label').trim()) { + case 'Author:': + case 'Authors:': + creatorType = 'author'; + break; + case 'Editor:': + case 'Editors:': + creatorType = 'editor'; + break; + } + creatorNames = line.querySelectorAll('.contributor-details .contributor-unlinked, .contributor-details .contributor-details-link'); + } + for (let creatorName of creatorNames) { + item.creators.push(ZU.cleanAuthor(creatorName.textContent, creatorType)); } } @@ -128,14 +154,19 @@ function scrape(doc, url) { }); translator.getTranslatorObject(function (trans) { - if (url.includes('referenceworks.brillonline.com/entries/')) { + if (url.includes('referenceworks.brill.com/display/entries/')) { trans.itemType = 'encyclopediaArticle'; } - - // Brill's HTML is structured incorrectly due to a bug in the - // Pubfactory CMS, and it causes some parsers to put the - // tags in the body. We'll fix it by telling EM to work around it. - trans.searchForMetaTagsInBody = true; + else if (url.includes('brill.com/edcollbook/')) { + // Delete citation_inbook_title if this is actually a book, not a book section + // Prevents EM from mis-detecting as a bookSection in a way that even setting + // trans.itemType can't override + let bookTitleMeta = doc.querySelector('meta[name="citation_inbook_title"]'); + if (bookTitleMeta) { + bookTitleMeta.remove(); + } + trans.itemType = 'book'; + } trans.doWeb(doc, url); }); @@ -143,11 +174,10 @@ function scrape(doc, url) { function scrapeBibliography(doc) { let params = new URLSearchParams({ - entryId: attr(doc, 'input[name="entryId"]', 'value'), - dest: attr(doc, 'input[name="dest"]', 'value') + keys: attr(doc, 'input[name="keys"]', 'value'), }).toString(); - ZU.doPost('/export/exportRis', params, function (ris) { + ZU.doGet('/BSLO/export/?' + params, function (ris) { var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); // RIS translator.setString(ris); @@ -252,7 +282,7 @@ var testCases = [ "ISSN": "0085-2376, 1570-064x", "abstractNote": "Abstract The Marquis de Fénelon’s internationally popular didactic narrative, Les aventures de Télémaque, went through a remarkable number of metamorphoses in the Nahḍah, the Arab world’s cultural revival movement of the long nineteenth century. This article examines two early manuscript translations by Syrian Christian writers in the 1810s, the rhymed prose version by Rifāʿah Rāfiʿ al-Ṭahṭāwī in the 1860s; its rewriting by Shāhīn ʿAṭiyyah in 1885; and Saʿdallāh al-Bustānī’s musical drama of 1869, the basis for performances later in the century by the famous actor Salāmah Ḥijāzī. Placing Télémaque’s Arabic trajectory within its global vogue in the Enlightenment suggests ways of reading the Nahḍah between theories of world literature and ‘transnational mass-texts’, and more specific local histories of translation and literary adaptation. The ambiguity of Télémaque, its hybrid and transitional form, was important to its success in milieux facing analogous kinds of hybridity and transition—among them those of the Arab Nahḍah.", "issue": "3", - "language": "en", + "language": "eng", "libraryCatalog": "brill.com", "pages": "171-203", "publicationTitle": "Journal of Arabic Literature", @@ -301,7 +331,7 @@ var testCases = [ }, { "type": "web", - "url": "https://brill.com/view/title/58302", + "url": "https://brill.com/edcollbook/title/58302", "items": [ { "itemType": "book", @@ -338,7 +368,7 @@ var testCases = [ "language": "en", "libraryCatalog": "brill.com", "publisher": "Brill", - "url": "https://brill.com/view/title/58302", + "url": "https://brill.com/edcollbook/title/58302", "attachments": [ { "title": "Snapshot", @@ -365,7 +395,7 @@ var testCases = [ }, { "type": "web", - "url": "https://referenceworks.brillonline.com/entries/encyclopaedia-iranica-online/abaev-vasilii-ivanovich-COM_362360", + "url": "https://referenceworks.brill.com/display/entries/EIRO/COM-362360.xml", "items": [ { "itemType": "encyclopediaArticle", @@ -377,12 +407,11 @@ var testCases = [ "creatorType": "author" } ], - "date": "2021-05-10", "encyclopediaTitle": "Encyclopaedia Iranica Online", + "extra": "DOI: 10.1163/2330-4804_EIRO_COM_362360", "language": "en", - "libraryCatalog": "referenceworks.brillonline.com", - "publisher": "Brill", - "url": "https://referenceworks.brillonline.com/entries/encyclopaedia-iranica-online/abaev-vasilii-ivanovich-COM_362360", + "libraryCatalog": "referenceworks.brill.com", + "url": "https://referenceworks.brill.com/display/entries/EIRO/COM-362360.xml", "attachments": [ { "title": "Snapshot", @@ -397,58 +426,8 @@ var testCases = [ }, { "type": "web", - "url": "https://referenceworks.brillonline.com/browse/encyclopaedia-iranica-online/alpha/e", - "items": "multiple" - }, - { - "type": "web", - "url": "https://bibliographies.brillonline.com/entries/bibliography-of-slavic-linguistics/perspektive-proucavanja-alhamijado-pismenosti-projekt-transkripcije-i-transliteracije-alhamijado-tekstova-lb900000427509?s.num=0&s.f.s2_parent=s.f.book.bibliography-of-slavic-linguistics&s.keywords=%22Abjad%22", - "items": [ - { - "itemType": "journalArticle", - "title": "Perspektive proučavanja alhamijado pismenosti : projekt transkripcije i transliteracije alhamijado tekstova", - "creators": [ - { - "lastName": "Kalajdžija", - "firstName": "Alen", - "creatorType": "author" - } - ], - "date": "2014", - "language": "English", - "libraryCatalog": "Brill", - "pages": "421-430", - "publicationTitle": "Prilozi za orijentalnu filologiju = Contributions to Oriental Philology = Revue de Philologie Orientale", - "shortTitle": "Perspektive proučavanja alhamijado pismenosti", - "url": "https://bibliographies.brillonline.com/entries/bibliography-of-slavic-linguistics/perspektive-proucavanja-alhamijado-pismenosti-projekt-transkripcije-i-transliteracije-alhamijado-tekstova-lb900000427509", - "volume": "64", - "attachments": [], - "tags": [ - { - "tag": "Abjad" - }, - { - "tag": "Script, orthography" - }, - { - "tag": "Serbo-Croatian (Serbian, Croatian, Bosnian)" - }, - { - "tag": "Transliteration" - } - ], - "notes": [ - { - "note": "

E. ab.

" - } - ], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://bibliographies.brillonline.com/search?s.num=0&s.f.s2_parent=s.f.book.bibliography-of-slavic-linguistics&s.keywords=%22Abjad%22", + "url": "https://bibliographies.brill.com/BSLO/items/", + "defer": true, "items": "multiple" } ] From dda46ea9b537eac0623ea271220ee95663a5b9b4 Mon Sep 17 00:00:00 2001 From: Matt Mayer <152770+matthewmayer@users.noreply.github.com> Date: Wed, 19 Jun 2024 03:39:58 +0700 Subject: [PATCH 074/158] Fix Bangkok Post translator (#3308) --- Bangkok Post.js | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Bangkok Post.js b/Bangkok Post.js index b515549e965..216c2b4fe52 100644 --- a/Bangkok Post.js +++ b/Bangkok Post.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-06-07 16:44:19" + "lastUpdated": "2024-06-18 20:39:20" } /* @@ -57,12 +57,12 @@ function scrape(doc, _url) { translator.setHandler('itemDone', function (obj, item) { // Add data for fields that are not covered by Embedded Metadata // Author name is stored as firstname lastname - const authorName = getMetaTag(doc, "property", "cXenseParse:author", "content"); + const authorName = getMetaTag(doc, "name", "lead:author", "content"); if (authorName) { item.creators = [ZU.cleanAuthor(authorName, "author", false)]; } // Date is stored as a timestamp like 2020-09-07T17:37:00+07:00, just extract the YYYY-MM-DD at start - const date = getMetaTag(doc, "name", "cXenseParse:recs:publishtime", "content"); + const date = getMetaTag(doc, "name", "lead:published_at", "content"); if (date) { item.date = date.substr(0, 10); } @@ -73,7 +73,9 @@ function scrape(doc, _url) { item.complete(); }); translator.translate(); -}/** BEGIN TEST CASES **/ +} + +/** BEGIN TEST CASES **/ var testCases = [ { "type": "web", @@ -91,6 +93,7 @@ var testCases = [ ], "date": "2020-09-07", "abstractNote": "A general debate without a vote in the House of Representatives has been scheduled for Wednesday for MPs to question the government on the current economic and political crises and suggest ways of solving related problems.", + "language": "en", "libraryCatalog": "www.bangkokpost.com", "publicationTitle": "Bangkok Post", "url": "https://www.bangkokpost.com/thailand/politics/1981267/house-general-debate-set-for-wednesday", @@ -121,7 +124,7 @@ var testCases = [ }, { "type": "web", - "url": "https://www.bangkokpost.com/tech/1979315/air-force-satellite-napa-1-launched", + "url": "https://www.bangkokpost.com/life/tech/1979315/air-force-satellite-napa-1-launched", "items": [ { "itemType": "newspaperArticle", @@ -135,9 +138,10 @@ var testCases = [ ], "date": "2020-09-03", "abstractNote": "The Royal Thai Air Force’s first security satellite, Napa-1, was successfully launched on a European rocket from French Guiana on Thursday morning.", + "language": "en", "libraryCatalog": "www.bangkokpost.com", "publicationTitle": "Bangkok Post", - "url": "https://www.bangkokpost.com/tech/1979315/air-force-satellite-napa-1-launched", + "url": "https://www.bangkokpost.com/life/tech/1979315/air-force-satellite-napa-1-launched", "attachments": [ { "title": "Snapshot", @@ -175,13 +179,14 @@ var testCases = [ "title": "Tech is key to rebooting tourism", "creators": [ { - "firstName": "Jeff", - "lastName": "Paine", + "firstName": "Bangkok Post Public Company", + "lastName": "Limited", "creatorType": "author" } ], "date": "2020-09-08", - "abstractNote": "Southeast Asia relies heavily on tourism. In 2019, the travel and tourism industry contributed 12.1% of the region's GDP and approximately one in 10 people are employed within and around it, according to the World Travel and Tourism Council (WTTC).", + "abstractNote": "Southeast Asia relies heavily on tourism. In 2019, the travel and tourism industry contributed 12.1% of the region", + "language": "en", "libraryCatalog": "www.bangkokpost.com", "publicationTitle": "Bangkok Post", "url": "https://www.bangkokpost.com/opinion/opinion/1981587/tech-is-key-to-rebooting-tourism", From ee9ed8df2ca9786e0f66942e8cbdd20acb5d8ef4 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 18 Jun 2024 16:45:18 -0400 Subject: [PATCH 075/158] Bangkok Post: More tweaks - Remove getMetaTag(), just use attr() - Fix opinion piece author extraction --- Bangkok Post.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Bangkok Post.js b/Bangkok Post.js index 216c2b4fe52..74ca4f5b499 100644 --- a/Bangkok Post.js +++ b/Bangkok Post.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-06-18 20:39:20" + "lastUpdated": "2024-06-18 20:46:45" } /* @@ -41,13 +41,7 @@ function detectWeb(_doc, _url) { function doWeb(doc, url) { scrape(doc, url); } -function getMetaTag(doc, attr, value, contentattr) { - const tag = Array.from(doc.getElementsByTagName("meta")).filter(m => m.attributes[attr] && m.attributes[attr].value == value)[0]; - if (tag && tag.attributes[contentattr]) { - return tag.attributes[contentattr].value; - } - return null; -} + function scrape(doc, _url) { const translator = Zotero.loadTranslator('web'); // Embedded Metadata @@ -57,12 +51,15 @@ function scrape(doc, _url) { translator.setHandler('itemDone', function (obj, item) { // Add data for fields that are not covered by Embedded Metadata // Author name is stored as firstname lastname - const authorName = getMetaTag(doc, "name", "lead:author", "content"); + let authorName = attr(doc, "meta[name='lead:author']", "content"); + if (!authorName) { + authorName = text(doc, '.info-opinion .columnnist-name a'); + } if (authorName) { item.creators = [ZU.cleanAuthor(authorName, "author", false)]; } // Date is stored as a timestamp like 2020-09-07T17:37:00+07:00, just extract the YYYY-MM-DD at start - const date = getMetaTag(doc, "name", "lead:published_at", "content"); + const date = attr(doc, "meta[name='lead:published_at']", "content"); if (date) { item.date = date.substr(0, 10); } @@ -179,8 +176,8 @@ var testCases = [ "title": "Tech is key to rebooting tourism", "creators": [ { - "firstName": "Bangkok Post Public Company", - "lastName": "Limited", + "firstName": "Jeff", + "lastName": "Paine", "creatorType": "author" } ], From 682cb285cd190a8df5fd684c5bd8e29003083454 Mon Sep 17 00:00:00 2001 From: Adomas Ven Date: Wed, 19 Jun 2024 10:55:56 +0300 Subject: [PATCH 076/158] IEEE Xplore: Remove detect web check for top-frame (#3322) This was added in 2012 (2534bcdb) for Z4FX and is no longer relevant in any place where we run translation --- IEEE Xplore.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/IEEE Xplore.js b/IEEE Xplore.js index d258e8ea445..be3e6b2c2f3 100644 --- a/IEEE Xplore.js +++ b/IEEE Xplore.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-09-24 03:17:24" + "lastUpdated": "2024-06-19 07:53:06" } /* @@ -37,7 +37,6 @@ function detectWeb(doc, url) { Zotero.monitorDOMChanges(doc.querySelector('.global-content-wrapper')); - if (doc.defaultView !== null && doc.defaultView !== doc.defaultView.top) return false; if (/[?&]arnumber=(\d+)/i.test(url) || /\/document\/\d+/i.test(url)) { var firstBreadcrumb = ZU.xpathText(doc, '(//div[contains(@class, "breadcrumbs")]//a)[1]'); From dbe6fe123c32cfdfe5efcd4b5ffd5d05cec12b15 Mon Sep 17 00:00:00 2001 From: Dave Bunten Date: Mon, 24 Jun 2024 13:06:54 -0600 Subject: [PATCH 077/158] Add translator for CITATION.cff file references (#3274) Co-authored-by: Abe Jellinek --- CFF References.js | 170 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 CFF References.js diff --git a/CFF References.js b/CFF References.js new file mode 100644 index 00000000000..cb075e3ad0c --- /dev/null +++ b/CFF References.js @@ -0,0 +1,170 @@ +{ + "translatorID": "99A6641F-A8C2-4923-9BBB-0DA87F1E5187", + "label": "CFF References", + "creator": "Sebastian Karcher, Dave Bunten", + "target": "cff", + "minVersion": "5.0", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 2, + "lastUpdated": "2024-05-17 20:02:13" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 Sebastian Karcher, Dave Bunten + + 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 ***** +*/ + +// set a global for spacing purposes under the references key of a citation.cff file +var referencesSpacing = ' '; + +function writeArray(array) { + if (!array.length) return false; + let output = "\n"; + for (let elem of array) { + if (!elem) continue; + output += referencesSpacing + " - " + elem + "\n"; + } + return output.replace(/\n$/, ""); +} + +function writeDOI(itemDOI) { + if (!itemDOI) return false; + let doi = "\n" + referencesSpacing + " - type: doi\n" + referencesSpacing + " value: " + itemDOI; + return doi; +} + +function writeCreators(itemCreators, creatorType="") { + let itemAuthors = []; + for (let creator of itemCreators) { + if (creatorType != "" && ZU.getCreatorsForType(creator.itemType)[0] == creatorType) { + itemAuthors.push(creator); + } + else { + itemAuthors.push(creator); + } + } + if (!itemAuthors.length) return false; + let authors = "\n"; + for (let author of itemAuthors) { + authors += referencesSpacing + " - family-names: " + author.lastName + "\n"; + if (author.firstName) { + authors += referencesSpacing + " given-names: " + author.firstName + "\n"; + } + } + return authors.replace(/\n$/, ""); +} + +function doExport() { + var item; + + Zotero.write('# This CITATION.cff reference content was generated from Zotero.\n'); + Zotero.write('references:\n'); + + while ((item = Zotero.nextItem())) { + var cff = {}; + cff.title = ">-\n" + referencesSpacing + " " + item.title + "\n"; + cff.abstract = item.abstractNote; + cff.type = item.itemType; + cff.license = item.rights; + cff.version = item.versionNumber; + + cff.collection_title = item.proceedingsTitle; + cff.conference = item.conferenceName; + cff.copyright = item.rights; + cff.database = item.libraryCatalog; + cff.date_accessed = item.accessDate; + cff.edition = item.edition; + cff.editors_series = item.series + cff.format = item.format; + cff.institution = item.institution; + cff.isbn = item.ISBN; + cff.issn = item.ISSN; + cff.issue = item.issue; + cff.issue_date = item.issueDate; + cff.journal = item.journalAbbreviation; + cff.languages = writeArray([item.language]); + cff.location = item.archiveLocation; + cff.medium = item.medium; + cff.number = item.number; + cff.number_volumes = item.numberOfVolumes; + cff.pages = item.pages; + // match for pmcid within extras content + if (item.extra && /^pmcid:/i.test(item.extra)) { + cff.pmcid = item.extra.match(/pmcid:\s*(\S+)/); + } + cff.publisher = item.publisher; + cff.repository = item.repository; + cff.section = item.section; + cff.thesis_type = item.thesisType; + cff.volume = item.volume; + cff.url = item.url; + cff.keywords = writeArray(item.tags.map(tag => tag.tag || tag)); + if (["letter", "email", "instantMessage"].includes(item.itemType)) { + cff.senders = writeCreators(item.creators, "author"); + } + else { + cff.authors = writeCreators(item.creators, ZU.getCreatorsForType(item.itemType)[0]); + } + cff.editors = writeCreators(item.creators, "editor"); + cff.recipients = writeCreators(item.creators, "recipient"); + cff.translators = writeCreators(item.creators, "translator"); + + if (item.date) { + // if we have a dataset or software, use date-released field + if (item.itemType == "dataset" || item.itemType == "computerProgram") { + cff["date-released"] = ZU.strToISO(item.date); + } + // include date published for any item types + cff["date-published"] = ZU.strToISO(item.date); + } + // get DOI from Extra for software; this will stop running automatically once software supports DOI + if (!ZU.fieldIsValidForType('DOI', item.itemType) && /^doi:/im.test(item.extra)) { + item.DOI = ZU.cleanDOI(item.extra); + } + cff.identifiers = writeDOI(item.DOI); + + // prep the entry as a new item + Zotero.write(' - '); + + // loop through the cff elements and write output + for (let field in cff) { + if (!cff[field]) continue; + if (field == "title") { + // rely on prep dash for item start above for titles + Zotero.write(field + ": " + cff[field]); + } + else if (field == "abstract") { + // multiline + Zotero.write(referencesSpacing + field + ": |" + cff[field].replace(/^|\n/g, "\n" + referencesSpacing + " ") + "\n"); + } + else { + Zotero.write(referencesSpacing + field.replace("_", "-") + ": " + cff[field] + "\n"); + } + } + } +} + +/** BEGIN TEST CASES **/ +var testCases = [ +] +/** END TEST CASES **/ From 0374a06a47a76aa5c5b2aec6187a1002b5d076c8 Mon Sep 17 00:00:00 2001 From: advoropaev <90554351+advoropaev@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:36:35 +0300 Subject: [PATCH 078/158] eLibrary.ru: Update for site changes (#3289) Co-authored-by: Abe Jellinek --- eLibrary.ru.js | 146 ++++++++++++++++++++++++++++++------------------- 1 file changed, 89 insertions(+), 57 deletions(-) diff --git a/eLibrary.ru.js b/eLibrary.ru.js index 2164bfec58c..6b9112a5f35 100644 --- a/eLibrary.ru.js +++ b/eLibrary.ru.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-04-20 20:02:47" + "lastUpdated": "2024-06-24 19:34:39" } /* @@ -46,31 +46,28 @@ function detectWeb(doc, url) { return false; } -function doWeb(doc, url) { - var articles = []; +async function doWeb(doc, url) { if (detectWeb(doc, url) == "multiple") { var results = ZU.xpath(doc, '//table[@id="restab"]/tbody/tr[starts-with(@id, "arw")]/td[2]'); // Zotero.debug('results.length: ' + results.length); var items = {}; for (let i = 0; i < results.length; i++) { // Zotero.debug('result [' + i + '] text: ' + results[i].textContent); - var title = ZU.xpathText(results[i], './a'); - var uri = ZU.xpathText(results[i], ' ./a/@href'); + var title = ZU.xpathText(results[i], './/a'); + var uri = ZU.xpathText(results[i], ' .//a/@href'); if (!title || !uri) continue; items[uri] = fixCasing(title); } - Zotero.selectItems(items, function (items) { - if (!items) { - return; - } - for (let i in items) { - articles.push(i); - } - Zotero.Utilities.processDocuments(articles, scrape); - }); + items = await Zotero.selectItems(items); + if (!items) { + return; + } + for (let url of Object.keys(items)) { + await scrape(await requestDocument(url)); + } } else { - scrape(doc, url); + await scrape(doc, url); } } @@ -103,6 +100,9 @@ function getDocType(doc) { case "публикация в сборнике трудов конференции": itemType = "conferencePaper"; break; + case "тезисы доклада на конференции": + itemType = "conferencePaper"; + break; default: Zotero.debug("Unknown type: " + docType + ". Using 'journalArticle'"); itemType = "journalArticle"; @@ -111,7 +111,29 @@ function getDocType(doc) { return itemType; } -function scrape(doc, url) { +async function scrape(doc, url = doc.location.href) { + if (doc.querySelector('.help.pointer') && !doc.querySelector('.help.pointer[title]')) { + // Full author names are in the HTML at page load but are stripped and replaced with + // JS tooltips. Try to reload the page and see if we can get the tooltips. If we + // still get a page without tooltips, we might've hit a captcha (seems to commonly + // happen when requesting from a US IP), so don't worry about it. + Zotero.debug('Re-requesting to get original HTML'); + try { + let newDoc = await requestDocument(url, { + headers: { Referer: url } + }); + if (newDoc.querySelector('.help.pointer[title]')) { + doc = newDoc; + } + else { + Zotero.debug('Hit a captcha? ' + newDoc.location.href); + } + } + catch (e) { + Zotero.debug('Failed: ' + e); + } + } + var item = new Zotero.Item(); item.itemType = getDocType(doc); item.title = fixCasing(doc.title); @@ -119,13 +141,27 @@ function scrape(doc, url) { var rightPart = doc.getElementById("leftcol").nextSibling; var centralColumn = ZU.xpath(rightPart, './table/tbody/tr[2]/td[@align="left"]'); - var datablock = ZU.xpath(centralColumn, './div[1]'); + var datablock = ZU.xpath(centralColumn, './div[2]'); - var authors = ZU.xpath(datablock, './/table[1]//b'); + var authors = ZU.xpath(datablock, './/table[1]/tbody/tr/td[2]//b'); // Zotero.debug('authors.length: ' + authors.length); - for (let i = 0; i < authors.length; i++) { - var dirty = authors[i].textContent; + for (let author of authors) { + let dirty = author.textContent; + try { + let tooltipParent = author.closest('.help.pointer[title]'); + if (tooltipParent) { + let tooltipHTML = tooltipParent.getAttribute('title'); + let tooltipAuthorName = text(new DOMParser().parseFromString(tooltipHTML, 'text/html'), 'font'); + if (tooltipAuthorName) { + dirty = tooltipAuthorName; + } + } + } + catch (e) { + Zotero.debug(e); + } + // Zotero.debug('author[' + i + '] text: ' + dirty); /* Common author field formats are: @@ -182,6 +218,7 @@ function scrape(doc, url) { Номер: "issue", ISSN: "ISSN", "Число страниц": "pages", // e.g. "83" + Страницы: "pages", Язык: "language", "Место издания": "place" }; @@ -255,7 +292,6 @@ function scrape(doc, url) { item.complete(); } - /** BEGIN TEST CASES **/ var testCases = [ { @@ -269,7 +305,7 @@ var testCases = [ "items": [ { "itemType": "journalArticle", - "title": "Иноязычные заимствования в художественной прозе на иврите в XX в", + "title": "Иноязычные заимствования в художественной прозе на иврите в XX в.", "creators": [ { "firstName": "М. В.", @@ -301,27 +337,27 @@ var testCases = [ "title": "Использование Молекулярно-Генетических Методов Установления Закономерностей Наследования Для Выявления Доноров Значимых Признаков Яблони", "creators": [ { - "firstName": "Иван Иванович", + "firstName": "И. И.", "lastName": "Супрун", "creatorType": "author" }, { - "firstName": "Елена Владимировна", + "firstName": "Е. В.", "lastName": "Ульяновская", "creatorType": "author" }, { - "firstName": "Евгений Николаевич", + "firstName": "Е. Н.", "lastName": "Седов", "creatorType": "author" }, { - "firstName": "Галина Алексеевна", + "firstName": "Г. А.", "lastName": "Седышева", "creatorType": "author" }, { - "firstName": "Зоя Михайловна", + "firstName": "З. М.", "lastName": "Серова", "creatorType": "author" } @@ -455,14 +491,14 @@ var testCases = [ }, { "type": "web", - "url": "https://elibrary.ru/item.asp?id=20028198", + "url": "https://www.elibrary.ru/item.asp?id=20028198", "items": [ { "itemType": "book", "title": "Аппарат издания и правила оформления", "creators": [ { - "firstName": "Людмила Павловна", + "firstName": "Л. П.", "lastName": "Стычишина", "creatorType": "author" }, @@ -475,7 +511,7 @@ var testCases = [ "language": "ru", "libraryCatalog": "eLibrary.ru", "publisher": "Изд-во Политехнического университета", - "url": "https://elibrary.ru/item.asp?id=20028198", + "url": "https://www.elibrary.ru/item.asp?id=20028198", "attachments": [], "tags": [ { @@ -537,7 +573,7 @@ var testCases = [ "date": "2019", "DOI": "10.31857/S0869-56524863275-279", "ISSN": "0869-5652", - "abstractNote": "Для классов графиков -отображений нильпотентных градуированных групп доказана формула площади на сублоренцевых структурах произвольной глубины с многомерным временем.", + "abstractNote": "Для классов графиков - отображений нильпотентных градуированных групп доказана формула площади на сублоренцевых структурах произвольной глубины с многомерным временем.", "issue": "3", "language": "ru", "libraryCatalog": "eLibrary.ru", @@ -547,27 +583,6 @@ var testCases = [ "volume": "486", "attachments": [], "tags": [ - { - "tag": "Contact Mapping" - }, - { - "tag": "Graph-Mapping" - }, - { - "tag": "Intrinsic Basis" - }, - { - "tag": "Multidimensional Time" - }, - { - "tag": "Nilpotent Graded Group" - }, - { - "tag": "Sub-Lorentzian Structure" - }, - { - "tag": "Surface Area" - }, { "tag": "Внутренний Базис" }, @@ -736,7 +751,7 @@ var testCases = [ }, { "type": "web", - "url": "https://www.elibrary.ru/item.asp?id=22208210", + "url": "https://elibrary.ru/item.asp?id=22208210", "items": [ { "itemType": "journalArticle", @@ -750,6 +765,7 @@ var testCases = [ ], "date": "2013", "ISSN": "0025-2344", + "abstractNote": "The present study extends the findings of Lynn (2010), who reported higher mean IQ in northern than southern Italy and of Templer (2012), who found biological correlates of IQ in the Italian regions. The present study found that murder and attempted murder rates were associated with Mediterranean/Mideastern characteristics (lower IQ, black hair, black eyes) and that lower murder rates were associated with central/northern European characteristics (higher cephalic index, blond hair, blue eyes, and higher multiple sclerosis and schizophrenia rates). The eye and hair color findings are consistent with the human and animal literature finding of darker coloration associated with greater aggression. © Copyright 2013.", "issue": "1", "language": "en", "libraryCatalog": "eLibrary.ru", @@ -758,7 +774,23 @@ var testCases = [ "url": "https://www.elibrary.ru/item.asp?id=22208210", "volume": "54", "attachments": [], - "tags": [], + "tags": [ + { + "tag": "Eye Color" + }, + { + "tag": "Hair Color" + }, + { + "tag": "Iq" + }, + { + "tag": "Italy" + }, + { + "tag": "Murder" + } + ], "notes": [], "seeAlso": [] } @@ -766,7 +798,7 @@ var testCases = [ }, { "type": "web", - "url": "https://elibrary.ru/item.asp?id=35209757", + "url": "https://www.elibrary.ru/item.asp?id=35209757", "items": [ { "itemType": "journalArticle", @@ -778,7 +810,7 @@ var testCases = [ "creatorType": "author" }, { - "firstName": "Галина Георгиевна", + "firstName": "Г. Г.", "lastName": "Харсеева", "creatorType": "author" }, @@ -802,7 +834,7 @@ var testCases = [ "libraryCatalog": "eLibrary.ru", "pages": "375-378", "publicationTitle": "Клиническая Лабораторная Диагностика", - "url": "https://elibrary.ru/item.asp?id=35209757", + "url": "https://www.elibrary.ru/item.asp?id=35209757", "volume": "63", "attachments": [], "tags": [ From 7d3a67b6ee14d9a56cb33cae051d60af931173bd Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 27 Jun 2024 11:32:09 -0400 Subject: [PATCH 079/158] SVT Nyheter: Rewrite and update for site changes Fixes #3326 --- SVT Nyheter.js | 219 +++++++++++++++++++++++++++++-------------------- 1 file changed, 130 insertions(+), 89 deletions(-) diff --git a/SVT Nyheter.js b/SVT Nyheter.js index 7a6cabc2c6b..71d7555a47a 100644 --- a/SVT Nyheter.js +++ b/SVT Nyheter.js @@ -8,102 +8,94 @@ "priority": 100, "inRepository": true, "translatorType": 4, - "browserSupport": "gcisbv", - "lastUpdated": "2018-08-13 09:15:36" + "browserSupport": "gcsibv", + "lastUpdated": "2024-06-27 15:32:02" } /* - ***** BEGIN LICENSE BLOCK ***** + ***** BEGIN LICENSE BLOCK ***** - Copyright © 2018 Sebastian Berlin - - 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. + Copyright © 2024 Abe Jellinek - 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. + This file is part of Zotero. - You should have received a copy of the GNU Affero General Public License - along with Zotero. If not, see . + 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. - ***** END LICENSE BLOCK ***** -*/ + 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 . -// attr()/text() v2 -function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null;}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null;} + ***** END LICENSE BLOCK ***** +*/ function detectWeb(doc, url) { - return "newspaperArticle"; + if (url.includes('/nyheter/') && doc.querySelector('#root > [data-typename="NewsArticle"]')) { + return 'newspaperArticle'; + } + else if (getSearchResults(doc, true)) { + return 'multiple'; + } + return false; } - -function doWeb(doc, url) { - scrape(doc, url); +function getSearchResults(doc, checkOnly) { + var items = {}; + var found = false; + var rows = doc.querySelectorAll('ul[class^="TeaserFeed"] li article > a'); + for (let row of rows) { + let href = row.href; + let title = ZU.trimInternal(text(row, '.nyh_teaser__heading-title')); + if (!href || !title) continue; + if (checkOnly) return true; + found = true; + items[href] = title; + } + 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 url of Object.keys(items)) { + await scrape(await requestDocument(url)); + } + } + else { + await scrape(doc, url); + } +} -function scrape(doc, url) { - var translator = Zotero.loadTranslator('web'); +async function scrape(doc, url = doc.location.href) { + let translator = Zotero.loadTranslator('web'); // Embedded Metadata translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48'); - - translator.setHandler('itemDone', function (obj, item) { - var nameNodes = ZU.xpath(doc, '//a[@class="nyh_article__author-email"]'); - - for (let nameNode of nameNodes) { - let nameString = nameNode.textContent; - let author = ZU.cleanAuthor(nameString, "author"); - let firstNames = author.firstName.split(" "); - if(firstNames.length > 1) { - // Assume that there's only one first name and move any - // "extra" name to lastName. - author.firstName = firstNames[0]; - author.lastName = firstNames[1] + " " + author.lastName; - } - item.creators.push(author); - } - if (item.creators.length === 0) { - // No author was found, look for non-person authors, e.g. TT. - var authorString = ZU.xpathText(doc, '//span[@class="nyh_article__author-name"]'); - var author = ZU.cleanAuthor(authorString, "author"); - author.firstName = undefined; - author.fieldMode = true; - item.creators.push(author); - } - - item.section = ZU.xpathText(doc, '//a[@class="nyh_section-header__link"]'); - - var dateString = attr(doc, 'meta[property="article:published_time"]', "content"); - if(dateString) { - // The date strings have the format "2018-02-28T02:24:59+01:00". - item.date = dateString.split("T")[0]; - } - - if(url.match(/\/nyheter\/uutiset\/(?!svenska\/)/)) { - // Uutiset articles are in Finnish, except when in the Swedish - // category. - item.language = "fi"; + translator.setDocument(doc); + + translator.setHandler('itemDone', (_obj, item) => { + item.date = ZU.strToISO(item.date); + item.section = text(doc, 'h1 > a[class^="SectionHeader"]'); + if (item.section == 'Uutiset' && !url.includes('/svenska/')) { + item.language = 'fi'; } - + item.creators = Array.from(doc.querySelectorAll('footer a > span[itemprop="author"]')) + .map(author => ZU.cleanAuthor(author.textContent, 'author')); item.complete(); }); - translator.getTranslatorObject(function(trans) { - trans.itemType = "newspaperArticle"; - trans.addCustomFields({ - 'twitter:description': 'abstractNote' - }); - trans.doWeb(doc, url); - }); + let em = await translator.getTranslatorObject(); + em.itemType = 'newspaperArticle'; + await em.doWeb(doc, url); } + /** BEGIN TEST CASES **/ var testCases = [ { @@ -129,7 +121,8 @@ var testCases = [ "url": "https://www.svt.se/nyheter/lokalt/ost/kronobranneriet", "attachments": [ { - "title": "Snapshot" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [], @@ -140,15 +133,15 @@ var testCases = [ }, { "type": "web", - "url": "http://www.svt.se/nyheter/utrikes/varldens-morkaste-byggnad-finns-i-sydkorea", + "url": "https://www.svt.se/nyheter/utrikes/varldens-morkaste-byggnad-finns-i-sydkorea", "items": [ { "itemType": "newspaperArticle", "title": "Världens mörkaste byggnad finns i Sydkorea", "creators": [ { - "firstName": "Sophia", - "lastName": "Garcia Hasselberg", + "firstName": "Sophia Garcia", + "lastName": "Hasselberg", "creatorType": "author" } ], @@ -161,7 +154,8 @@ var testCases = [ "url": "https://www.svt.se/nyheter/utrikes/varldens-morkaste-byggnad-finns-i-sydkorea", "attachments": [ { - "title": "Snapshot" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [], @@ -177,13 +171,7 @@ var testCases = [ { "itemType": "newspaperArticle", "title": "”Extremt viktigt” vikingafynd i England", - "creators": [ - { - "lastName": "TT", - "creatorType": "author", - "fieldMode": true - } - ], + "creators": [], "date": "2018-02-19", "abstractNote": "På 1970-talet upptäcktes en massgrav som troddes härröra från den stora vikingaarmé som invaderade England i slutet av 800-talet. Men på grund av en felmätning föll fynden i glömska. Nu, mer än 40 år senare, gör massgraven en storstilad återkomst som ett av de viktigaste vikingafynden någonsin.", "language": "sv", @@ -193,7 +181,8 @@ var testCases = [ "url": "https://www.svt.se/nyheter/vetenskap/extremt-viktigt-vikingafynd-i-england", "attachments": [ { - "title": "Snapshot" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [], @@ -231,7 +220,8 @@ var testCases = [ "url": "https://www.svt.se/nyheter/inrikes/trafikanter-varnas-vissa-vagar-hala-som-skridskobanor", "attachments": [ { - "title": "Snapshot" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [], @@ -263,7 +253,8 @@ var testCases = [ "url": "https://www.svt.se/nyheter/uutiset/meankielen-paivaa-juhlitaan-pajalassa", "attachments": [ { - "title": "Snapshot" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [], @@ -295,7 +286,8 @@ var testCases = [ "url": "https://www.svt.se/nyheter/uutiset/svenska/finska-gymnasieelever-flyttar-till-sverige-for-sport", "attachments": [ { - "title": "Snapshot" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [], @@ -327,7 +319,8 @@ var testCases = [ "url": "https://www.svt.se/nyheter/utrikes/tyska-bilindustrin-testar-avgaser-pa-apor-och-manniskor", "attachments": [ { - "title": "Snapshot" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [], @@ -335,6 +328,54 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://www.svt.se/nyheter/lokalt/vasterbotten/per-hakan-och-mahari-dog-efter-sina-pass-pa-northvolt", + "items": [ + { + "itemType": "newspaperArticle", + "title": "Per-Håkan och Mahari dog efter sina pass på Northvolt", + "creators": [ + { + "firstName": "Oscar", + "lastName": "Hansson", + "creatorType": "author" + }, + { + "firstName": "Oskar", + "lastName": "Jönsson", + "creatorType": "author" + }, + { + "firstName": "Evelina", + "lastName": "Dahlberg", + "creatorType": "author" + } + ], + "date": "2024-06-24", + "abstractNote": "Per-Håkan Söderström, 59, Mahari Bakari, 33, och en 19-årig man dog alla efter sina arbetspass på batterifabriken Northvolt. Nu utreder polisen dödsfallen på nytt. – Vågar de som jobbar kvar gå och lägga sig? Det kan ju hända dem med, säger Per-Håkans bror Lars-Erik.", + "language": "sv", + "libraryCatalog": "www.svt.se", + "publicationTitle": "SVT Nyheter", + "section": "Västerbotten", + "url": "https://www.svt.se/nyheter/lokalt/vasterbotten/per-hakan-och-mahari-dog-efter-sina-pass-pa-northvolt", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.svt.se/nyheter/ekonomi/", + "items": "multiple" } ] /** END TEST CASES **/ From e2bcb03a1598a5a63009105cf638014bf568d2d3 Mon Sep 17 00:00:00 2001 From: Sondre Bogen-Straume Date: Thu, 27 Jun 2024 18:05:45 +0200 Subject: [PATCH 080/158] =?UTF-8?q?Add=20translator=20for=20Brukerh=C3=A5n?= =?UTF-8?q?dboken=20(#3297)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Abe Jellinek --- Brukerhandboken.js | 153 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 Brukerhandboken.js diff --git a/Brukerhandboken.js b/Brukerhandboken.js new file mode 100644 index 00000000000..8de533dcb76 --- /dev/null +++ b/Brukerhandboken.js @@ -0,0 +1,153 @@ +{ + "translatorID": "6c94ba9a-8639-4f58-bea3-076f774cf3a1", + "label": "Brukerhåndboken", + "creator": "Sondre Bogen-Straume", + "target": "https://brukerhandboken\\.miraheze\\.org/", + "minVersion": "5", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 4, + "browserSupport": "gcsibv", + "lastUpdated": "2024-06-27 16:03:43" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 Sondre Bogen-Straume + + 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('/wiki/') && doc.querySelector('.printfooter a[href*="oldid="]')) { + return 'encyclopediaArticle'; + } + return false; +} + +async function doWeb(doc, url) { + await scrape(doc, url); +} + +async function scrape(doc, url = doc.location.href) { + let translator = Zotero.loadTranslator('web'); + // Wikipedia + translator.setTranslator('e5dc9733-f8fc-4c00-8c40-e53e0bb14664'); + translator.setDocument(doc); + + translator.setHandler('itemDone', (_obj, item) => { + item.encyclopediaTitle = 'Brukerhåndboken'; + item.rights = 'Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International'; + item.complete(); + }); + await translator.translate(); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://brukerhandboken.miraheze.org/wiki/Brukermedvirkning", + "items": [ + { + "itemType": "encyclopediaArticle", + "title": "Brukermedvirkning", + "creators": [], + "date": "2024-05-01T08:31:53Z", + "abstractNote": "Informasjon om brukermedvirkning her.", + "encyclopediaTitle": "Brukerhåndboken", + "extra": "Page Version ID: 912", + "language": "nb", + "libraryCatalog": "Brukerhåndboken", + "rights": "Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International", + "url": "https://brukerhandboken.miraheze.org/wiki/Brukermedvirkning?oldid=912", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html", + "snapshot": true + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://brukerhandboken.miraheze.org/wiki/Forside", + "items": [ + { + "itemType": "encyclopediaArticle", + "title": "Forside", + "creators": [], + "date": "2024-05-04T17:20:37Z", + "encyclopediaTitle": "Brukerhåndboken", + "extra": "Page Version ID: 933", + "language": "nb", + "libraryCatalog": "Brukerhåndboken", + "rights": "Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International", + "url": "https://brukerhandboken.miraheze.org/wiki/Forside?oldid=933", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html", + "snapshot": true + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://brukerhandboken.miraheze.org/wiki/Ord_og_forkortelser", + "items": [ + { + "itemType": "encyclopediaArticle", + "title": "Ord og forkortelser", + "creators": [], + "date": "2024-06-13T18:54:19Z", + "abstractNote": "Databaseoppføring: Ord og forkortelser - For brukerrepresentanter i helsetjenesten (Q1)\nOrd og forkortelser er en ordbok for brukerrepresentanter i helsetjenesten. Den inneholder ord og forkortelser som brukes hyppig i helsevesenet, og som er som er nyttig å kunne for brukerrepresentanter i helse- og omsorgstjenesten. Innholdet er kurert fra ulike nettsider, dokumenter og liknende. Det er altså ikke jeg som har skrevet alle forklaringene. Henvisning til kildene for tekstene (hvor de er hentet fra) ble når jeg startet på listen ikke tatt med da jeg ikke planla å gjøre den offentlig. Jeg tar nå med kilde i nye oppføringer der det er relevant.\n\nListen er sortert alfabetisk og ment brukt elektronisk da det finnes lenker i tekstene.\nVed forslag til nye ord og forkortelser bruk dette skjemaet: Send inn nytt ord (Airtable) eller e-post. \nVed forslag til endringer eller du har spørsmål ta gjerne kontakt med meg på e-post.\n\nLista er sortert alfabetisk og ment brukt elektronisk da det finnes lenker i tekstene. Noen forkortelser er det brukt punktum.\nLast ned som PDF her.\n\n{{#unlinkedwikibase| id=Q1 }}\n\nOpprettet:\nMal:History-user", + "encyclopediaTitle": "Brukerhåndboken", + "extra": "Page Version ID: 1640", + "language": "nb", + "libraryCatalog": "Brukerhåndboken", + "rights": "Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International", + "url": "https://brukerhandboken.miraheze.org/wiki/Ord_og_forkortelser?oldid=1640", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html", + "snapshot": true + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + } +] +/** END TEST CASES **/ From 7dc9469a8b4ba34eb4728bb4c5af556ceaacad46 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 27 Jun 2024 12:12:30 -0400 Subject: [PATCH 081/158] CI: Disallow document global --- .eslintrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.eslintrc b/.eslintrc index 300f576547b..552cfe51597 100644 --- a/.eslintrc +++ b/.eslintrc @@ -37,6 +37,11 @@ } ], + "no-restricted-globals": ["error", { + "name": "document", + "message": "Use doc instead." + }], + "zotero-translator/not-executable": "error", "zotero-translator/header-valid-json": "error", "zotero-translator/header-translator-id": "error", From 64509648bbc6a3db6e9954e715c1daba2a2d79c1 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 3 Jul 2024 06:32:49 -0400 Subject: [PATCH 082/158] T&F+NEJM: Refactoring, site changes, support reader pages (#3330) - Asyncify - Support new NEJM issue pages - Get dates from HTML - Use default ISSN for NEJM - Clean up tags - Don't grab broken creators from RIS - Support PDF/EPUB reader pages and download EPUBs --- Taylor and Francis+NEJM.js | 340 +++++++++++++++++++++++++------------ 1 file changed, 236 insertions(+), 104 deletions(-) diff --git a/Taylor and Francis+NEJM.js b/Taylor and Francis+NEJM.js index 630eace5680..c1d846c84f5 100644 --- a/Taylor and Francis+NEJM.js +++ b/Taylor and Francis+NEJM.js @@ -9,14 +9,14 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-02-22 19:17:30" + "lastUpdated": "2024-07-02 20:00:15" } /* ***** BEGIN LICENSE BLOCK ***** Taylor and Francis Translator - Copyright © 2011 Sebastian Karcher + Copyright © 2024 Sebastian Karcher and Abe Jellinek This file is part of Zotero. @@ -38,7 +38,7 @@ function detectWeb(doc, url) { - if (url.match(/\/doi(\/(abs|full|figure))?\/10\./)) { + if (url.match(/\/doi(\/(abs|full|figure|epdf|epub))?\/10\./)) { return "journalArticle"; } else if ((url.includes('/action/doSearch?') || url.includes('/toc/')) && getSearchResults(doc, true)) { @@ -53,12 +53,16 @@ function getSearchResults(doc, checkOnly) { var found = false; // multiples in search results: var rows = ZU.xpath(doc, '//article[contains(@class, "searchResultItem")]//a[contains(@href, "/doi/") and contains(@class, "ref")]'); - if (rows.length == 0) { + if (!rows.length) { // multiples in toc view: rows = ZU.xpath(doc, '//div[contains(@class, "articleLink") or contains(@class, "art_title")]/a[contains(@href, "/doi/") and contains(@class, "ref")]'); - if (!rows.length) { - rows = doc.querySelectorAll('.o-results li > a[href*="/doi/"]'); - } + } + if (!rows.length) { + rows = doc.querySelectorAll('.o-results li > a[href*="/doi/"]'); + } + // https://www.nejm.org/toc/nejm/current + if (!rows.length) { + rows = doc.querySelectorAll('ul.toc_list .issue-item_title > a'); } for (var i = 0; i < rows.length; i++) { var href = rows[i].href; @@ -72,23 +76,24 @@ function getSearchResults(doc, checkOnly) { } -function doWeb(doc, url) { +async function doWeb(doc, url) { if (detectWeb(doc, url) == "multiple") { - Zotero.selectItems(getSearchResults(doc, false), function (items) { - if (!items) { - return; - } - ZU.processDocuments(Object.keys(items), scrape); - }); + let items = await Zotero.selectItems(getSearchResults(doc, false)); + if (!items) { + return; + } + for (let url of Object.keys(items)) { + await scrape(await requestDocument(url)); + } } else { - scrape(doc, url); + await scrape(doc, url); } } -function scrape(doc, url) { - var match = url.match(/\/doi(?:\/(?:abs|full|figure))?\/(10\.[^?#]+)/); +async function scrape(doc, url = doc.location.href) { + var match = url.match(/\/doi(?:\/(?:abs|full|figure|epdf|epub))?\/(10\.[^?#]+)/); var doi = match[1]; var baseUrl = url.match(/https?:\/\/[^/]+/)[0]; @@ -97,80 +102,101 @@ function scrape(doc, url) { + 'direct=true&' + 'include=abs&' + 'doi='; - var risFormat = '&format=ris'; var bibtexFormat = '&format=bibtex'; + var risFormat = '&format=ris'; - ZU.doPost(postUrl, postBody + doi + bibtexFormat, function (text) { - var translator = Zotero.loadTranslator("import"); - // Use BibTeX translator - translator.setTranslator("9cb70025-a888-4a29-a210-93ec52da40d4"); - translator.setString(text); - translator.setHandler("itemDone", function (obj, item) { - // BibTeX content can have HTML entities (e.g. &) in various fields - // We'll just try to unescape the most likely fields to contain these entities - // Note that RIS data is not always correct, so we avoid using it - var unescapeFields = ['title', 'publicationTitle', 'abstractNote']; - for (var i = 0; i < unescapeFields.length; i++) { - if (item[unescapeFields[i]]) { - item[unescapeFields[i]] = ZU.unescapeHTML(item[unescapeFields[i]]); - } - } - - item.bookTitle = item.publicationTitle; + let bibtexText = await requestText(postUrl, { method: 'POST', body: postBody + doi + bibtexFormat }); + let risText = await requestText(postUrl, { method: 'POST', body: postBody + doi + risFormat }); + // Y1 is online publication date + if (/^DA\s+-\s+/m.test(risText)) { + risText = risText.replace(/^Y1(\s+-.*)/gm, ''); + } - // unfortunately, bibtex is missing some data - // publisher, ISSN/ISBN - ZU.doPost(postUrl, postBody + doi + risFormat, function (text) { - // Y1 is online publication date - if (/^DA\s+-\s+/m.test(text)) { - text = text.replace(/^Y1(\s+-.*)/gm, ''); - } - - var risTrans = Zotero.loadTranslator("import"); - risTrans.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); - risTrans.setString(text); - risTrans.setHandler("itemDone", function (obj, risItem) { - if (!item.title) item.title = ""; // RIS title can be even worse, it actually says "null" - if (risItem.date) item.date = risItem.date; // More complete - item.publisher = risItem.publisher; - item.ISSN = risItem.ISSN; - item.ISBN = risItem.ISBN; - // clean up abstract removing Abstract:, Summary: or Abstract Summary: - if (item.abstractNote) item.abstractNote = item.abstractNote.replace(/^(Abstract)?\s*(Summary)?:?\s*/i, ""); - if (item.title.toUpperCase() == item.title) { - item.title = ZU.capitalizeTitle(item.title, true); - } - if (risItem.creators) item.creators = risItem.creators; - finalizeItem(item, doc, doi, baseUrl); - }); - risTrans.translate(); - }); - }); - translator.translate(); + var item; + var risItem; + + var bibtexTrans = Zotero.loadTranslator("import"); + bibtexTrans.setTranslator("9cb70025-a888-4a29-a210-93ec52da40d4"); // BibTeX + bibtexTrans.setString(bibtexText); + bibtexTrans.setHandler("itemDone", function (obj, partialItem) { + item = partialItem; }); -} + await bibtexTrans.translate(); + var risTrans = Zotero.loadTranslator("import"); + risTrans.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); // RIS + risTrans.setString(risText); + risTrans.setHandler("itemDone", function (obj, partialItem) { + risItem = partialItem; + }); + await risTrans.translate(); + + // BibTeX content can have HTML entities (e.g. &) in various fields + // We'll just try to unescape the most likely fields to contain these entities + // Note that RIS data is not always correct, so we avoid using it + var unescapeFields = ['title', 'publicationTitle', 'abstractNote']; + for (var i = 0; i < unescapeFields.length; i++) { + if (item[unescapeFields[i]]) { + item[unescapeFields[i]] = ZU.unescapeHTML(item[unescapeFields[i]]); + } + } + + item.bookTitle = item.publicationTitle; + + if (!item.title) item.title = ""; // RIS title can be even worse, it actually says "null" + if (risItem.date) item.date = risItem.date; // More complete + if (item.date && /^\d{4}$/.test(item.date)) { + // Use full date from HTML + item.date = ZU.strToISO(text(doc, 'span[property="datePublished"]')); + } + if (item.pages) { + item.pages = item.pages.replace('–', '-'); + } + + item.publisher = risItem.publisher; + item.ISSN = risItem.ISSN; + if (!item.ISSN && item.publicationTitle == 'New England Journal of Medicine') { + item.ISSN = '0028-4793'; + } + + item.ISBN = risItem.ISBN; + // clean up abstract removing Abstract:, Summary: or Abstract Summary: + if (item.abstractNote) item.abstractNote = item.abstractNote.replace(/^(Abstract)?\s*(Summary)?:?\s*/i, ""); + if (item.title.toUpperCase() == item.title) { + item.title = ZU.capitalizeTitle(item.title, true); + } + if (risItem.creators + && risItem.creators.length + && !risItem.creators.every(c => c.fieldMode === 1)) { + item.creators = risItem.creators; + } -function finalizeItem(item, doc, doi, baseUrl) { var subtitle = text(doc, 'h1 + .sub-title > h2'); if (subtitle && !item.title.toLowerCase().includes(subtitle.toLowerCase())) { item.title = item.title.replace(/:$/, '') + ': ' + subtitle; } - var pdfurl = baseUrl + '/doi/pdf/'; - // add keywords var keywords = ZU.xpath(doc, '//div[contains(@class, "abstractKeywords")]//a'); - for (var i = 0; i < keywords.length; i++) { - item.tags.push(keywords[i].textContent); + for (let keyword of keywords) { + item.tags.push(keyword.textContent.replace(/[;\s]+$/, '')); } // add attachments - item.attachments = [{ - title: 'Full Text PDF', - url: pdfurl + doi, - mimeType: 'application/pdf' - }]; + if (url.includes('/doi/epub')) { + item.attachments = [{ + title: 'Full Text EPUB', + url: baseUrl + '/doi/epub/' + doi + '?download=true', + mimeType: 'application/epub+zip' + }]; + } + else { + item.attachments = [{ + title: 'Full Text PDF', + url: baseUrl + '/doi/pdf/' + doi, + mimeType: 'application/pdf' + }]; + } item.complete(); } @@ -201,7 +227,7 @@ var testCases = [ "creatorType": "author" } ], - "date": "December 1, 2008", + "date": "2008-12-01", "DOI": "10.1080/17487870802543480", "ISSN": "1748-7870", "abstractNote": "This article analyzes the evolution of informal employment in Peru from 1986 to 2001. Contrary to what one would expect, the informality rates increased steadily during the 1990s despite the introduction of flexible contracting mechanisms, a healthy macroeconomic recovery, and tighter tax codes and regulation. We explore different factors that may explain this upward trend including the role of labor legislation and labor allocation between/within sectors of economic activity. Finally, we illustrate the negative correlation between productivity and informality by evaluating the impacts of the Youth Training PROJOVEN Program that offers vocational training to disadvantaged young individuals. We find significant training impacts on the probability of formal employment for both males and females.", @@ -242,7 +268,7 @@ var testCases = [ }, { "type": "web", - "url": "http://www.tandfonline.com/toc/clah20/22/4", + "url": "https://www.tandfonline.com/toc/clah20/22/4", "items": "multiple" }, { @@ -269,7 +295,7 @@ var testCases = [ "creatorType": "author" } ], - "date": "December 1, 2008", + "date": "2008-12-01", "DOI": "10.1080/17487870802543480", "ISSN": "1748-7870", "abstractNote": "This article analyzes the evolution of informal employment in Peru from 1986 to 2001. Contrary to what one would expect, the informality rates increased steadily during the 1990s despite the introduction of flexible contracting mechanisms, a healthy macroeconomic recovery, and tighter tax codes and regulation. We explore different factors that may explain this upward trend including the role of labor legislation and labor allocation between/within sectors of economic activity. Finally, we illustrate the negative correlation between productivity and informality by evaluating the impacts of the Youth Training PROJOVEN Program that offers vocational training to disadvantaged young individuals. We find significant training impacts on the probability of formal employment for both males and females.", @@ -318,16 +344,16 @@ var testCases = [ "creators": [ { "lastName": "Park", - "firstName": "Joo Heon", + "firstName": "Joo Heon", "creatorType": "author" }, { "lastName": "MacLachlan", - "firstName": "Douglas L.", + "firstName": "Douglas L.", "creatorType": "author" } ], - "date": "January 1, 2013", + "date": "2013-01-01", "DOI": "10.1080/00036846.2011.568404", "ISSN": "0003-6846", "abstractNote": "Measuring consumers’ Willingness To Pay (WTP) without considering the level of uncertainty in valuation and the consequent risk premiums will result in estimates that are biased toward lower values. This research proposes a model and method for correctly assessing WTP in cases involving valuation uncertainty. The new method, called Risk Adjustment Mechanism (RAM), is presented theoretically and demonstrated empirically. It is shown that the RAM outperforms the traditional method for assessing WTP, especially in a context of a nonmarket good such as a totally new product.", @@ -374,7 +400,7 @@ var testCases = [ }, { "type": "web", - "url": "http://www.nejm.org/toc/nejm/medical-journal", + "url": "https://www.nejm.org/toc/nejm/current", "items": "multiple" }, { @@ -386,37 +412,36 @@ var testCases = [ "title": "Cutting Family Planning in Texas", "creators": [ { - "lastName": "White", "firstName": "Kari", + "lastName": "White", "creatorType": "author" }, { - "lastName": "Grossman", "firstName": "Daniel", + "lastName": "Grossman", "creatorType": "author" }, { - "lastName": "Hopkins", "firstName": "Kristine", + "lastName": "Hopkins", "creatorType": "author" }, { - "lastName": "Potter", "firstName": "Joseph E.", + "lastName": "Potter", "creatorType": "author" } ], - "date": "September 27, 2012", + "date": "2012-09-27", "DOI": "10.1056/NEJMp1207920", "ISSN": "0028-4793", - "abstractNote": "Four fundamental principles drive public funding for family planning. First, unintended pregnancy is associated with negative health consequences, including reduced use of prenatal care, lower breast-feeding rates, and poor maternal and neonatal outcomes.1,2 Second, governments realize substantial cost savings by investing in family planning, which reduces the rate of unintended pregnancies and the costs of prenatal, delivery, postpartum, and infant care.3 Third, all Americans have the right to choose the timing and number of their children. And fourth, family planning enables women to attain their educational and career goals and families to provide for their children. These principles led . . .", - "extra": "PMID: 23013071", + "abstractNote": "In 2011, Texas slashed funding for family planning services and imposed new restrictions on abortion care, affecting the health care of many low-income women. For demographically similar states, Texas's experience may be a harbinger of public health effects to come. Four fundamental principles drive public funding for family planning. First, unintended pregnancy is associated with negative health consequences, including reduced use of prenatal care, lower breast-feeding rates, and poor maternal and neonatal outcomes.1,2 Second, governments realize substantial cost savings by investing in family planning, which reduces the rate of unintended pregnancies and the costs of prenatal, delivery, postpartum, and infant care.3 Third, all Americans have the right to choose the timing and number of their children. And fourth, family planning enables women to attain their educational and career goals and families to provide for their children. These principles led . . .", "issue": "13", "itemID": "doi:10.1056/NEJMp1207920", "libraryCatalog": "Taylor and Francis+NEJM", "pages": "1179-1181", "publicationTitle": "New England Journal of Medicine", - "url": "https://doi.org/10.1056/NEJMp1207920", + "url": "https://www.nejm.org/doi/full/10.1056/NEJMp1207920", "volume": "367", "attachments": [ { @@ -444,7 +469,7 @@ var testCases = [ "creatorType": "author" } ], - "date": "December 1, 2003", + "date": "2003-12-01", "DOI": "10.1080/0308106032000167373", "ISSN": "0308-1060", "abstractNote": "This article deals with a multicriteria evaluation of High-Speed Rail, Transrapid Maglev and Air Passenger Transport in Europe. Operational, socio-economic and environmental performance indicators of the specific high-speed transport systems are adopted as the evaluation criteria. By using the entropy method, weights are assigned to particular criteria in order to indicate their relative importance in decision-making. The TOPSIS method is applied to carry out the multicriteria evaluation and selection of the preferable alternative (high-speed system) under given circumstances.", @@ -463,19 +488,19 @@ var testCases = [ ], "tags": [ { - "tag": "Entropy method; " + "tag": "Entropy method" }, { - "tag": "Europe; " + "tag": "Europe" }, { - "tag": "High-speed transport systems; " + "tag": "High-speed transport systems" }, { - "tag": "Interest groups " + "tag": "Interest groups" }, { - "tag": "Multicriteria analysis; " + "tag": "Multicriteria analysis" } ], "notes": [], @@ -485,7 +510,7 @@ var testCases = [ }, { "type": "web", - "url": "http://www.tandfonline.com/action/doSearch?AllField=labor+market", + "url": "https://www.tandfonline.com/action/doSearch?AllField=labor+market", "items": "multiple" }, { @@ -507,7 +532,7 @@ var testCases = [ "creatorType": "author" } ], - "date": "September 1, 1991", + "date": "1991-09-01", "DOI": "10.1080/00380768.1991.10415050", "ISSN": "0038-0768", "abstractNote": "Concentration dependence of CO2 evolution from soil was studied under field and laboratory conditions. Under field conditions, when the CO2 concentration was measured with an infrared gas analyzer (IRGA) in a small and column-shaped chamber placed on the ground, the relationship among the CO2 concentration c (m3 m-3), time t (h), height of the chamber h, a constant rate of CO2 evolution from the soil v (m3 m-2 h-1), and an appropriate constant k, was expressed by the following equation, d c/d t = v/ h—k(c— a) (c=a at t = 0). Although most of the data of measured CO2 evolution fitted to this equation, the applicability of the equation was limited to the data to which a linear equation could not be fitted, because the estimated value of v had a larger error than that estimated by linear regression analysis, as observed by computer simulation. The concentration dependence shown above and some other variations were analyzed based on a sorption/diffusion model, i.e. they were associated with CO2-sorption by the soil and modified by the conditions of CO2 diffusion in the soil.", @@ -567,7 +592,7 @@ var testCases = [ "creatorType": "author" } ], - "date": "September 18, 2016", + "date": "2016-09-18", "DOI": "10.1080/00014788.2016.1157680", "ISSN": "0001-4788", "abstractNote": "This paper examines the credibility of performance audit at the micro-level of practice using the general framework of Birnbaum and Stegner's theory of source credibility in which credibility is dependent upon perceptions of the independence of the auditors, their technical competence and the usefulness of audit findings. It reports the results of a field study of a performance audit by the Australian National Audit Office conducted in a major government department. The paper establishes that problems of auditor independence, technical competence and perceived audit usefulness continue to limit the credibility of performance auditing.", @@ -584,7 +609,20 @@ var testCases = [ "mimeType": "application/pdf" } ], - "tags": [], + "tags": [ + { + "tag": "Australian National Audit Office" + }, + { + "tag": "credibility" + }, + { + "tag": "performance auditing" + }, + { + "tag": "source" + } + ], "notes": [], "seeAlso": [] } @@ -599,21 +637,21 @@ var testCases = [ "title": "A Holy Grail — The Prediction of Protein Structure", "creators": [ { - "lastName": "Altman", "firstName": "Russ B.", + "lastName": "Altman", "creatorType": "author" } ], - "date": "2023-10-12", + "date": "2023-10-11", "DOI": "10.1056/NEJMcibr2307735", "ISSN": "0028-4793", - "extra": "PMID: 37732608", + "abstractNote": "The 2023 Lasker Award for Basic Medical Research underscores the value of an AI system that predicts the three-dimensional structure of proteins from the one-dimensional sequence of their amino acids.", "issue": "15", "itemID": "doi:10.1056/NEJMcibr2307735", "libraryCatalog": "Taylor and Francis+NEJM", "pages": "1431-1434", "publicationTitle": "New England Journal of Medicine", - "url": "https://doi.org/10.1056/NEJMcibr2307735", + "url": "https://www.nejm.org/doi/full/10.1056/NEJMcibr2307735", "volume": "389", "attachments": [ { @@ -669,6 +707,100 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://www.tandfonline.com/doi/epdf/10.1080/01457632.2023.2255811?needAccess=true", + "items": [ + { + "itemType": "journalArticle", + "title": "Investigation of Icephobic Coatings for Supercooling Heat Exchangers under Submerged Conditions Using Ice Detection Equipment", + "creators": [ + { + "lastName": "Frandsen", + "firstName": "Jens R.", + "creatorType": "author" + }, + { + "lastName": "Losada", + "firstName": "Ricardo", + "creatorType": "author" + }, + { + "lastName": "Carbonell", + "firstName": "Daniel", + "creatorType": "author" + } + ], + "date": "2024-08-21", + "DOI": "10.1080/01457632.2023.2255811", + "ISSN": "0145-7632", + "abstractNote": "By using ice slurry generated through a supercooler as storage, it is possible to reduce energy consumption due to high energy density and heat transfer rate along with the phase change. The supercooled water will then be disturbed to create ice crystals in a crystallizer. The main challenge is to prevent the formation of ice in the supercooler since this leads to its blockage. One aim of the European H2020 TRI-HP project is to develop icephobic coatings for supercoolers, that promote high-water supercooling and avoid the formation of ice. In this study, three coatings to prevent or depress freezing in supercoolers are investigated. Specialized equipment for testing freezing on submerged surfaces has been developed, and the results have been correlated to standard surface properties like roughness and contact angle. It was found that the submerged surfaces do not necessarily follow normal icing theory, where freeze depression is related to contact angle. Instead, it is believed that the mobility of surface additives in amphiphilic coatings has an important role.", + "issue": "15", + "itemID": "doi:10.1080/01457632.2023.2255811", + "libraryCatalog": "Taylor and Francis+NEJM", + "pages": "1286-1293", + "publicationTitle": "Heat Transfer Engineering", + "url": "https://doi.org/10.1080/01457632.2023.2255811", + "volume": "45", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.tandfonline.com/doi/epub/10.1080/01457632.2023.2255811?needAccess=true", + "items": [ + { + "itemType": "journalArticle", + "title": "Investigation of Icephobic Coatings for Supercooling Heat Exchangers under Submerged Conditions Using Ice Detection Equipment", + "creators": [ + { + "lastName": "Frandsen", + "firstName": "Jens R.", + "creatorType": "author" + }, + { + "lastName": "Losada", + "firstName": "Ricardo", + "creatorType": "author" + }, + { + "lastName": "Carbonell", + "firstName": "Daniel", + "creatorType": "author" + } + ], + "date": "2024-08-21", + "DOI": "10.1080/01457632.2023.2255811", + "ISSN": "0145-7632", + "abstractNote": "By using ice slurry generated through a supercooler as storage, it is possible to reduce energy consumption due to high energy density and heat transfer rate along with the phase change. The supercooled water will then be disturbed to create ice crystals in a crystallizer. The main challenge is to prevent the formation of ice in the supercooler since this leads to its blockage. One aim of the European H2020 TRI-HP project is to develop icephobic coatings for supercoolers, that promote high-water supercooling and avoid the formation of ice. In this study, three coatings to prevent or depress freezing in supercoolers are investigated. Specialized equipment for testing freezing on submerged surfaces has been developed, and the results have been correlated to standard surface properties like roughness and contact angle. It was found that the submerged surfaces do not necessarily follow normal icing theory, where freeze depression is related to contact angle. Instead, it is believed that the mobility of surface additives in amphiphilic coatings has an important role.", + "issue": "15", + "itemID": "doi:10.1080/01457632.2023.2255811", + "libraryCatalog": "Taylor and Francis+NEJM", + "pages": "1286-1293", + "publicationTitle": "Heat Transfer Engineering", + "url": "https://doi.org/10.1080/01457632.2023.2255811", + "volume": "45", + "attachments": [ + { + "title": "Full Text EPUB", + "mimeType": "application/epub+zip" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 61cab7f51b58ba85546e46b72ebfdee282eed731 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 3 Jul 2024 13:11:03 -0400 Subject: [PATCH 083/158] ProQuest Ebook Central: Fix multiples - New URL format (kept the old in case some instances still use it) - Result links go to a redirect page, so rewrite the URLs to skip it --- ProQuest Ebook Central.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/ProQuest Ebook Central.js b/ProQuest Ebook Central.js index e7d13fb7515..e2120c2e779 100644 --- a/ProQuest Ebook Central.js +++ b/ProQuest Ebook Central.js @@ -2,14 +2,14 @@ "translatorID": "f2d965fa-5acb-4ba7-90a4-8ecb6cf0c795", "label": "ProQuest Ebook Central", "creator": "Sebastian Karcher", - "target": "^https?://ebookcentral\\.proquest\\.com/lib/", + "target": "^https?://ebookcentral\\.proquest\\.com/(ebc/)?lib/", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2017-11-19 21:23:37" + "lastUpdated": "2024-07-03 17:12:26" } /* @@ -36,17 +36,15 @@ */ -// attr()/text() v2 -function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null;}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null;} - - function detectWeb(doc, url) { //reader.action is for chapter, but metadata only for books if (url.includes('/detail.action?') || url.includes('/reader.action?')) { return "book"; - } else if (url.includes('search.action?') && getSearchResults(doc, true)) { + } + else if ((url.includes('search.action?') || url.includes('search?')) && getSearchResults(doc, true)) { return "multiple"; } + return false; } @@ -60,11 +58,18 @@ function getSearchResults(doc, checkOnly) { if (!href || !title) continue; if (checkOnly) return true; found = true; - items[href] = title; + items[fixSearchResultHref(href)] = title; } return found ? items : false; } +function fixSearchResultHref(href) { + // Skip a JS redirect page + // /ebc/lib/berkeley-ebooks/#/detail?docID=1000629&query=test + // -> /lib/berkeley-ebooks/detail.action?docID=1000629&query=test + return href.replace(/\/ebc\/lib\/([^/]+)\/#\/detail/, '/lib/$1/detail.action'); +} + function doWeb(doc, url) { if (detectWeb(doc, url) == "multiple") { @@ -106,6 +111,7 @@ function scrape(doc, url) { translator.translate(); }); } + /** BEGIN TEST CASES **/ var testCases = [ { From fdcdb127ac6132d16c776b471a163af7db0254d2 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 3 Jul 2024 13:15:09 -0400 Subject: [PATCH 084/158] ProQuest Ebook Central: Monitor DOM changes for search results --- ProQuest Ebook Central.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ProQuest Ebook Central.js b/ProQuest Ebook Central.js index e2120c2e779..38f1680e5f9 100644 --- a/ProQuest Ebook Central.js +++ b/ProQuest Ebook Central.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-07-03 17:12:26" + "lastUpdated": "2024-07-03 17:15:06" } /* @@ -41,8 +41,11 @@ function detectWeb(doc, url) { if (url.includes('/detail.action?') || url.includes('/reader.action?')) { return "book"; } - else if ((url.includes('search.action?') || url.includes('search?')) && getSearchResults(doc, true)) { - return "multiple"; + else if (url.includes('search.action?') || url.includes('search?')) { + if (getSearchResults(doc, true)) { + return "multiple"; + } + Z.monitorDOMChanges(doc.querySelector('app-root'), { childList: true, subtree: true }); } return false; } From 11d37c9c91b4d234482a98d4c816250de5732330 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 5 Jul 2024 03:21:38 -0400 Subject: [PATCH 085/158] IEEE Xplore: Fix saving from PDF URLs and maybe some search pages But search pages aren't detecting properly for me, so that might need to be fixed separately Fixes #3333 --- IEEE Xplore.js | 109 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 104 insertions(+), 5 deletions(-) diff --git a/IEEE Xplore.js b/IEEE Xplore.js index be3e6b2c2f3..de4f8573e48 100644 --- a/IEEE Xplore.js +++ b/IEEE Xplore.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-06-19 07:53:06" + "lastUpdated": "2024-07-05 07:19:04" } /* @@ -36,7 +36,10 @@ */ function detectWeb(doc, url) { - Zotero.monitorDOMChanges(doc.querySelector('.global-content-wrapper')); + var wrapper = doc.querySelector('.global-content-wrapper'); + if (wrapper) { + Zotero.monitorDOMChanges(wrapper); + } if (/[?&]arnumber=(\d+)/i.test(url) || /\/document\/\d+/i.test(url)) { var firstBreadcrumb = ZU.xpathText(doc, '(//div[contains(@class, "breadcrumbs")]//a)[1]'); @@ -120,7 +123,7 @@ async function doWeb(doc, url) { } } else if (url.includes("/search/") || url.includes("/stamp/") || url.includes("/ielx4/") || url.includes("/ielx5/")) { - await scrape(await requestDocument([fixUrl(url)])); + await scrape(await requestDocument(fixUrl(url))); } else { await scrape(doc, url); @@ -203,7 +206,9 @@ async function scrape(doc, url = doc.location.href) { if (item.ISSN && !ZU.fieldIsValidForType('ISSN', item.itemType)) { item.extra = "ISSN: " + item.ISSN; } - item.url = url; + item.url = url + // Strip session ids + .replace(/;jsessionid.+/, ''); item.attachments.push({ document: doc, title: "IEEE Xplore Abstract Record" @@ -241,7 +246,6 @@ async function scrape(doc, url = doc.location.href) { }); } - /** BEGIN TEST CASES **/ var testCases = [ { @@ -1117,6 +1121,101 @@ var testCases = [ "url": "https://ieeexplore.ieee.org/xpl/tocresult.jsp?isnumber=10045573&punumber=6221021", "defer": true, "items": "multiple" + }, + { + "type": "web", + "url": "https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9919149", + "items": [ + { + "itemType": "journalArticle", + "title": "Joint UAV Placement and IRS Phase Shift Optimization in Downlink Networks", + "creators": [ + { + "firstName": "Hung", + "lastName": "Nguyen-Kha", + "creatorType": "author" + }, + { + "firstName": "Hieu V.", + "lastName": "Nguyen", + "creatorType": "author" + }, + { + "firstName": "Mai T.", + "lastName": "P. Le", + "creatorType": "author" + }, + { + "firstName": "Oh-Soon", + "lastName": "Shin", + "creatorType": "author" + } + ], + "date": "2022", + "DOI": "10.1109/ACCESS.2022.3214663", + "ISSN": "2169-3536", + "abstractNote": "This study investigates the integration of an intelligent reflecting surface (IRS) into an unmanned aerial vehicle (UAV) platform to utilize the advantages of these leading technologies for sixth-generation communications, e.g., improved spectral and energy efficiency, extended network coverage, and flexible deployment. In particular, we investigate a downlink IRS–UAV system, wherein single-antenna ground users (UEs) are served by a multi-antenna base station (BS). To assist the communication between UEs and the BS, an IRS mounted on a UAV is deployed, in which the direct links are obstructed owing to the complex urban channel characteristics. The beamforming at the BS, phase shift at the IRS, and the 3D placement of the UAV are jointly optimized to maximize the sum rate. Because the optimization variables, particularly the beamforming and IRS phase shift, are highly coupled with each other, the optimization problem is naturally non-convex. To effectively solve the formulated problem, we propose an iterative algorithm that employs block coordinate descent and inner approximation methods. Numerical results demonstrate the effectiveness of our proposed approach for a UAV-mounted IRS system on the sum rate performance over the state-of-the-art technology using the terrestrial counterpart.", + "itemID": "9919149", + "libraryCatalog": "IEEE Xplore", + "pages": "111221-111231", + "publicationTitle": "IEEE Access", + "url": "https://ieeexplore.ieee.org/document/9919149/", + "volume": "10", + "attachments": [ + { + "title": "IEEE Xplore Full Text PDF", + "mimeType": "application/pdf" + }, + { + "title": "IEEE Xplore Abstract Record", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "Array signal processing" + }, + { + "tag": "Autonomous aerial vehicles" + }, + { + "tag": "Beamforming" + }, + { + "tag": "Downlink" + }, + { + "tag": "Iterative methods" + }, + { + "tag": "Optimization" + }, + { + "tag": "Relays" + }, + { + "tag": "Three-dimensional displays" + }, + { + "tag": "UAV-mounted IRS" + }, + { + "tag": "Wireless communication" + }, + { + "tag": "convex optimization" + }, + { + "tag": "intelligent reflecting surface (IRS)" + }, + { + "tag": "unmanned aerial vehicle (UAV)" + } + ], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From e368f7b7846dca6c2a701d97ac2c528044274d43 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 5 Jul 2024 07:56:52 -0400 Subject: [PATCH 086/158] ProQuest: Fix multiples on MV3 https://forums.zotero.org/discussion/115508/zotero-connector-not-working-for-proquest-databases-on-chrome --- ProQuest.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ProQuest.js b/ProQuest.js index 9cd90f00885..7e98e9030ff 100644 --- a/ProQuest.js +++ b/ProQuest.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-02-17 03:02:30" + "lastUpdated": "2024-07-05 11:54:27" } /* @@ -102,7 +102,7 @@ function getSearchResults(doc, checkOnly, extras) { var elements = doc.getElementsByClassName('resultListContainer'); for (let i = 0; i < elements.length; i++) { - if (elements[i] && elements[i].offsetHeight > 0) { + if (elements[i] && elements[i].childElementCount) { root = elements[i]; break; } @@ -1303,7 +1303,6 @@ var fieldNames = { } }; - /** BEGIN TEST CASES **/ var testCases = [ { From c528844c3612b8e77eb494eec9d7bf5a6997bf1d Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 5 Jul 2024 07:59:21 -0400 Subject: [PATCH 087/158] ERIC: Don't set duplicate pub title on reports And update tests for other changes. --- ERIC.js | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/ERIC.js b/ERIC.js index 7ab177cc3e7..53048ffb623 100644 --- a/ERIC.js +++ b/ERIC.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 12, "browserSupport": "gcsibv", - "lastUpdated": "2023-08-22 04:49:47" + "lastUpdated": "2024-07-05 11:56:39" } /* @@ -131,8 +131,14 @@ async function scrape(doc, url = doc.location.href) { if (DOI) { item.DOI = ZU.cleanDOI(decodeURIComponent(DOI)); } - if (item.itemType == "journalArticle" && item.publisher == item.publicationTitle) { - delete item.publisher; // Publisher & Publication Title are often identical + if (item.publisher == item.publicationTitle) { + // Publisher & Publication Title are often identical + if (item.itemType == "journalArticle") { + delete item.publisher; + } + else if (item.itemType == "report") { + delete item.publicationTitle; + } } item.extra = "ERIC Number: " + ericID; @@ -222,7 +228,6 @@ async function doSearch(search) { item.complete(); } - /** BEGIN TEST CASES **/ var testCases = [ { @@ -443,10 +448,6 @@ var testCases = [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -523,10 +524,6 @@ var testCases = [ { "title": "Full Text PDF", "mimeType": "application/pdf" - }, - { - "title": "Snapshot", - "mimeType": "text/html" } ], "tags": [ @@ -833,7 +830,13 @@ var testCases = [ "extra": "ERIC Number: ED616685", "language": "English", "libraryCatalog": "ERIC", - "attachments": [], + "url": "https://eric.ed.gov/?id=ED616685", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], "tags": [ { "tag": "Cognitive Processes" From 0fd931ab9b28cbb47b5c502574480f53cba23028 Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Thu, 11 Jul 2024 11:59:56 +0300 Subject: [PATCH 088/158] Add underline annotation support to Markdown and HTML translators (#3334) --- Note HTML.js | 6 +++--- Note Markdown.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Note HTML.js b/Note HTML.js index 3d43bb8cbf0..4fe4a617dd7 100644 --- a/Note HTML.js +++ b/Note HTML.js @@ -14,7 +14,7 @@ }, "inRepository": true, "translatorType": 2, - "lastUpdated": "2024-04-24 14:50:00" + "lastUpdated": "2024-07-10 15:30:00" } /* @@ -67,8 +67,8 @@ function doExport() { } if (Zotero.getOption("includeAppLinks")) { - // Insert a PDF link for highlight and image annotation nodes - doc.querySelectorAll('span[class="highlight"], img[data-annotation]').forEach(function (node) { + // Insert a PDF link for highlight, underline and image annotation nodes + doc.querySelectorAll('span[class="highlight"], span[class="underline"], img[data-annotation]').forEach(function (node) { try { var annotation = JSON.parse(decodeURIComponent(node.getAttribute('data-annotation'))); } diff --git a/Note Markdown.js b/Note Markdown.js index 611f3aa04d0..6f568729dd6 100644 --- a/Note Markdown.js +++ b/Note Markdown.js @@ -14,7 +14,7 @@ }, "inRepository": true, "translatorType": 2, - "lastUpdated": "2024-04-24 14:50:00" + "lastUpdated": "2024-07-10 16:00:00" } /* @@ -1496,8 +1496,8 @@ function convert(doc) { } }); - // Insert a PDF link for highlight and image annotation nodes - doc.querySelectorAll('span[class="highlight"], img[data-annotation]').forEach(function (node) { + // Insert a PDF link for highlight, underline and image annotation nodes + doc.querySelectorAll('span[class="highlight"], span[class="underline"], img[data-annotation]').forEach(function (node) { try { var annotation = JSON.parse(decodeURIComponent(node.getAttribute('data-annotation'))); } From aa67ced33e9d4dab7ddb2debe2f489c8d3b45ae6 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Sat, 13 Jul 2024 23:59:50 -0400 Subject: [PATCH 089/158] On master: Update WaPoCover additional formats; asyncifySee https://forums.zotero.org/discussion/115760/problems-with-washington-post-translator/p1 (#3336) --- Washington Post.js | 125 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 96 insertions(+), 29 deletions(-) diff --git a/Washington Post.js b/Washington Post.js index 38b4c410d3e..a040ef3637b 100644 --- a/Washington Post.js +++ b/Washington Post.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2022-11-01 19:25:49" + "lastUpdated": "2024-07-14 03:40:55" } /* @@ -37,7 +37,7 @@ function detectWeb(doc, url) { - if (ZU.xpathText(doc, '//div[@id="topper-headline-wrapper"]//h1')) { + if (ZU.xpathText(doc, '//h1[@data-qa="headline"]')) { if (url.includes('/blogs/')) { return "blogPost"; } @@ -45,7 +45,10 @@ function detectWeb(doc, url) { return "newspaperArticle"; } } - if (ZU.xpathText(doc, '//h1[@data-qa="headline"]')) { + if (text(doc, '#default-topper-container h1')) { + return "newspaperArticle"; + } + if (text(doc, 'h1') && text(doc, 'header[layout="full_bleed"]')) { return "newspaperArticle"; } // For older articles @@ -75,33 +78,27 @@ function getSearchResults(doc, checkOnly) { } -function doWeb(doc, url) { - if (detectWeb(doc, url) == "multiple") { - Zotero.selectItems(getSearchResults(doc, false), function (items) { - if (!items) { - return true; - } - var articles = []; - for (var i in items) { - articles.push(i); - } - ZU.processDocuments(articles, scrape); - return true; - }); +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 { - scrape(doc, url); + await scrape(doc, url); } } -function scrape(doc, url) { + +async function scrape(doc, url) { var type = url.includes('/blogs/') ? 'blogPost' : 'newspaperArticle'; - var translator = Zotero.loadTranslator('web'); + let translator = Zotero.loadTranslator('web'); // Embedded Metadata translator.setTranslator('951c027d-74ac-47d4-a107-9c3069ab7b48'); - // translator.setDocument(doc); - - translator.setHandler('itemDone', function (obj, item) { + translator.setDocument(doc); + translator.setHandler('itemDone', (_obj, item) => { item.itemType = type; // Old articles @@ -112,13 +109,13 @@ function scrape(doc, url) { } } else { - let authors = doc.querySelectorAll('.author-name, a[rel="author"]'); + let authors = doc.querySelectorAll('.author-name, [rel="author"]'); authors = Array.from(authors).map(x => x.textContent.trim()); item.creators = ZU.arrayUnique(authors) .map(x => ZU.cleanAuthor(x, "author")); } - item.date = attr(doc, 'meta[name="last_updated_date"]', 'content') + item.date = attr(doc, 'meta[property="article_published_time"]', 'content') || ZU.xpathText(doc, '//span[@itemprop="datePublished"]/@content') || ZU.xpathText(doc, '//meta[@name="DC.date.issued"]/@content'); if (item.date) { @@ -136,9 +133,8 @@ function scrape(doc, url) { item.complete(); }); - translator.getTranslatorObject(function (trans) { - trans.doWeb(doc, url); - }); + let em = await translator.getTranslatorObject(); + await em.doWeb(doc, url); } /** BEGIN TEST CASES **/ @@ -195,7 +191,6 @@ var testCases = [ "language": "en-US", "libraryCatalog": "www.washingtonpost.com", "publicationTitle": "Washington Post", - "section": "National Security", "url": "https://www.washingtonpost.com/world/national-security/aulaqi-killing-reignites-debate-on-limits-of-executive-power/2011/09/30/gIQAx1bUAL_story.html", "attachments": [ { @@ -286,7 +281,7 @@ var testCases = [ "creatorType": "author" } ], - "date": "2020-07-08", + "date": "2020-07-07", "ISSN": "0190-8286", "abstractNote": "The populist president said he’s taking hydroxychloroquine to treat the infection. The U.S. ambassador to Brazil has tested negative for covid-19.", "language": "en-US", @@ -342,6 +337,78 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://www.washingtonpost.com/climate-environment/interactive/2024/louisiana-sea-wall-gas-facility-flooding/", + "items": [ + { + "itemType": "newspaperArticle", + "title": "A rising fortress in sinking land", + "creators": [ + { + "firstName": "Steven", + "lastName": "Mufson", + "creatorType": "author" + }, + { + "firstName": "Ricky", + "lastName": "Carioti", + "creatorType": "author" + } + ], + "date": "2024-07-05", + "ISSN": "0190-8286", + "abstractNote": "Rising seas and steel walls test the strength of a Louisiana coastal gas development, raising questions about flooding, climate change and community impacts.", + "language": "en-US", + "libraryCatalog": "www.washingtonpost.com", + "publicationTitle": "Washington Post", + "url": "https://www.washingtonpost.com/climate-environment/interactive/2024/louisiana-sea-wall-gas-facility-flooding/", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.washingtonpost.com/home/2024/07/13/tips-choosing-right-size-lamp/", + "items": [ + { + "itemType": "newspaperArticle", + "title": "Is your lamp the right size? There’s an equation for that.", + "creators": [ + { + "firstName": "Laura", + "lastName": "Daily", + "creatorType": "author" + } + ], + "date": "2024-07-13", + "ISSN": "0190-8286", + "abstractNote": "You don’t need to be a math whiz to choose a lamp. You just need to consider function and know a bit about proportion.", + "language": "en-US", + "libraryCatalog": "www.washingtonpost.com", + "publicationTitle": "Washington Post", + "shortTitle": "Is your lamp the right size?", + "url": "https://www.washingtonpost.com/home/2024/07/13/tips-choosing-right-size-lamp/", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From c7199cc0bd33fc003e6082de081559634456f25c Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 16 Jul 2024 16:41:29 -0400 Subject: [PATCH 090/158] CI: Group log lines --- .ci/pull-request-check/check-pull-request.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ci/pull-request-check/check-pull-request.sh b/.ci/pull-request-check/check-pull-request.sh index 4281e5d2057..8f30cca0cb3 100755 --- a/.ci/pull-request-check/check-pull-request.sh +++ b/.ci/pull-request-check/check-pull-request.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash set -euo pipefail +echo "::group::Setup" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" ROOT_DIR="$( dirname "$DIR" )" @@ -33,6 +34,7 @@ export CHROME_EXTENSION_KEY="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDllBS5q+Z9T9t cd .. npm explore chromedriver -- npm run install --detect_chromedriver_version +echo "::endgroup::" get_translators_to_check ./selenium-test.js "$TRANSLATORS_TO_CHECK" From 5908f0f6f8d8360222fd2111de761cfee529b8fa Mon Sep 17 00:00:00 2001 From: "Alex T." Date: Mon, 22 Jul 2024 21:02:05 +0200 Subject: [PATCH 091/158] ePrint: add support for non-PDF attachments (#3337) --- ePrint IACR.js | 234 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 222 insertions(+), 12 deletions(-) diff --git a/ePrint IACR.js b/ePrint IACR.js index 3cecce507e2..132d853a36a 100644 --- a/ePrint IACR.js +++ b/ePrint IACR.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-07-22 15:29:56" + "lastUpdated": "2024-07-21 13:48:22" } /* @@ -79,6 +79,7 @@ async function scrape(doc, url = doc.location.href) { var noteXPath = "//h5[starts-with(text(),'Abstract')]/following-sibling::p[2]/strong[starts-with(text(), 'Note:')]/.."; var keywordsSelector = ".keywords > .keyword"; var publicationInfoSelector = "//div[@id='metadata']/dl/dt[starts-with(text(), 'Publication info')]/following-sibling::dd[1]"; + var availableFormatsSelector = "//div[@id='metadata']/dl/dt[contains(text(), 'Available format(s)')]/following-sibling::dd[1]/a"; var paperIDSelector = "#eprintContent h4"; var paperID = text(doc, paperIDSelector); // The year is always 4 digits, the paper number is canonicalized (3 or 4 digits) before calling scrape() @@ -95,7 +96,16 @@ async function scrape(doc, url = doc.location.href) { var authors = doc.querySelectorAll(authorsSelector); authors = [...authors].map(author => author.content); - var abstr = ZU.xpathText(doc, abstractXPath); + // Pages use MathJax lazy typesetting, which affects tests (content is missing as typesetting isn't being done). + // Work around by pulling the abstract from the OG tag in that case. + let abstr = ""; + if (doc.querySelector('mjx-lazy')) { + abstr = attr(doc, 'meta[property="og:description"]', 'content'); + } + else { + abstr = ZU.xpathText(doc, abstractXPath); + } + // Remove surplus whitespace, but preserve paragraphs, denoted in the page markup by double newlines with some spaces in between if (abstr) abstr = abstr.replace(/\n\s+\n/g, "\n\n").replace(/[ \t]+/g, " ").trim(); @@ -114,7 +124,6 @@ async function scrape(doc, url = doc.location.href) { let urlComponents = url.match(/^https:\/\/([^/]+)/); let eprintFQDN = urlComponents[1]; - // TODO: Do we want to differentiate Archive and Library Catalog like this (the latter has FQDN appended)? Do we want to populate both or just one of them? The translator population has all possible approaches. newItem.archive = archiveName; newItem.libraryCatalog = `${archiveName} (${eprintFQDN})`; newItem.archiveID = paperID; @@ -132,9 +141,30 @@ async function scrape(doc, url = doc.location.href) { newItem.tags.push(keywords[i]); } - newItem.attachments = [ - { url: newItem.url + ".pdf", title: "Full Text PDF", mimeType: "application/pdf" } - ]; + let formats = ZU.xpath(doc, availableFormatsSelector); + for (const format of formats) { + let formatName = format.textContent.trim(); + let attachment = {}; + switch (formatName.toLowerCase()) { + case "pdf": + // There are entries where a format button is present, but the URL points to the ePrint home page + if (format.href.slice(-4) != ".pdf") continue; + attachment.mimeType = "application/pdf"; + break; + case "ps": + // There are entries where a format button is present, but the URL points to the ePrint home page + if (format.href.slice(-3) != ".ps") continue; + attachment.mimeType = "application/ps"; + break; + default: + // For security reasons, avoid adding unknown formats (allowlist approach) + Z.debug("Unknown format, skipping: " + formatName); + continue; + } + attachment.url = format.href; + attachment.title = "Full Text " + formatName; + newItem.attachments.push(attachment); + } if (note) newItem.notes.push({ note: note }); @@ -240,7 +270,7 @@ var testCases = [ } ], "date": "2005", - "abstractNote": "This paper describes an adaptive-chosen-ciphertext attack on the Cipher Feedback (CFB) mode of encryption as used in OpenPGP. In most circumstances it will allow an attacker to determine 16 bits of any block of plaintext with about 215 oracle queries for the initial\nsetup work and 215 oracle queries for each block. Standard CFB mode encryption does not appear to be affected by this attack. It applies to a particular variation of CFB used by OpenPGP. In particular it exploits an ad-hoc integrity check feature in OpenPGP which was meant as a \"quick check\" to determine the correctness of the decrypting symmetric key.", + "abstractNote": "This paper describes an adaptive-chosen-ciphertext attack on the Cipher Feedback (CFB) mode of encryption as used in OpenPGP. In most circumstances it will allow an attacker to determine 16 bits of any block of plaintext with about $2^{15}$ oracle queries for the initial\nsetup work and $2^{15}$ oracle queries for each block. Standard CFB mode encryption does not appear to be affected by this attack. It applies to a particular variation of CFB used by OpenPGP. In particular it exploits an ad-hoc integrity check feature in OpenPGP which was meant as a \"quick check\" to determine the correctness of the decrypting symmetric key.", "archive": "Cryptology ePrint Archive", "archiveID": "2005/033", "extra": "Publication info: Published elsewhere. Unknown where it was published", @@ -248,8 +278,8 @@ var testCases = [ "url": "https://eprint.iacr.org/2005/033", "attachments": [ { - "title": "Full Text PDF", - "mimeType": "application/pdf" + "mimeType": "application/pdf", + "title": "Full Text PDF" } ], "tags": [ @@ -290,7 +320,7 @@ var testCases = [ } ], "date": "2011", - "abstractNote": "We show that homomorphic evaluation of (wide enough) arithmetic circuits can be accomplished with only polylogarithmic overhead. Namely, we present a construction of fully homomorphic encryption (FHE) schemes that for security parameter \\secparam can evaluate any width-Ω(\\secparam) circuit with t gates in time t⋅polylog(\\secparam).\n\nTo get low overhead, we use the recent batch homomorphic evaluation techniques of Smart-Vercauteren and Brakerski-Gentry-Vaikuntanathan, who showed that homomorphic operations can be applied to \"packed\" ciphertexts that encrypt vectors of plaintext elements. In this work, we introduce permuting/routing techniques to move plaintext elements across\nthese vectors efficiently. Hence, we are able to implement general arithmetic circuit in a batched fashion without ever needing to \"unpack\" the plaintext vectors.\n\nWe also introduce some other optimizations that can speed up homomorphic evaluation in certain cases. For example, we show how to use the Frobenius map to raise plaintext elements to powers of~p at the \"cost\" of a linear operation.", + "abstractNote": "We show that homomorphic evaluation of (wide enough) arithmetic circuits can be accomplished with only polylogarithmic overhead. Namely, we present a construction of fully homomorphic encryption (FHE) schemes that for security parameter $\\secparam$ can evaluate any width-$\\Omega(\\secparam)$ circuit with $t$ gates in time $t\\cdot polylog(\\secparam)$.\n\nTo get low overhead, we use the recent batch homomorphic evaluation techniques of Smart-Vercauteren and Brakerski-Gentry-Vaikuntanathan, who showed that homomorphic operations can be applied to \"packed\" ciphertexts that encrypt vectors of plaintext elements. In this work, we introduce permuting/routing techniques to move plaintext elements across\nthese vectors efficiently. Hence, we are able to implement general arithmetic circuit in a batched fashion without ever needing to \"unpack\" the plaintext vectors.\n\nWe also introduce some other optimizations that can speed up homomorphic evaluation in certain cases. For example, we show how to use the Frobenius map to raise plaintext elements to powers of~$p$ at the \"cost\" of a linear operation.", "archive": "Cryptology ePrint Archive", "archiveID": "2011/566", "extra": "Publication info: Published elsewhere. extended abstract in Eurocrypt 2012", @@ -298,8 +328,8 @@ var testCases = [ "url": "https://eprint.iacr.org/2011/566", "attachments": [ { - "title": "Full Text PDF", - "mimeType": "application/pdf" + "mimeType": "application/pdf", + "title": "Full Text PDF" } ], "tags": [ @@ -393,6 +423,186 @@ var testCases = [ "type": "web", "url": "https://eprint.iacr.org/complete/", "items": "multiple" + }, + { + "type": "web", + "url": "https://eprint.iacr.org/2019/430", + "items": [ + { + "itemType": "preprint", + "title": "Composition of Boolean Functions: An Application to the Secondary Constructions of Bent Functions", + "creators": [ + { + "firstName": "Guangpu", + "lastName": "Gao", + "creatorType": "author" + }, + { + "firstName": "Dongdai", + "lastName": "Lin", + "creatorType": "author" + }, + { + "firstName": "Wenfen", + "lastName": "Liu", + "creatorType": "author" + }, + { + "firstName": "Yongjuan", + "lastName": "Wang", + "creatorType": "author" + } + ], + "date": "2019", + "abstractNote": "Bent functions are optimal combinatorial objects and have been attracted\ntheir research for four decades. Secondary constructions play a central role\nin constructing bent functions since a complete classification of this class\nof functions is elusive. This paper is devoted to establish a relationship\nbetween the secondary constructions and the composition of Boolean\nfunctions. We firstly prove that some well-known secondary constructions of\nbent functions, can be described by the composition of a plateaued Boolean\nfunction and some bent functions. Then their dual functions can be\ncalculated by the Lagrange interpolation formula. By following this\nobservation, two secondary constructions of\nbent functions are presented. We show that they are inequivalent to the known ones, and\nmay generate bent functions outside the primary classes $\\mathcal{M}$ and $%\n\\mathcal{PS}$. These results show that the method we present in this paper\nis genetic and unified and therefore can be applied to the constructions of Boolean\nfunctions with other cryptographical criteria.", + "archive": "Cryptology ePrint Archive", + "archiveID": "2019/430", + "extra": "Publication info: Preprint. MINOR revision.", + "libraryCatalog": "Cryptology ePrint Archive (eprint.iacr.org)", + "shortTitle": "Composition of Boolean Functions", + "url": "https://eprint.iacr.org/2019/430", + "attachments": [], + "tags": [ + { + "tag": "Bent" + }, + { + "tag": "Composition of Boolean functions" + }, + { + "tag": "Lagrange interpolation formula" + }, + { + "tag": "Secondary constructions" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://eprint.iacr.org/2002/195", + "items": [ + { + "itemType": "preprint", + "title": "An addition to the paper: A polarisation based visual crypto system and its secret sharing schemes", + "creators": [ + { + "firstName": "H. D. L.", + "lastName": "Hollmann", + "creatorType": "author" + }, + { + "firstName": "J. H. v", + "lastName": "Lint", + "creatorType": "author" + }, + { + "firstName": "L.", + "lastName": "Tolhuizen", + "creatorType": "author" + }, + { + "firstName": "P.", + "lastName": "Tuyls", + "creatorType": "author" + } + ], + "date": "2002", + "abstractNote": "An (n,k) pair is a pair of binary nxm matrices (A,B), such that the weight of the modulo-two sum of any i rows, 1\\leq i \\leq k, from A or B is equal to a_i or b_i, respectively, and moreover, a_i=b_i, for 1\\leq i < k, while a_k \\neq b_k. In this note we first show how to construct an (n,k) Threshold Visual Secret Sharing Scheme from an (n,k) pair. Then, we explicitly construct an (n,k)-pair for all n and k with 1 \\leq k Date: Mon, 22 Jul 2024 21:04:06 +0200 Subject: [PATCH 092/158] The Met: Update for site changes, asyncify, lint (#3345) --- The Met.js | 195 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 124 insertions(+), 71 deletions(-) diff --git a/The Met.js b/The Met.js index 3d69ba3df56..1b4cedc4912 100644 --- a/The Met.js +++ b/The Met.js @@ -1,21 +1,21 @@ { "translatorID": "72dbad15-cd1a-4d52-b2ed-7d67f909cada", "label": "The Met", - "creator": "Aurimas Vinckevicius, Philipp Zumstein", - "target": "^https?://metmuseum\\.org/art/collection", - "minVersion": "3.0", + "creator": "Aurimas Vinckevicius, Philipp Zumstein and contributors", + "target": "^https?://(?:www\\.)?metmuseum\\.org/art/collection", + "minVersion": "6.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2017-07-01 11:39:10" + "lastUpdated": "2024-07-21 18:22:01" } /* ***** BEGIN LICENSE BLOCK ***** - Copyright © 2017 Philipp Zumstein + Copyright © 2017-2024 Philipp Zumstein and contributors This file is part of Zotero. @@ -35,25 +35,25 @@ ***** END LICENSE BLOCK ***** */ - +// eslint-disable-next-line no-unused-vars function detectWeb(doc, url) { - if (ZU.xpathText(doc, '//div[contains(@class, "collection-details__tombstone")]')) { + if (doc.querySelector('.artwork-details')) { return 'artwork'; } - //multiples are working when waiting for the website to load completely, - //but automatic testing seems difficult, try manually e.g. - //http://metmuseum.org/art/collection?ft=albrecht+d%C3%BCrer&noqs=true - if (getSearchResults(doc, true)) return 'multiple'; + else if (getSearchResults(doc, true)) { + return 'multiple'; + } + return false; } function getSearchResults(doc, checkOnly) { - var items = {}; - var found = false; - var rows = ZU.xpath(doc, '//h2[contains(@class, "card__title")]/a'); - for (var i=0; i2) { - item.creators.push({'lastName': content, 'creatorType': 'artist', 'fieldMode': 1}) - } else { + case 'artist': { + let cleaned = content.replace(/\(.*\)$/, '').trim(); + if (cleaned.split(' ').length > 2) { + item.creators.push({ lastName: content, creatorType: 'artist', fieldMode: 1 }); + } + else { item.creators.push(ZU.cleanAuthor(cleaned, "artist")); } break; + } } - } - - item.abstractNote = ZU.xpathText(doc, '//div[contains(@class, "collection-details__label")]'); + } + + item.abstractNote = text(doc, '.artwork__intro__desc'); item.libraryCatalog = 'The Metropolitan Museum of Art'; - item.url = ZU.xpathText(doc, '//link[@rel="canonical"]/@href'); - - var download = ZU.xpathText(doc, '//li[contains(@class, "utility-menu__item--download")]/a/@href'); + item.url = attr(doc, 'link[rel="canonical"]', 'href'); + + // Non-open-access items still have the (invisible) download button with seemingly valid, but 404-ing, URL. + // Filter those out via the "not-openaccess" class set on the
containing the button. + let download = attr(doc, 'section:not(.artwork--not-openaccess) .artwork__interaction--download a', 'href'); if (download) { item.attachments.push({ title: 'Met Image', @@ -134,7 +135,7 @@ function scrape(doc, url) { title: 'Snapshot', document: doc }); - + item.complete(); } @@ -142,31 +143,35 @@ function scrape(doc, url) { var testCases = [ { "type": "web", - "url": "http://metmuseum.org/art/collection/search/328877?rpp=30&pg=1&rndkey=20140708&ft=*&who=Babylonian&pos=4", + "url": "https://www.metmuseum.org/art/collection/search/328877?rpp=30&pg=1&rndkey=20140708&ft=*&who=Babylonian&pos=4", "items": [ { "itemType": "artwork", "title": "Cuneiform tablet case impressed with four cylinder seals, for cuneiform tablet 86.11.214a: field rental", "creators": [], - "date": "ca. 1749–1712 B.C.", + "date": "ca. 1749–1712 BCE", "artworkMedium": "Clay", "artworkSize": "2.1 x 4.4 x 2.9 cm (7/8 x 1 3/4 x 1 1/8 in.)", "callNumber": "86.11.214b", "libraryCatalog": "The Metropolitan Museum of Art", "shortTitle": "Cuneiform tablet case impressed with four cylinder seals, for cuneiform tablet 86.11.214a", - "url": "http://metmuseum.org/art/collection/search/328877", + "url": "https://www.metmuseum.org/art/collection/search/328877", "attachments": [ { "title": "Met Image" }, { - "title": "Snapshot" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [ - "Babylonian", - "Clay-Tablets-Inscribed-Seal Impressions", - "Old Babylonian" + { + "tag": "Babylonian" + }, + { + "tag": "Old Babylonian" + } ], "notes": [], "seeAlso": [] @@ -175,31 +180,35 @@ var testCases = [ }, { "type": "web", - "url": "http://metmuseum.org/art/collection/search/328877", + "url": "https://www.metmuseum.org/art/collection/search/328877", "items": [ { "itemType": "artwork", "title": "Cuneiform tablet case impressed with four cylinder seals, for cuneiform tablet 86.11.214a: field rental", "creators": [], - "date": "ca. 1749–1712 B.C.", + "date": "ca. 1749–1712 BCE", "artworkMedium": "Clay", "artworkSize": "2.1 x 4.4 x 2.9 cm (7/8 x 1 3/4 x 1 1/8 in.)", "callNumber": "86.11.214b", "libraryCatalog": "The Metropolitan Museum of Art", "shortTitle": "Cuneiform tablet case impressed with four cylinder seals, for cuneiform tablet 86.11.214a", - "url": "http://metmuseum.org/art/collection/search/328877", + "url": "https://www.metmuseum.org/art/collection/search/328877", "attachments": [ { "title": "Met Image" }, { - "title": "Snapshot" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [ - "Babylonian", - "Clay-Tablets-Inscribed-Seal Impressions", - "Old Babylonian" + { + "tag": "Babylonian" + }, + { + "tag": "Old Babylonian" + } ], "notes": [], "seeAlso": [] @@ -208,7 +217,7 @@ var testCases = [ }, { "type": "web", - "url": "http://metmuseum.org/art/collection/search/436243?rpp=30&pg=1&ft=albrecht+d%c3%bcrer&pos=1", + "url": "https://www.metmuseum.org/art/collection/search/436243?rpp=30&pg=1&ft=albrecht+d%c3%bcrer&pos=1", "items": [ { "itemType": "artwork", @@ -221,27 +230,71 @@ var testCases = [ } ], "date": "ca. 1505", - "abstractNote": "This picture of Christ as Salvator Mundi, Savior of the World, who raises his right hand in blessing and in his left holds a globe representing the earth, can be appreciated both as a painting and as a drawing. Albrecht Dürer, the premier artist of the German Renaissance, probably began this work shortly before he departed for Italy in 1505, but completed only the drapery. His unusually extensive and meticulous preparatory drawing on the panel is visible in the unfinished portions of Christ's face and hands.", + "abstractNote": "This picture of Christ as Savior of the World, who raises his right hand in blessing and in his left holds an orb representing the Earth, can be appreciated both as a painting and a drawing. Dürer, the premier artist of the German Renaissance, probably began this work shortly before he departed for Italy in 1505 but completed only the drapery. His unusually extensive and meticulous preparatory drawing on the panel is visible in the unfinished portions of Christ’s face and hands.", "artworkMedium": "Oil on linden", "artworkSize": "22 7/8 x 18 1/2in. (58.1 x 47cm)", "callNumber": "32.100.64", "libraryCatalog": "The Metropolitan Museum of Art", - "url": "http://metmuseum.org/art/collection/search/436243", + "url": "https://www.metmuseum.org/art/collection/search/436243", "attachments": [ { "title": "Met Image" }, { - "title": "Snapshot" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [ - "Paintings" + { + "tag": "Paintings" + } ], "notes": [], "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://www.metmuseum.org/art/collection/search/371722", + "items": [ + { + "itemType": "artwork", + "title": "Rotoreliefs (Optical Discs)", + "creators": [ + { + "firstName": "Marcel", + "lastName": "Duchamp", + "creatorType": "artist" + } + ], + "date": "1935/1953", + "artworkMedium": "Offset lithograph", + "artworkSize": "Each: 7 7/8 inches (20 cm) diameter", + "callNumber": "1972.597.1–.6", + "libraryCatalog": "The Metropolitan Museum of Art", + "url": "https://www.metmuseum.org/art/collection/search/371722", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "Prints" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.metmuseum.org/art/collection/search?q=albrecht%20d%C3%BCrer", + "items": "multiple" } ] -/** END TEST CASES **/ \ No newline at end of file +/** END TEST CASES **/ From f5d465b7aafa69003e50a3bb94c37cbfa17a2e64 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 22 Jul 2024 16:10:57 -0400 Subject: [PATCH 093/158] Merge Springer Books into Springer Link Move tests (which are no longer very useful since they're all multiples - need to figure that out!) to Springer Link. No other changes necessary. Closes #3304 --- Springer Books.js | 450 ---------------------------------------------- Springer Link.js | 33 +++- deleted.txt | 1 + 3 files changed, 32 insertions(+), 452 deletions(-) delete mode 100644 Springer Books.js diff --git a/Springer Books.js b/Springer Books.js deleted file mode 100644 index f12654e1fc2..00000000000 --- a/Springer Books.js +++ /dev/null @@ -1,450 +0,0 @@ -{ - "translatorID": "b38a44f4-b8af-4553-9edf-fba4d2598d6a", - "label": "Springer Books", - "creator": "Jonathan Schulz", - "target": "^https?://www\\.(springer|palgrave)\\.com/\\w\\w/(book|search)\\W", - "minVersion": "3.0", - "maxVersion": "", - "priority": 100, - "inRepository": true, - "translatorType": 4, - "browserSupport": "gcsibv", - "lastUpdated": "2019-10-19 14:21:14" -} - -/* - ***** BEGIN LICENSE BLOCK ***** - - Copyright © 2017 Jonathan Schulz - - 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) { - var action = url.match(/^https?:\/\/[^/]+\/[^/]+\/([^/?#]+)/); - if (!action) return false; - switch (action[1]) { - case "book": - // test if any relevant information is available - if (ZU.xpathText(doc, '//meta[@property="og:title"]/@content')) return "book"; - break; - case "search": - // test for relevant search entries - return getSearchResults(doc, true) ? "multiple" : false; - } - return false; -} - - -function doWeb(doc, url) { - var detectionType = detectWeb(doc, url); - switch (detectionType) { - case "book": - scrapeBook(doc, url); - break; - case "multiple": - Zotero.selectItems(getSearchResults(doc, false), function (items) { - if (!items) return; - var articles = []; - for (var i in items) { - articles.push(i); - } - ZU.processDocuments(articles, scrapeBook); - }); - break; - } -} - - -function getSearchResults(doc, checkOnly) { - var items = {}; - var found = false; - var searchEntries = ZU.xpath(doc, '//div[@id="result-list"]/div'); - for (let i = 0; i < searchEntries.length; i++) { - var itemType = searchEntries[i].getAttribute("class"); - // test if we actually have a usable result - if (!itemType || itemType.search(/result-item-\d+/) == -1 - || !itemType.includes('result-type-book')) continue; - var titleLink = ZU.xpath(searchEntries[i], "h4/a"); - if (titleLink.length === 0) continue; - // extract book title and URL - var title = titleLink[0].textContent; - var href = titleLink[0].getAttribute("href"); - if (!title || !href) continue; - if (checkOnly) return true; - found = true; - items[href] = title; - } - return found ? items : false; -} - - -function scrapeBook(doc, _url) { - // Call the embedded metadata translator - var translator = Zotero.loadTranslator("web"); - translator.setTranslator("951c027d-74ac-47d4-a107-9c3069ab7b48"); - translator.setDocument(doc); - translator.setHandler("itemDone", function (obj, item) { - // From EM the item.title field looks like this: - // item.title = | | Springer - item.title = ZU.xpathText(doc, '//h1'); - var subtitle = ZU.xpathText(doc, '//div[contains(@class, "bibliographic-information")]/h2'); - if (subtitle) item.title += ': ' + subtitle; - - // There are no creators in the Embedded Metadata and thus we need - // to add them manually here. - var editors = ZU.xpathText(doc, '//li[@itemprop="editor"]/span'); - var authors = ZU.xpathText(doc, '//li[@itemprop="author"]/span'); - if (editors) { - editors = editors.split(", "); - for (let i = 0; i < editors.length; i++) item.creators.push(ZU.cleanAuthor(editors[i], "editor", editors[i].includes(','))); - } - if (authors) { - authors = authors.split(", "); - for (let i = 0; i < authors.length; i++) item.creators.push(ZU.cleanAuthor(authors[i], "author", authors[i].includes(','))); - } - - if (!item.publisher) { - item.publisher = ZU.xpathText(doc, '//dd[@itemprop="publisher"]/span'); - } - // see if we can seperate "Springer-Verlag " into publisher and place - if (item.publisher && item.publisher.search(/^Springer-Verlag\s.+/) != -1) { - var publisherInfo = item.publisher.match(/^(Springer-Verlag)\s(.+)/); - item.publisher = publisherInfo[1]; - item.place = publisherInfo[2]; - } - - if (!item.ISBN) { - item.ISBN = ZU.xpathText(doc, '//dd[@itemprop="isbn"]'); - } - - if (!item.year) { - var yearField = ZU.xpathText(doc, '//div[@class="copyright"]'); - if (yearField) { - item.date = yearField.replace('©', ''); - } - } - item.series = ZU.xpathText(doc, '//a[contains(@class, "series")]'); - - var edition = ZU.xpathText(doc, '//dt[text()="Edition Number" or text()="Auflage"]/following-sibling::dd[1]'); - if (edition && edition !== "1") item.edition = edition; - - var doi = ZU.xpathText(doc, '//dt[text()="DOI"]/following-sibling::dd[1]'); - if (doi) { - if (item.extra) { - if (!item.extra.includes("DOI")) { - item.extra += "\nDOI: " + doi; - } - } - else { - item.extra = "DOI: " + doi; - } - } - - // The abstract note might be shortened in the field; try to load - // the full abstract note - var longAbstractNote = ZU.xpathText(doc, '(//div[@class="product-about"]//div[@class="springer-html"])[1]'); - if (longAbstractNote) { - item.abstractNote = ZU.trimInternal(longAbstractNote); - } - - item.complete(); - }); - translator.translate(); -} - -/** BEGIN TEST CASES **/ -var testCases = [ - { - "type": "web", - "url": "https://www.springer.com/us/book/9783319633237", - "items": [ - { - "itemType": "book", - "title": "Theoretical Physics 7: Quantum Mechanics - Methods and Applications", - "creators": [ - { - "firstName": "Wolfgang", - "lastName": "Nolting", - "creatorType": "author" - } - ], - "date": "2017", - "ISBN": "9783319633237", - "abstractNote": "This textbook offers a clear and comprehensive introduction to methods and applications in quantum mechanics, one of the core components of undergraduate physics courses. It follows on naturally from the previous volumes in this series, thus developing the understanding of quantized states further on. The first part of the book introduces the quantum theory of angular momentum and approximation methods. More complex themes are covered in the second part of the book, which describes multiple particle systems and scattering theory. Ideally suited to undergraduate students with some grounding in the basics of quantum mechanics, the book is enhanced throughout with learning features such as boxed inserts and chapter summaries, with key mathematical derivations highlighted to aid understanding. The text is supported by numerous worked examples and end of chapter problem sets. About the Theoretical Physics series Translated from the renowned and highly successful German editions, the eight volumes of this series cover the complete core curriculum of theoretical physics at undergraduate level. Each volume is self-contained and provides all the material necessary for the individual course topic. Numerous problems with detailed solutions support a deeper understanding. Wolfgang Nolting is famous for his refined didactical style and has been referred to as the \"German Feynman\" in reviews.", - "extra": "DOI: 10.1007/978-3-319-63324-4", - "language": "en", - "libraryCatalog": "www.springer.com", - "publisher": "Springer International Publishing", - "shortTitle": "Theoretical Physics 7", - "url": "https://www.springer.com/us/book/9783319633237", - "attachments": [ - { - "title": "Snapshot" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.springer.com/us/book/9789462094826", - "items": [ - { - "itemType": "book", - "title": "Testing Times: A History of Vocational, Civil Service and Secondary Examinations in England since 1850", - "creators": [ - { - "firstName": "Willis", - "lastName": "Richard", - "creatorType": "author" - } - ], - "date": "2013", - "ISBN": "9789462094826", - "abstractNote": "This book focuses on the delivery of public examinations offered by the main examining boards in England since Victorian England. The investigation reveals that the provision of examinations was as controversial in the nineteenth century as it is today, particularly since the government is now determined to bring in reform. The issues of grade inflation, the place of coursework in marking, and the introduction of technological change all feature in this book. Educational policy is primarily examined as well as some reference to the global scene. The study analyses archival material from a wide range of sources, including those records stored at the National Archives and the London Metropolitan Archives. An emphasis is placed upon the various institutions that contributed to the process, including the Royal Society of Arts, the London Chamber of Commerce, the City of Guilds of London Institute and the University of London. Attention is given to the findings of the Taunton Commission and the Bryce Commission and shorter reports such as the Northcote-Trevelyn Report which served to radicalise entry and recruitment to the Civil Service. The modern GCSE and the plans for I-levels are considered and key observations are made about the efficacy of those examinations offered by Oxford and Cambridge universities and O-levels, A-levels and NVQs, The reader is given every opportunity to benefit enthusiastically in this account of examinations, and those engaged in education, whether teachers, examiners, students or administrators, will be able to gain useful insights into the workings of the examination system.", - "extra": "DOI: 10.1007/978-94-6209-482-6", - "language": "en", - "libraryCatalog": "www.springer.com", - "publisher": "Sense Publishers", - "shortTitle": "Testing Times", - "url": "https://www.springer.com/us/book/9789462094826", - "attachments": [ - { - "title": "Snapshot" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.springer.com/de/book/9783540212904", - "items": [ - { - "itemType": "book", - "title": "Complex Geometry: An Introduction", - "creators": [ - { - "firstName": "Daniel", - "lastName": "Huybrechts", - "creatorType": "author" - } - ], - "date": "2005", - "ISBN": "9783540212904", - "abstractNote": "Complex geometry studies (compact) complex manifolds. It discusses algebraic as well as metric aspects. The subject is on the crossroad of algebraic and differential geometry. Recent developments in string theory have made it an highly attractive area, both for mathematicians and theoretical physicists. The author’s goal is to provide an easily accessible introduction to the subject. The book contains detailed accounts of the basic concepts and the many exercises illustrate the theory. Appendices to various chapters allow an outlook to recent research directions. Daniel Huybrechts is currently Professor of Mathematics at the University Denis Diderot in Paris.", - "extra": "DOI: 10.1007/b137952", - "language": "en", - "libraryCatalog": "www.springer.com", - "place": "Berlin Heidelberg", - "publisher": "Springer-Verlag", - "series": "Universitext", - "shortTitle": "Complex Geometry", - "url": "https://www.springer.com/de/book/9783540212904", - "attachments": [ - { - "title": "Snapshot" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.springer.com/gb/book/9783658115449", - "items": [ - { - "itemType": "book", - "title": "Analysis 1: Differential- und Integralrechnung einer Veränderlichen", - "creators": [ - { - "firstName": "Otto", - "lastName": "Forster", - "creatorType": "author" - } - ], - "date": "2016", - "ISBN": "9783658115449", - "abstractNote": "Dieses seit vier Jahrzehnten bewährte Standardwerk ist gedacht als Begleittext zur Analysis-Vorlesung des ersten Semesters für Mathematiker, Physiker und Informatiker. Bei der Darstellung wurde besonderer Wert darauf gelegt, in systematischer Weise, aber ohne zu große Abstraktionen zu den wesentlichen Inhalten vorzudringen und sie mit vielen konkreten Beispielen zu illustrieren. An verschiedenen Stellen wurden Bezüge zur Informatik hergestellt. Einige numerische Beispiele wurden durch Programm-Codes ergänzt, so dass die Rechnungen direkt am Computer nachvollzogen werden können. Die vorliegende 12. Auflage wurde in mehreren Details verbessert und enthält einige zusätzliche Aufgaben und Beispiele.", - "edition": "12", - "extra": "DOI: 10.1007/978-3-658-11545-6", - "language": "de", - "libraryCatalog": "www.springer.com", - "publisher": "Springer Spektrum", - "series": "Grundkurs Mathematik", - "shortTitle": "Analysis 1", - "url": "https://www.springer.com/gb/book/9783658115449", - "attachments": [ - { - "title": "Snapshot" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.springer.com/jp/book/9783642331909", - "items": [ - { - "itemType": "book", - "title": "Advances in Visual Computing: 8th International Symposium, ISVC 2012, Rethymnon, Crete, Greece, July 16-18, 2012, Revised Selected Papers, Part II", - "creators": [ - { - "firstName": "George", - "lastName": "Bebis", - "creatorType": "editor" - }, - { - "firstName": "Richard", - "lastName": "Boyle", - "creatorType": "editor" - }, - { - "firstName": "Bahram", - "lastName": "Parvin", - "creatorType": "editor" - }, - { - "firstName": "Darko", - "lastName": "Koracin", - "creatorType": "editor" - }, - { - "firstName": "Fowlkes", - "lastName": "Charless", - "creatorType": "editor" - }, - { - "firstName": "Wang", - "lastName": "Sen", - "creatorType": "editor" - }, - { - "firstName": "Choi", - "lastName": "Min-Hyung", - "creatorType": "editor" - }, - { - "firstName": "Stephan", - "lastName": "Mantler", - "creatorType": "editor" - }, - { - "firstName": "Jurgen", - "lastName": "Schulze", - "creatorType": "editor" - }, - { - "firstName": "Daniel", - "lastName": "Acevedo", - "creatorType": "editor" - }, - { - "firstName": "Klaus", - "lastName": "Mueller", - "creatorType": "editor" - }, - { - "firstName": "Michael", - "lastName": "Papka", - "creatorType": "editor" - } - ], - "date": "2012", - "ISBN": "9783642331909", - "abstractNote": "The two volume set LNCS 7431 and 7432 constitutes the refereed proceedings of the 8th International Symposium on Visual Computing, ISVC 2012, held in Rethymnon, Crete, Greece, in July 2012. The 68 revised full papers and 35 poster papers presented together with 45 special track papers were carefully reviewed and selected from more than 200 submissions. The papers are organized in topical sections: Part I (LNCS 7431) comprises computational bioimaging; computer graphics; calibration and 3D vision; object recognition; illumination, modeling, and segmentation; visualization; 3D mapping, modeling and surface reconstruction; motion and tracking; optimization for vision, graphics, and medical imaging, HCI and recognition. Part II (LNCS 7432) comprises topics such as unconstrained biometrics: advances and trends; intelligent environments: algorithms and applications; applications; virtual reality; face processing and recognition.", - "extra": "DOI: 10.1007/978-3-642-33191-6", - "language": "en", - "libraryCatalog": "www.springer.com", - "place": "Berlin Heidelberg", - "publisher": "Springer-Verlag", - "series": "Image Processing, Computer Vision, Pattern Recognition, and Graphics", - "shortTitle": "Advances in Visual Computing", - "url": "https://www.springer.com/jp/book/9783642331909", - "attachments": [ - { - "title": "Snapshot" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.springer.com/jp/search?query=references&submit=Submit+Query", - "items": "multiple" - }, - { - "type": "web", - "url": "https://www.palgrave.com/de/book/9783030047580#aboutAuthors", - "items": [ - { - "itemType": "book", - "title": "The Economic Consequences of the Peace: With a new introduction by Michael Cox", - "creators": [ - { - "firstName": "Michael", - "lastName": "Cox", - "creatorType": "editor" - }, - { - "firstName": "John Maynard", - "lastName": "Keynes", - "creatorType": "author" - } - ], - "date": "2019", - "ISBN": "9783030047580", - "abstractNote": "First published in December 1919, this global bestseller attacking those who had made the peace in Paris after the First World War, sparked immediate controversy. It also made John Maynard Keynes famous overnight and soon came to define how people around the world viewed the Versailles Peace Treaty. In Germany the book, which argued against reparations, was greeted with enthusiasm; in France with dismay; and in the US as ammunition that could be (and was) used against Woodrow Wilson in his ultimately unsuccessful bid to sell the League of Nations to an increasingly sceptical American public. Meanwhile in his own country the book provoked outrage amongst establishment critics – Keynes was even refused membership of the prestigious British Academy – while admirers from Winston Churchill to the founders of the LSE, Sidney and Beatrice Webb, went on to praise Keynes for his wisdom and humanity. Keynes may have written what he thought was a reasoned critique of the economics of the peace settlement. In effect, he had penned a political bombshell whose key arguments are still being debated today. The Economic Consequences of the Peace is now reissued by Keynes’ publisher of choice with a new introduction from Michael Cox, one of the major figures in the field of International Relations today. Scholarly yet engaged and readable, Cox’s introduction to the work – written a century after the book first hit the headlines – critically appraises Keynes' polemic contextualising and bringing to life the text for a new generation of scholars and students of IR, IPE, Politics and History. The original text and this authoritative introduction provide essential reading for anyone who wishes to understand the tragedy that was the twentieth century; why making peace with former enemies can be just as hard as winning a war against them; and how and why ideas really do matter.", - "extra": "DOI: 10.1007/978-3-030-04759-7", - "language": "en", - "libraryCatalog": "www.palgrave.com", - "publisher": "Palgrave Macmillan", - "shortTitle": "The Economic Consequences of the Peace", - "url": "https://www.palgrave.com/de/book/9783030047580", - "attachments": [ - { - "title": "Snapshot" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - } -] -/** END TEST CASES **/ diff --git a/Springer Link.js b/Springer Link.js index 8062ce1b6ad..c86411337a7 100644 --- a/Springer Link.js +++ b/Springer Link.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-05-09 16:39:27" + "lastUpdated": "2024-07-22 20:08:47" } /* @@ -280,7 +280,6 @@ function scrape(doc, url) { }); } - /** BEGIN TEST CASES **/ var testCases = [ { @@ -662,6 +661,36 @@ var testCases = [ "type": "web", "url": "https://link.springer.com/book/10.1007/978-3-476-05742-6", "items": "multiple" + }, + { + "type": "web", + "url": "https://link.springer.com/book/10.1007/978-3-319-63324-4", + "items": "multiple" + }, + { + "type": "web", + "url": "https://link.springer.com/book/10.1007/978-94-6209-482-6", + "items": "multiple" + }, + { + "type": "web", + "url": "https://link.springer.com/book/10.1007/b137952", + "items": "multiple" + }, + { + "type": "web", + "url": "https://link.springer.com/book/10.1007/978-3-658-11545-6", + "items": "multiple" + }, + { + "type": "web", + "url": "https://link.springer.com/book/10.1007/978-3-642-33191-6", + "items": "multiple" + }, + { + "type": "web", + "url": "https://link.springer.com/book/10.1007/978-3-030-04759-7", + "items": "multiple" } ] /** END TEST CASES **/ diff --git a/deleted.txt b/deleted.txt index 106fc903dd3..2c48cb97b1f 100644 --- a/deleted.txt +++ b/deleted.txt @@ -126,3 +126,4 @@ ba10b5bc-562f-11e1-b20d-a3084924019b # Nuclear Receptor Signaling no longer exis fe39e97d-7397-4f3f-a5f3-396a1a79213c # OpenJudis: New site just lists PDFs without metadata fc410e64-0252-4cd3-acb1-25e584775fa2 # National Library of Australia: Old site defunct as of 2019 c0e6fda6-0ecd-e4f4-39ca-37a4de436e15 # Library Catalog (GEAC): No instances of this catalog system are still online as of 2021 +b38a44f4-b8af-4553-9edf-fba4d2598d6a # Springer Books: Site was merged into Springer Link From 21a40178c35c931474376e1550891d1e35060eb3 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Wed, 24 Jul 2024 06:24:28 +0200 Subject: [PATCH 094/158] Fix JAMA (Silverchair) (#3335) https://forums.zotero.org/discussion/115948/cannot-import-pdf-file-from-jama#latest --- Silverchair.js | 78 ++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/Silverchair.js b/Silverchair.js index 242e2ae4b5b..ef30ca86958 100644 --- a/Silverchair.js +++ b/Silverchair.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2022-08-23 13:00:08" + "lastUpdated": "2024-07-13 18:25:34" } /* @@ -58,7 +58,7 @@ function getSearchResults(doc, checkOnly) { var items = {}; var found = false; // First one is issue, 2nd one search results - var rows = doc.querySelectorAll('#ArticleList h5.item-title>a, .al-title a[href*="article"], .al-article-items > .customLink > a[href*="article"], a[class="tocLink"]'); + var rows = doc.querySelectorAll('#ArticleList h5.item-title>a, .al-title a[href*="article"], .al-article-items > .customLink > a[href*="article"], a.tocLink'); for (let row of rows) { let href = row.href; let title = ZU.trimInternal(row.textContent); @@ -70,14 +70,16 @@ function getSearchResults(doc, checkOnly) { return found ? items : false; } -function doWeb(doc, url) { - if (detectWeb(doc, url) == "multiple") { - Zotero.selectItems(getSearchResults(doc, false), function (items) { - if (items) ZU.processDocuments(Object.keys(items), scrape); - }); +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 { - scrape(doc, url); + await scrape(doc, url); } } @@ -93,7 +95,7 @@ function getArticleId(doc) { return id; } -function scrape(doc, url) { +async function scrape(doc, url) { let id = getArticleId(doc); let type = attr(doc, '.citation-download-wrap input[name="resourceType"]', "value"); // Z.debug(type) @@ -109,41 +111,41 @@ function scrape(doc, url) { var risURL = "/Citation/Download?resourceId=" + id + "&resourceType=" + type + "&citationFormat=0"; // Z.debug(risURL); - var pdfURL = attr(doc, 'a.article-pdfLink', 'href'); + let pdfURL = attr(doc, 'a.article-pdfLink', 'href'); + // e.g. all JAMA journals + if (!pdfURL) pdfURL = attr(doc, 'a#pdf-link', 'data-article-url'); // Z.debug("pdfURL: " + pdfURL); - ZU.doGet(risURL, function (text) { - if (text.includes('We are sorry, but we are experiencing unusual traffic at this time.')) { - throw new Error('Rate-limited'); + let risText = await requestText(risURL); + if (risText.includes('We are sorry, but we are experiencing unusual traffic at this time.')) { + throw new Error('Rate-limited'); + } + // Z.debug(text); + var translator = Zotero.loadTranslator("import"); + translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); + translator.setString(risText); + translator.setHandler('itemDone', (_obj, item) => { + if (item.pages) { + // if item.pages only spans one page (4-4), replace the range + // with a single page number (4). + item.pages = item.pages.trim().replace(/^([^-]+)-\1$/, '$1'); } - - // Z.debug(text); - var translator = Zotero.loadTranslator("import"); - translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); - translator.setString(text); - translator.setHandler("itemDone", function (obj, item) { - if (item.pages) { - // if item.pages only spans one page (4-4), replace the range - // with a single page number (4). - item.pages = item.pages.trim().replace(/^([^-]+)-\1$/, '$1'); - } - if (item.itemType == "bookSection" && chapterTitle) { - item.title = chapterTitle; - } - if (pdfURL) { - item.attachments.push({ - url: pdfURL, - title: "Full Text PDF", - mimeType: "application/pdf" - }); - } + if (item.itemType == "bookSection" && chapterTitle) { + item.title = chapterTitle; + } + if (pdfURL) { item.attachments.push({ - title: "Snapshot", - document: doc + url: pdfURL, + title: "Full Text PDF", + mimeType: "application/pdf" }); - item.complete(); + } + item.attachments.push({ + title: "Snapshot", + document: doc }); - translator.translate(); + item.complete(); }); + await translator.translate(); } /** BEGIN TEST CASES **/ From 7baf5eb64711015639a60e6af34d02f072d27740 Mon Sep 17 00:00:00 2001 From: "Alex T." Date: Wed, 24 Jul 2024 15:51:15 +0200 Subject: [PATCH 095/158] eLibrary.ru: Name parsing logic fixes, test updates (#3338) --- eLibrary.ru.js | 106 +++++++++++++++++++++++++++---------------------- 1 file changed, 58 insertions(+), 48 deletions(-) diff --git a/eLibrary.ru.js b/eLibrary.ru.js index 6b9112a5f35..a2051e500e5 100644 --- a/eLibrary.ru.js +++ b/eLibrary.ru.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-06-24 19:34:39" + "lastUpdated": "2024-07-14 15:27:57" } /* @@ -88,21 +88,19 @@ function getDocType(doc) { case "научная статья": case "статья в журнале": case "статья в открытом архиве": + case "сборник трудов конференции": + case "статья в журнале - разное": itemType = "journalArticle"; break; case "статья в сборнике трудов конференции": + case "публикация в сборнике трудов конференции": + case "тезисы доклада на конференции": itemType = "conferencePaper"; break; case "учебное пособие": case "монография": itemType = "book"; break; - case "публикация в сборнике трудов конференции": - itemType = "conferencePaper"; - break; - case "тезисы доклада на конференции": - itemType = "conferencePaper"; - break; default: Zotero.debug("Unknown type: " + docType + ". Using 'journalArticle'"); itemType = "journalArticle"; @@ -167,20 +165,27 @@ async function scrape(doc, url = doc.location.href) { /* Common author field formats are: (1) "LAST FIRST PATRONIMIC" (2) "LAST F. P." || "LAST F.P." || "LAST F.P" || "LAST F." + (3) "LAST (MAIDEN) FIRST PATRONYMIC" In all these cases, we put comma after LAST for `ZU.cleanAuthor()` to work. Other formats are rare, but possible, e.g. "ВАН ДЕ КЕРЧОВЕ Р." == "Van de Kerchove R.". They go to single-field mode (assuming they got no comma). */ var nameFormat1RE = new ZU.XRegExp("^\\p{Letter}+\\s\\p{Letter}+\\s\\p{Letter}+$"); var nameFormat2RE = new ZU.XRegExp("^\\p{Letter}+\\s\\p{Letter}\\.(\\s?\\p{Letter}\\.?)?$"); - + var nameFormat3RE = new ZU.XRegExp("^\\p{Letter}+\\s\\(\\p{Letter}+\\)\\s\\p{Letter}+\\s\\p{Letter}+$"); + var isFormat1 = ZU.XRegExp.test(dirty, nameFormat1RE); var isFormat2 = ZU.XRegExp.test(dirty, nameFormat2RE); + var isFormat3 = ZU.XRegExp.test(dirty, nameFormat3RE); if (isFormat1 || isFormat2) { // add comma before the first space dirty = dirty.replace(/^([^\s]*)(\s)/, '$1, '); } + else if (isFormat3) { + // add comma after the parenthesized maiden name + dirty = dirty.replace(/^(.+\))(\s)/, '$1, '); + } var cleaned = ZU.cleanAuthor(dirty, "author", true); @@ -192,19 +197,19 @@ async function scrape(doc, url = doc.location.href) { for example, "S. V." -> "S. v.", but "S. K." -> "S. K.". Thus, we can only apply it to Format1 . */ - if (isFormat1) { + if (isFormat1 || isFormat3) { // "FIRST PATRONIMIC" -> "First Patronimic" cleaned.firstName = fixCasing(cleaned.firstName); } if (cleaned.firstName === undefined) { // Unable to parse. Restore punctuation. - cleaned.fieldMode = true; + cleaned.fieldMode = 1; cleaned.lastName = dirty; } - cleaned.lastName = fixCasing(cleaned.lastName, true); - + cleaned.lastName = fixCasing(cleaned.lastName); + // Skip entries with an @ sign-- email addresses slip in otherwise if (!cleaned.lastName.includes("@")) item.creators.push(cleaned); } @@ -337,27 +342,27 @@ var testCases = [ "title": "Использование Молекулярно-Генетических Методов Установления Закономерностей Наследования Для Выявления Доноров Значимых Признаков Яблони", "creators": [ { - "firstName": "И. И.", + "firstName": "Иван Иванович", "lastName": "Супрун", "creatorType": "author" }, { - "firstName": "Е. В.", - "lastName": "Ульяновская", + "firstName": "Елена Владимировна", + "lastName": "Ульяновская (Колосова)", "creatorType": "author" }, { - "firstName": "Е. Н.", + "firstName": "Евгений Николаевич", "lastName": "Седов", "creatorType": "author" }, { - "firstName": "Г. А.", + "firstName": "Галина Алексеевна", "lastName": "Седышева", "creatorType": "author" }, { - "firstName": "З. М.", + "firstName": "Зоя Михайловна", "lastName": "Серова", "creatorType": "author" } @@ -393,29 +398,29 @@ var testCases = [ }, { "type": "web", - "url": "https://www.elibrary.ru/item.asp?id=21640363", + "url": "https://elibrary.ru/item.asp?id=21640363", "items": [ { "itemType": "journalArticle", "title": "На пути к верификации C программ. Часть 3. Перевод из языка C-light в язык C-light-kernel и его формальное обоснование", "creators": [ { - "firstName": "В. А.", + "firstName": "Валерий Александрович", "lastName": "Непомнящий", "creatorType": "author" }, { - "firstName": "И. С.", + "firstName": "Игорь Сергеевич", "lastName": "Ануреев", "creatorType": "author" }, { - "firstName": "И. Н.", + "firstName": "Иван Николаевич", "lastName": "Михайлов", "creatorType": "author" }, { - "firstName": "А. В.", + "firstName": "Алексей Владимирович", "lastName": "Промский", "creatorType": "author" } @@ -426,7 +431,7 @@ var testCases = [ "language": "ru", "libraryCatalog": "eLibrary.ru", "pages": "83", - "url": "https://www.elibrary.ru/item.asp?id=21640363", + "url": "https://elibrary.ru/item.asp?id=21640363", "attachments": [], "tags": [], "notes": [], @@ -443,7 +448,7 @@ var testCases = [ "title": "Информационно-поисковая полнотекстовая система \"Боярские списки XVIII века\"", "creators": [ { - "firstName": "А. В.", + "firstName": "Андрей Викторович", "lastName": "Захаров", "creatorType": "author" } @@ -491,19 +496,19 @@ var testCases = [ }, { "type": "web", - "url": "https://www.elibrary.ru/item.asp?id=20028198", + "url": "https://elibrary.ru/item.asp?id=20028198", "items": [ { "itemType": "book", "title": "Аппарат издания и правила оформления", "creators": [ { - "firstName": "Л. П.", + "firstName": "Людмила Павловна", "lastName": "Стычишина", "creatorType": "author" }, { - "firstName": "А. В.", + "firstName": "Александр Викторович", "lastName": "Хохлов", "creatorType": "author" } @@ -511,7 +516,7 @@ var testCases = [ "language": "ru", "libraryCatalog": "eLibrary.ru", "publisher": "Изд-во Политехнического университета", - "url": "https://www.elibrary.ru/item.asp?id=20028198", + "url": "https://elibrary.ru/item.asp?id=20028198", "attachments": [], "tags": [ { @@ -565,7 +570,7 @@ var testCases = [ "title": "Графики негладких контактных отображений на группах карно с сублоренцевой структурой", "creators": [ { - "firstName": "М. Б.", + "firstName": "Мария Борисовна", "lastName": "Карманова", "creatorType": "author" } @@ -654,7 +659,7 @@ var testCases = [ }, { "type": "web", - "url": "https://www.elibrary.ru/item.asp?id=18310800", + "url": "https://elibrary.ru/item.asp?id=18310800", "items": [ { "itemType": "journalArticle", @@ -677,21 +682,23 @@ var testCases = [ }, { "lastName": "Де Щулф А.", - "creatorType": "author" + "creatorType": "author", + "fieldMode": 1 }, { - "firstName": "Е.", + "firstName": "Эдуард Павлович", "lastName": "Дворников", "creatorType": "author" }, { - "firstName": "А. В.", - "lastName": "Ебел", + "firstName": "Александр Викторович", + "lastName": "Эбель", "creatorType": "author" }, { "lastName": "Ван Хооф Л.", - "creatorType": "author" + "creatorType": "author", + "fieldMode": 1 }, { "firstName": "С.", @@ -700,7 +707,8 @@ var testCases = [ }, { "lastName": "Де Лангхе К.", - "creatorType": "author" + "creatorType": "author", + "fieldMode": 1 }, { "firstName": "А.", @@ -709,7 +717,8 @@ var testCases = [ }, { "lastName": "Ван Де Керчове Р.", - "creatorType": "author" + "creatorType": "author", + "fieldMode": 1 }, { "firstName": "Р.", @@ -718,7 +727,8 @@ var testCases = [ }, { "lastName": "Те Киефте Д.", - "creatorType": "author" + "creatorType": "author", + "fieldMode": 1 } ], "date": "2009", @@ -728,7 +738,7 @@ var testCases = [ "libraryCatalog": "eLibrary.ru", "pages": "10-20", "publicationTitle": "Мир Евразии", - "url": "https://www.elibrary.ru/item.asp?id=18310800", + "url": "https://elibrary.ru/item.asp?id=18310800", "attachments": [], "tags": [ { @@ -771,7 +781,7 @@ var testCases = [ "libraryCatalog": "eLibrary.ru", "pages": "26-48", "publicationTitle": "Mankind Quarterly", - "url": "https://www.elibrary.ru/item.asp?id=22208210", + "url": "https://elibrary.ru/item.asp?id=22208210", "volume": "54", "attachments": [], "tags": [ @@ -798,29 +808,29 @@ var testCases = [ }, { "type": "web", - "url": "https://www.elibrary.ru/item.asp?id=35209757", + "url": "https://elibrary.ru/item.asp?id=35209757", "items": [ { "itemType": "journalArticle", "title": "Факторы Патогенности Недифтерийных Коринебактерий, Выделенных От Больных С Патологией Респираторного Тракта", "creators": [ { - "firstName": "А. А.", - "lastName": "Алиева", + "firstName": "Анна Александровна", + "lastName": "Алиева (Чепурова)", "creatorType": "author" }, { - "firstName": "Г. Г.", + "firstName": "Галина Георгиевна", "lastName": "Харсеева", "creatorType": "author" }, { - "firstName": "Э. О.", + "firstName": "Эрдем Очанович", "lastName": "Мангутов", "creatorType": "author" }, { - "firstName": "С. Н.", + "firstName": "Сергей Николаевич", "lastName": "Головин", "creatorType": "author" } @@ -834,7 +844,7 @@ var testCases = [ "libraryCatalog": "eLibrary.ru", "pages": "375-378", "publicationTitle": "Клиническая Лабораторная Диагностика", - "url": "https://www.elibrary.ru/item.asp?id=35209757", + "url": "https://elibrary.ru/item.asp?id=35209757", "volume": "63", "attachments": [], "tags": [ From 5f03dc91ba6cf37fe976bfc61f1dfd351f83e12d Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 24 Jul 2024 09:53:25 -0400 Subject: [PATCH 096/158] ProQuest: Support Archive Finder and site changes (#3341) --- ProQuest.js | 224 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 172 insertions(+), 52 deletions(-) diff --git a/ProQuest.js b/ProQuest.js index 7e98e9030ff..8c01e8c7c58 100644 --- a/ProQuest.js +++ b/ProQuest.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-07-05 11:54:27" + "lastUpdated": "2024-07-16 17:42:05" } /* @@ -258,33 +258,46 @@ function scrape(doc, url, type) { // get all rows var rows = doc.getElementsByClassName('display_record_indexing_row'); - let label, value, enLabel; var dates = [], place = {}, altKeywords = []; for (let i = 0, n = rows.length; i < n; i++) { - label = rows[i].childNodes[0]; - value = rows[i].childNodes[1]; + let labelElem = rows[i].childNodes[0]; + let valueElem = rows[i].childNodes[1]; - if (!label || !value) continue; + if (!labelElem || !valueElem) continue; - label = label.textContent.trim(); - value = value.textContent.trim(); // trimInternal? + let label = labelElem.textContent.trim(); + let value = valueElem.textContent.trim(); // trimInternal? // translate label - enLabel = L[label] || label; + let enLabel = L[label] || label; let creatorType; switch (enLabel) { case 'Title': if (value == value.toUpperCase()) value = ZU.capitalizeTitle(value, true); item.title = value; break; + case 'Collection name': + if (!item.title) { + item.title = value; + } + break; case 'Author': case 'Editor': // test case? - creatorType = (enLabel == 'Author') ? 'author' : 'editor'; + case 'People': + if (enLabel == 'Author') { + creatorType = 'author'; + } + else if (enLabel == 'Editor') { + creatorType = 'editor'; + } + else { + creatorType = 'contributor'; + } // Use titles of a tags if they exist, since these don't include // affiliations; don't include links to ORCID profiles - value = ZU.xpathText(rows[i].childNodes[1], "a[not(@id='orcidLink')]/@title", null, "; ") || value; + value = ZU.xpathText(valueElem, "a[not(@id='orcidLink')]/@title", null, "; ") || value; value = value.replace(/^by\s+/i, '') // sometimes the authors begin with "By" .split(/\s*;\s*|\s+and\s+/i); @@ -297,7 +310,7 @@ function scrape(doc, url, type) { break; case 'Signator': if (item.itemType == 'letter') { - for (let signator of rows[i].childNodes[1].querySelectorAll('a')) { + for (let signator of valueElem.querySelectorAll('a')) { let name = signator.textContent; item.creators.push( ZU.cleanAuthor(name, 'author', name.includes(','))); @@ -306,7 +319,7 @@ function scrape(doc, url, type) { break; case 'Recipient': if (item.itemType == 'letter') { - for (let recipient of rows[i].childNodes[1].querySelectorAll('a')) { + for (let recipient of valueElem.querySelectorAll('a')) { let name = recipient.textContent; if (/\b(department|bureau|office|director)\b/i.test(name)) { // a general edge case that we handle specifically, @@ -371,19 +384,36 @@ function scrape(doc, url, type) { break; case 'Publisher': case 'Printer/Publisher': - item.publisher = value; + item.publisher = valueElem.innerText.split('\n')[0]; + break; + case 'Repository': + item.archive = value; + break; + case 'Accession number/LC reference': + item.archiveLocation = value; break; case 'Identifier / keyword': - item.tags = value.split(/\s*(?:,|;)\s*/); - break; - // alternative tags + case 'NUCMC index term': case 'Subject': + if (valueElem.querySelector('a')) { + item.tags.push(...Array.from(valueElem.querySelectorAll('a')) + .map(a => a.textContent.replace(/\.$/, ''))); + } + else { + item.tags.push(...value.split(/\s*(?:,|;)\s*/)); + } + break; case 'Journal subject': case 'Publication subject': + // alternative tags altKeywords.push(value); break; + case 'Publication note': + item.notes.push({ note: valueElem.innerText }); // Keep line breaks + break; + // we'll figure out proper location later case 'University location': case 'School location': @@ -474,6 +504,9 @@ function scrape(doc, url, type) { if (!item.publicationTitle && ZU.fieldIsValidForType('publicationTitle', item.itemType)) { var pubTitle = ZU.xpathText(byline, './/a[@id="lateralSearch"]'); + if (!pubTitle) { + pubTitle = text(doc, '#authordiv .newspaperArticle strong'); + } // remove date range if (pubTitle) item.publicationTitle = pubTitle.replace(/\s*\(.+/, ''); } @@ -489,7 +522,7 @@ function scrape(doc, url, type) { item.date = date; } - item.abstractNote = ZU.xpath(doc, '//div[contains(@id, "abstractSummary_")]/p') + item.abstractNote = ZU.xpath(doc, '//div[contains(@id, "abstractSummary_")]//p') .map(function (p) { return ZU.trimInternal(p.textContent); }).join('\n'); @@ -499,7 +532,7 @@ function scrape(doc, url, type) { } let pdfLink = doc.querySelector('[id^="downloadPDFLink"]'); - if (pdfLink) { + if (pdfLink && !pdfLink.closest('#suggestedSourcesBelowFullText')) { item.attachments.push({ title: 'Full Text PDF', url: pdfLink.href, @@ -585,6 +618,9 @@ function getItemType(types) { else if (testString.includes("letter") || testString.includes("cable")) { guessType = "letter"; } + else if (testString.includes("archival material")) { + guessType = "manuscript"; + } } // We don't have localized strings for item types, so just guess that it's a journal article @@ -1307,7 +1343,7 @@ var fieldNames = { var testCases = [ { "type": "web", - "url": "https://search.proquest.com/dissertations/docview/251755786/abstract/132B8A749B71E82DBA1/1", + "url": "https://www.proquest.com/dissertations/docview/251755786/abstract/132B8A749B71E82DBA1/1?sourcetype=Dissertations%20&%20Theses", "items": [ { "itemType": "thesis", @@ -1329,7 +1365,7 @@ var testCases = [ "shortTitle": "Beyond Stanislavsky", "thesisType": "Ph.D.", "university": "The Ohio State University", - "url": "https://search.proquest.com/dissertations/docview/251755786/abstract/132B8A749B71E82DBA1/1", + "url": "https://www.proquest.com/dissertations/docview/251755786/abstract/132B8A749B71E82DBA1/1?sourcetype=Dissertations%20&%20Theses", "attachments": [ { "title": "Full Text PDF", @@ -1341,9 +1377,6 @@ var testCases = [ { "tag": "Communication and the arts" }, - { - "tag": "Konstantin" - }, { "tag": "Konstantin Stanislavsky" }, @@ -1354,7 +1387,10 @@ var testCases = [ "tag": "Russian" }, { - "tag": "Stanislavsky" + "tag": "Stanislavsky, Konstantin" + }, + { + "tag": "Theater" }, { "tag": "Theater" @@ -1476,7 +1512,7 @@ var testCases = [ }, { "type": "web", - "url": "https://search.proquest.com/docview/129023293/abstract", + "url": "https://www.proquest.com/docview/129023293/abstract?sourcetype=Historical%20Newspapers", "items": [ { "itemType": "newspaperArticle", @@ -1491,7 +1527,7 @@ var testCases = [ "publicationTitle": "Wall Street Journal (1889-1922)", "rights": "Copyright Dow Jones & Company Inc Dec 5, 1905", "shortTitle": "THE PRESIDENT AND ALDRICH.", - "url": "https://search.proquest.com/docview/129023293/abstract", + "url": "https://www.proquest.com/docview/129023293/abstract?sourcetype=Historical%20Newspapers", "attachments": [ { "title": "Full Text PDF", @@ -1735,7 +1771,7 @@ var testCases = [ }, { "type": "web", - "url": "https://search.proquest.com/docview/1297954386/citation", + "url": "https://www.proquest.com/docview/1297954386/citation?sourcetype=Scholarly%20Journals", "items": [ { "itemType": "journalArticle", @@ -1750,12 +1786,11 @@ var testCases = [ "date": "Nov 1, 1990", "ISSN": "0275-0392", "issue": "4", - "language": "English", "libraryCatalog": "ProQuest", "pages": "486–498", "publicationTitle": "Human Rights Quarterly", "shortTitle": "Women's Rights as Human Rights", - "url": "https://search.proquest.com/docview/1297954386/citation", + "url": "https://www.proquest.com/docview/1297954386/citation?sourcetype=Scholarly%20Journals", "volume": "12", "attachments": [ { @@ -1795,6 +1830,7 @@ var testCases = [ { "type": "web", "url": "https://www.proquest.com/dnsa/docview/1679056926/fulltextPDF/8C1FDDD8E506429BPQ/1", + "detectedItemType": "journalArticle", "items": [ { "itemType": "letter", @@ -1848,32 +1884,47 @@ var testCases = [ }, { "type": "web", - "url": "https://www.proquest.com/dnsa/docview/1679145498/abstract/BA3C959768F54C93PQ/16", + "url": "https://www.proquest.com/dnsa/docview/1679145498/abstract/BA3C959768F54C93PQ/16?sourcetype=Government%20&%20Official%20Publications", "items": [ { "itemType": "letter", "title": "[Dear Colleague Letter regarding Prosecution of Yasir Arafat; Includes Letter to Edwin Meese, List of Senators Signing Letter, and Washington Times Article Dated February 7, 1986]", "creators": [ { - "firstName": "Joseph R.", - "lastName": "Biden", - "creatorType": "recipient" + "firstName": "Yasir", + "lastName": "Arafat", + "creatorType": "contributor" }, { - "firstName": "Charles E.", - "lastName": "Grassley", - "creatorType": "author" + "firstName": "Edwin III", + "lastName": "Meese", + "creatorType": "contributor" + }, + { + "firstName": "George Curtis", + "lastName": "Moore", + "creatorType": "contributor" + }, + { + "firstName": "Cleo A.", + "lastName": "Noel", + "creatorType": "contributor" }, { - "firstName": "Frank R.", - "lastName": "Lautenberg", + "firstName": "Ronald W.", + "lastName": "Reagan", + "creatorType": "contributor" + }, + { + "firstName": "United States Congress", + "lastName": "Senate", "creatorType": "author" } ], "date": "January 24, 1986", "language": "English", "libraryCatalog": "ProQuest", - "url": "https://www.proquest.com/dnsa/docview/1679145498/abstract/BA3C959768F54C93PQ/16", + "url": "https://www.proquest.com/dnsa/docview/1679145498/abstract/BA3C959768F54C93PQ/16?sourcetype=Government%20&%20Official%20Publications", "attachments": [ { "title": "Full Text PDF", @@ -1882,6 +1933,9 @@ var testCases = [ } ], "tags": [ + { + "tag": "Biden, Joseph R., Jr. [et al.]" + }, { "tag": "Indictments" }, @@ -1895,14 +1949,18 @@ var testCases = [ "tag": "Washington Times" } ], - "notes": [], + "notes": [ + { + "note": "Article copyrighted by the Washington Times; used by permission (previously published document)" + } + ], "seeAlso": [] } ] }, { "type": "web", - "url": "https://www.proquest.com/docview/2240944639/citation/DC389F101A924D14PQ/1", + "url": "https://www.proquest.com/docview/2240944639/citation/DC389F101A924D14PQ/1?sourcetype=Books", "items": [ { "itemType": "book", @@ -1918,10 +1976,9 @@ var testCases = [ "language": "English", "libraryCatalog": "ProQuest", "numPages": "[30], 304 p., [3] leaves of plates :", - "place": "London, England", - "publisher": "printed by William Godbid, for William Shrowsbury, at the Bible in Duck-Lane", + "publisher": "Londonprinted by William Godbid, for William Shrowsbury, at the Bible in Duck-Lane", "shortTitle": "Stereometrie", - "url": "https://www.proquest.com/docview/2240944639/citation/DC389F101A924D14PQ/1", + "url": "https://www.proquest.com/docview/2240944639/citation/DC389F101A924D14PQ/1?sourcetype=Books", "attachments": [ { "title": "Full Text PDF", @@ -1931,13 +1988,19 @@ var testCases = [ ], "tags": [ { - "tag": "Gaging - Early works to 1800." + "tag": "Agriculture, viticulture, texts on hunting, veterinary science" + }, + { + "tag": "Gaging - Early works to 1800" }, { - "tag": "Liquors - Gaging and testing - Early works to 1800." + "tag": "Liquors - Gaging and testing - Early works to 1800" }, { - "tag": "Wine and wine making - Gaging and testing - Early works to 1800." + "tag": "Science and mathematics" + }, + { + "tag": "Wine and wine making - Gaging and testing - Early works to 1800" } ], "notes": [], @@ -1947,7 +2010,7 @@ var testCases = [ }, { "type": "web", - "url": "https://www.proquest.com/docview/2661071397", + "url": "https://www.proquest.com/docview/2661071397?sourcetype=Books", "items": [ { "itemType": "book", @@ -1958,16 +2021,73 @@ var testCases = [ "abstractNote": "The National Assessment of Educational Progress (NAEP) -- often called \"The Nation's Report Card\" -- is the largest nationally representative and continuing assessment of what students in public and private schools in the United States know and can do in various subjects and has provided policy makers and the public with invaluable information on U.S. students for more than 50 years. Unique in the information it provides, NAEP is the nation's only mechanism for tracking student achievement over time and comparing trends across states and districts for all students and important student groups (e.g., by race, sex, English learner status, disability status, family poverty status). While the program helps educators, policymakers, and the public understand these educational outcomes, the program has incurred substantially increased costs in recent years and now costs about $175.2 million per year. \"A Pragmatic Future for NAEP: Containing Costs and Updating Technologies\" recommends changes to bolster the future success of the program by identifying areas where federal administrators could take advantage of savings, such as new technological tools and platforms as well as efforts to use local administration and deployment for the tests. Additionally, the report recommends areas where the program should clearly communicate about spending and undertake efforts to streamline management. The report also provides recommendations to increase the visibility and coherence of NAEP's research activities. [Contributors include the Division of Behavioral and Social Sciences and Education; Committee on National Statistics; and Panel on Opportunities for the National Assessment of Educational Progress in an Age of AI and Pervasive Computation: A Pragmatic Vision.]", "language": "English", "libraryCatalog": "ProQuest", - "publisher": "National Academies Press500 Fifth Street NW, Washington, DC 20001http://www.nap.eduTel.: 888-624-8373, Fax: 202-334-2793", + "publisher": "National Academies Press", "shortTitle": "A Pragmatic Future for NAEP", - "url": "https://www.proquest.com/docview/2661071397", + "url": "https://www.proquest.com/docview/2661071397?sourcetype=Books", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.proquest.com/archivefinder/docview/2747312572/EC990146E3B1499EPQ/1?sourcetype=Archival%20Materials", + "items": [ + { + "itemType": "manuscript", + "title": "Stamp Act collection", + "creators": [], + "date": "1765-1768", + "abstractNote": "Two reprints (ca. 1843) of the British Stamp Act of 1765; two photocopies of stamps; transcript of a Northampton County, Va., court declaration (1766 Feb. 11) that the act was not binding; contemporary copies of three letters (1766 Feb. 28, Mar. 18, and June 13) relating to the act from English merchants to the colonies, the second letter addressed to John Hancock; and copybook containing transcriptions of letters (1765-1766) from the Court of St. James documenting the reaction of King George III and his government to the protests of American colonists to the Stamp Act. In part, photocopy (positive) and transcripts (handwritten and typewritten); [S.l.]. Typewritten Copy of Northampton County court document made with permission of Clifford I. Millard,; Washington, D.C. : Library of Congress, Manuscript Division, 1932. Forms part of: Miscellaneous Manuscripts collection.", + "language": "English", + "libraryCatalog": "ProQuest", + "url": "https://www.proquest.com/archivefinder/docview/2747312572/EC990146E3B1499EPQ/1?sourcetype=Archival%20Materials", "attachments": [], "tags": [ { - "tag": "Elementary Secondary Education" + "tag": "Courts; Virginia; Northampton County" + }, + { + "tag": "George; III,; King of Great Britain, 1738-1820" + }, + { + "tag": "Great Britain; Colonies; America" + }, + { + "tag": "Great Britain; Court and courtiers; History; 18th century" + }, + { + "tag": "Great Britain; Politics and government; 1760-1789" + }, + { + "tag": "Great Britain; Stamp Act (1765)" + }, + { + "tag": "Hancock, John, 1737-1793; Correspondence" + }, + { + "tag": "Merchants; England; London; History; 18th century" + }, + { + "tag": "NUCMC (US Library Of Congress) records" + }, + { + "tag": "Northampton County (Va.); History" + }, + { + "tag": "United States; Politics and government; To 1775" + }, + { + "tag": "Virginia; History; Colonial period, ca. 1600-1775" + } + ], + "notes": [ + { + "note": "Contents of repository: 38,000,000 items\n\nRepository date coverage: 17th century - present\n\nRepository materials: All areas of American history and culture. Will also accept photographic copies of collections located elsewhere but within the scope of solicitation.\n\nHoldings: The Manuscript Division's holdings, more than fifty million items in eleven thousand separate collections, include some of the greatest manuscript treasures of American history and culture and support scholarly research in many aspects of political, cultural, and scientific history." } ], - "notes": [], "seeAlso": [] } ] From d8006e0af2f5a330840551d130691a8b8effb988 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 24 Jul 2024 15:56:03 -0400 Subject: [PATCH 097/158] RERO ILS: Handle authorized_access_point + edge cases https://forums.zotero.org/discussion/116276/rero-ils-translator-broken --- Library Catalog (RERO ILS).js | 66 +++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 7 deletions(-) diff --git a/Library Catalog (RERO ILS).js b/Library Catalog (RERO ILS).js index 3ac9d7086d7..e496cebd48f 100644 --- a/Library Catalog (RERO ILS).js +++ b/Library Catalog (RERO ILS).js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-08-17 15:05:49" + "lastUpdated": "2024-07-24 20:02:01" } /* @@ -157,29 +157,29 @@ async function scrape([domain, id]) { for (let creator of json.contribution) { let metadata; if (creator.agent) { - if (creator.agent.preferred_name) { + if (creator.agent.preferred_name || creator.agent.authorized_access_point) { metadata = creator.agent; } - else { + else if (creator.agent.$ref) { metadata = (await requestJSON(creator.agent.$ref)).metadata; } } else if (creator.entity) { - if (creator.entity.preferred_name) { + if (creator.entity.preferred_name || creator.entity.authorized_access_point) { metadata = creator.entity; } - else { + else if (creator.entity.$ref) { metadata = (await requestJSON(creator.entity.$ref)).metadata; } } - else { + if (!metadata) { Zotero.debug('Invalid creator'); Zotero.debug(creator); continue; } let type = CREATOR_MAPPING[creator.role[0]] || 'author'; if (type === 'SKIP') continue; - let name = metadata.preferred_name; + let name = metadata.preferred_name || metadata.authorized_access_point; if (metadata.type == 'bf:Organisation') { item.creators.push({ lastName: name, @@ -194,6 +194,12 @@ async function scrape([domain, id]) { if (item.creators.every(c => c.creatorType == 'contributor')) { for (let creator of item.creators) { + // If everyone is a contributor, make them authors, besides + // institutional contributors on multi-author works + // (This is a rough heuristic) + if (creator.fieldMode === 1 && item.creators.length > 1) { + continue; + } creator.creatorType = 'author'; } } @@ -697,6 +703,52 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://bib.rero.ch/rbnj/documents/828338", + "items": [ + { + "itemType": "book", + "title": "Eseoj memore al Ivo Lapenna", + "creators": [ + { + "firstName": "Ivo", + "lastName": "Lapenna", + "creatorType": "author" + }, + { + "firstName": "Carlo", + "lastName": "Minnaja", + "creatorType": "author" + }, + { + "lastName": "Internacia scienca instituto Ivo Lapenna", + "creatorType": "contributor", + "fieldMode": 1 + } + ], + "date": "2001", + "ISBN": "9788787089098", + "callNumber": "R004666230", + "language": "epo", + "libraryCatalog": "Library Catalog (RERO ILS)", + "numPages": "417", + "place": "Kopenhago?", + "publisher": "T. Kehlet", + "attachments": [], + "tags": [], + "notes": [ + { + "note": "ill., portr." + }, + { + "note": "1 CD-ROM" + } + ], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 6aa0d2f3bfd583b86097022a665a9f74a3a887e1 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 30 Jul 2024 01:20:42 -0400 Subject: [PATCH 098/158] ACM: Fix PDF downloads Closes #3348 --- ACM Digital Library.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ACM Digital Library.js b/ACM Digital Library.js index 8920772c02c..dea6d238ac4 100644 --- a/ACM Digital Library.js +++ b/ACM Digital Library.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-03-16 04:39:27" + "lastUpdated": "2024-07-30 05:19:59" } /* @@ -167,7 +167,7 @@ function scrape(doc) { item.abstractNote = ZU.trimInternal(abstract); } - let pdfElement = doc.querySelector('a[title=PDF]'); + let pdfElement = doc.querySelector('a[title="View PDF"]'); if (pdfElement) { item.attachments.push({ url: pdfElement.href, From f8f32777889511bb47303a32d9f9376e64c969b1 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Tue, 30 Jul 2024 16:48:21 +0200 Subject: [PATCH 099/158] Add OpenAlex web and JSON translator (#3269) Co-authored-by: Abe Jellinek --- .../lib/rules/test-cases.js | 2 +- OpenAlex JSON.js | 740 ++++++++++++++++++ OpenAlex.js | 444 +++++++++++ 3 files changed, 1185 insertions(+), 1 deletion(-) create mode 100644 OpenAlex JSON.js create mode 100644 OpenAlex.js diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js b/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js index 9e55111787b..424c514ac34 100644 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js @@ -113,7 +113,7 @@ module.exports = { }); } else if (testCase.type === 'search') { - const expected = ['DOI', 'ISBN', 'PMID', 'identifiers', 'contextObject', 'adsBibcode', 'ericNumber']; + const expected = ['DOI', 'ISBN', 'PMID', 'identifiers', 'contextObject', 'adsBibcode', 'ericNumber', 'openAlex']; const keys = Array.isArray(testCase.input) ? testCase.input.flatMap(Object.keys) : Object.keys(testCase.input); if (!keys.every(key => expected.includes(key))) { diff --git a/OpenAlex JSON.js b/OpenAlex JSON.js new file mode 100644 index 00000000000..e4a8d28f21e --- /dev/null +++ b/OpenAlex JSON.js @@ -0,0 +1,740 @@ +{ + "translatorID": "faa53754-fb55-4658-9094-ae8a7e0409a2", + "label": "OpenAlex JSON", + "creator": "Sebastian Karcher", + "target": "json", + "minVersion": "5.0", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 1, + "lastUpdated": "2024-07-29 14:16:09" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 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 ***** +*/ + +// 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 + // 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) { + Zotero.debug(e); + return false; + } +} + +function detectImport() { + var parsedData = parseInput(); + // Z.debug(parsedData.ids) + if (parsedData && parsedData.ids && parsedData.ids.openalex) { + return true; + } + else if (parsedData && parsedData.results && parsedData.results[0].ids && parsedData.results[0].ids.openalex) { + return true; + } + return false; +} + +/* eslint-disable camelcase*/ +var PDFversionMap = { + submittedVersion: "Submitted Version PDF", + acceptedVersion: "Accepted Version PDF", + publishedVersion: "Full Text PDF" +}; +/* eslint-disable camelcase*/ +/* https://docs.openalex.org/api-entities/works/work-object#type */ +var mappingTypes = { + article: "journalArticle", + book: "book", + "book-chapter": "bookSection", + dissertation: "thesis", + other: "document", + report: "report", + paratext: "document", + dataset: "dataset", + "reference-entry": "encyclopediaArticle", + standard: "standard", + editorial: "journalArticle", + letter: "journalArticle", + "peer-review": "document", // up for debate + erratum: "journalArticle", + grant: "manuscript", // up for debate + preprint: "preprint", + review: "journalArticle", + libguides: "encyclopediaArticle", + "supplementary-materials": "journalArticle", + retraction: "journalArticle", +}; + +function doImport() { + var data = parseInput(); + if (data.ids) { + parseIndividual(data); + } + else { + let results = data.results; + for (let result of results) { + parseIndividual(result); + } + } +} + +function parseIndividual(data) { + let OAtype = data.type; + // Z.debug(OAtype) + let type = mappingTypes[OAtype] || "document"; + var item = new Zotero.Item(type); + item.title = data.title; + // fix all caps titles + if (item.title == item.title.toUpperCase()) { + item.title = ZU.capitalizeTitle(item.title, true); + } + item.date = data.publication_date; + item.language = data.language; + if (data.doi) { + item.DOI = ZU.cleanDOI(data.doi); + } + if (data.primary_location.source) { + let sourceName = data.primary_location.source.display_name; + if (item.itemType == "thesis" || item.itemType == "dataset") { + item.publisher = sourceName; + } + else if (item.itemType == "book") { + item.publisher = data.primary_location.source.host_organization_name; + } + else { + item.publicationTitle = sourceName; + item.publisher = data.primary_location.source.host_organization_name; + } + if (typeof data.primary_location.source.issn === 'string') { + item.ISSN = data.primary_location.source.issn; + } + else if (Array.isArray(data.primary_location.source.issn)) { + item.ISSN = data.primary_location.source.issn[0]; + } + if (data.primary_location.source.type == "journal") { + Zotero.debug(`Item type was ${item.itemType} -- changing to journalArticle because source.type == 'journal'`); + item.itemType = "journalArticle"; + } + else if (data.primary_location.source.type == "conference") { + Zotero.debug(`Item type was ${item.itemType} -- changing to conferencePaper because source.type == 'conference'`); + item.itemType = "conferencePaper"; + } + if (data.primary_location.version == "submittedVersion") { + Zotero.debug(`Item type was ${item.itemType} -- changing to preprint because version == 'submittedVersion'`); + item.itemType = "preprint"; + } + } + + + let biblio = data.biblio; + item.issue = biblio.issue; + item.volume = biblio.volume; + if (biblio.first_page && biblio.last_page && biblio.first_page != biblio.last_page) { + item.pages = biblio.first_page + "-" + biblio.last_page; + } + else if (biblio.first_page) { + item.pages = biblio.first_page; + } + + + let authors = data.authorships; + for (let author of authors) { + let authorName = author.author.display_name; + item.creators.push(ZU.cleanAuthor(authorName, "author", false)); + } + if (item.itemType == "thesis" && !item.publisher & authors.length) { + // use author affiliation as university + item.university = authors[0].raw_affiliation_string; + } + + if (data.best_oa_location && data.best_oa_location.pdf_url) { + let version = "Submitted Version PDF"; + if (data.best_oa_location.version) { + version = PDFversionMap[data.best_oa_location.version]; + } + item.attachments.push({ url: data.best_oa_location.pdf_url, title: version, mimeType: "application/pdf" }); + } + let tags = data.keywords; + for (let tag of tags) { + item.tags.push(tag.display_name || tag.keyword); + } + item.extra = "OpenAlex: " + data.ids.openalex; + item.complete(); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "import", + "input": "{\r\n \"id\": \"https://openalex.org/W2099326003\",\r\n \"doi\": \"https://doi.org/10.2307/1885099\",\r\n \"title\": \"Labor Contracts as Partial Gift Exchange\",\r\n \"display_name\": \"Labor Contracts as Partial Gift Exchange\",\r\n \"publication_year\": 1982,\r\n \"publication_date\": \"1982-11-01\",\r\n \"ids\": {\r\n \"openalex\": \"https://openalex.org/W2099326003\",\r\n \"doi\": \"https://doi.org/10.2307/1885099\",\r\n \"mag\": \"2099326003\"\r\n },\r\n \"language\": \"en\",\r\n \"primary_location\": {\r\n \"is_oa\": false,\r\n \"landing_page_url\": \"https://doi.org/10.2307/1885099\",\r\n \"pdf_url\": null,\r\n \"source\": {\r\n \"id\": \"https://openalex.org/S203860005\",\r\n \"display_name\": \"The Quarterly Journal of Economics\",\r\n \"issn_l\": \"0033-5533\",\r\n \"issn\": [\r\n \"0033-5533\",\r\n \"1531-4650\"\r\n ],\r\n \"is_oa\": false,\r\n \"is_in_doaj\": false,\r\n \"host_organization\": \"https://openalex.org/P4310311648\",\r\n \"host_organization_name\": \"Oxford University Press\",\r\n \"host_organization_lineage\": [\r\n \"https://openalex.org/P4310311647\",\r\n \"https://openalex.org/P4310311648\"\r\n ],\r\n \"host_organization_lineage_names\": [\r\n \"University of Oxford\",\r\n \"Oxford University Press\"\r\n ],\r\n \"type\": \"journal\"\r\n },\r\n \"license\": null,\r\n \"version\": null,\r\n \"is_accepted\": false,\r\n \"is_published\": false\r\n },\r\n \"type\": \"article\",\r\n \"type_crossref\": \"journal-article\",\r\n \"indexed_in\": [\r\n \"crossref\"\r\n ],\r\n \"open_access\": {\r\n \"is_oa\": false,\r\n \"oa_status\": \"closed\",\r\n \"oa_url\": null,\r\n \"any_repository_has_fulltext\": false\r\n },\r\n \"authorships\": [\r\n {\r\n \"author_position\": \"first\",\r\n \"author\": {\r\n \"id\": \"https://openalex.org/A5081873388\",\r\n \"display_name\": \"George A. Akerlof\",\r\n \"orcid\": null\r\n },\r\n \"institutions\": [\r\n {\r\n \"id\": \"https://openalex.org/I95457486\",\r\n \"display_name\": \"University of California, Berkeley\",\r\n \"ror\": \"https://ror.org/01an7q238\",\r\n \"country_code\": \"US\",\r\n \"type\": \"education\",\r\n \"lineage\": [\r\n \"https://openalex.org/I2803209242\",\r\n \"https://openalex.org/I95457486\"\r\n ]\r\n }\r\n ],\r\n \"countries\": [\r\n \"US\"\r\n ],\r\n \"is_corresponding\": true,\r\n \"raw_author_name\": \"George A. Akerlof\",\r\n \"raw_affiliation_string\": \"University of California, Berkeley\",\r\n \"raw_affiliation_strings\": [\r\n \"University of California, Berkeley\"\r\n ]\r\n }\r\n ],\r\n \"countries_distinct_count\": 1,\r\n \"institutions_distinct_count\": 1,\r\n \"corresponding_author_ids\": [\r\n \"https://openalex.org/A5081873388\"\r\n ],\r\n \"corresponding_institution_ids\": [\r\n \"https://openalex.org/I95457486\"\r\n ],\r\n \"apc_list\": {\r\n \"value\": 6977,\r\n \"currency\": \"USD\",\r\n \"value_usd\": 6977,\r\n \"provenance\": \"doaj\"\r\n },\r\n \"apc_paid\": {\r\n \"value\": 6977,\r\n \"currency\": \"USD\",\r\n \"value_usd\": 6977,\r\n \"provenance\": \"doaj\"\r\n },\r\n \"has_fulltext\": true,\r\n \"fulltext_origin\": \"ngrams\",\r\n \"cited_by_count\": 2786,\r\n \"cited_by_percentile_year\": {\r\n \"min\": 99,\r\n \"max\": 100\r\n },\r\n \"biblio\": {\r\n \"volume\": \"97\",\r\n \"issue\": \"4\",\r\n \"first_page\": \"543\",\r\n \"last_page\": \"543\"\r\n },\r\n \"is_retracted\": false,\r\n \"is_paratext\": false,\r\n \"primary_topic\": {\r\n \"id\": \"https://openalex.org/T10208\",\r\n \"display_name\": \"Labor Market Dynamics and Inequality\",\r\n \"score\": 0.9877,\r\n \"subfield\": {\r\n \"id\": \"https://openalex.org/subfields/2002\",\r\n \"display_name\": \"Economics and Econometrics\"\r\n },\r\n \"field\": {\r\n \"id\": \"https://openalex.org/fields/20\",\r\n \"display_name\": \"Economics, Econometrics and Finance\"\r\n },\r\n \"domain\": {\r\n \"id\": \"https://openalex.org/domains/2\",\r\n \"display_name\": \"Social Sciences\"\r\n }\r\n },\r\n \"topics\": [\r\n {\r\n \"id\": \"https://openalex.org/T10208\",\r\n \"display_name\": \"Labor Market Dynamics and Inequality\",\r\n \"score\": 0.9877,\r\n \"subfield\": {\r\n \"id\": \"https://openalex.org/subfields/2002\",\r\n \"display_name\": \"Economics and Econometrics\"\r\n },\r\n \"field\": {\r\n \"id\": \"https://openalex.org/fields/20\",\r\n \"display_name\": \"Economics, Econometrics and Finance\"\r\n },\r\n \"domain\": {\r\n \"id\": \"https://openalex.org/domains/2\",\r\n \"display_name\": \"Social Sciences\"\r\n }\r\n },\r\n {\r\n \"id\": \"https://openalex.org/T12137\",\r\n \"display_name\": \"Existence and Dynamics of Monetary Equilibrium Models\",\r\n \"score\": 0.9857,\r\n \"subfield\": {\r\n \"id\": \"https://openalex.org/subfields/2002\",\r\n \"display_name\": \"Economics and Econometrics\"\r\n },\r\n \"field\": {\r\n \"id\": \"https://openalex.org/fields/20\",\r\n \"display_name\": \"Economics, Econometrics and Finance\"\r\n },\r\n \"domain\": {\r\n \"id\": \"https://openalex.org/domains/2\",\r\n \"display_name\": \"Social Sciences\"\r\n }\r\n },\r\n {\r\n \"id\": \"https://openalex.org/T11743\",\r\n \"display_name\": \"Critique of Political Economy and Capitalist Development\",\r\n \"score\": 0.9847,\r\n \"subfield\": {\r\n \"id\": \"https://openalex.org/subfields/3312\",\r\n \"display_name\": \"Sociology and Political Science\"\r\n },\r\n \"field\": {\r\n \"id\": \"https://openalex.org/fields/33\",\r\n \"display_name\": \"Social Sciences\"\r\n },\r\n \"domain\": {\r\n \"id\": \"https://openalex.org/domains/2\",\r\n \"display_name\": \"Social Sciences\"\r\n }\r\n }\r\n ],\r\n \"keywords\": [\r\n {\r\n \"keyword\": \"labor\",\r\n \"score\": 0.4433\r\n },\r\n {\r\n \"keyword\": \"exchange\",\r\n \"score\": 0.4299\r\n },\r\n {\r\n \"keyword\": \"gift\",\r\n \"score\": 0.4135\r\n }\r\n ],\r\n \"concepts\": [\r\n {\r\n \"id\": \"https://openalex.org/C134697681\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q1609677\",\r\n \"display_name\": \"Clearing\",\r\n \"level\": 2,\r\n \"score\": 0.81496704\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C162324750\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q8134\",\r\n \"display_name\": \"Economics\",\r\n \"level\": 0,\r\n \"score\": 0.7709161\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C2777388388\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q6821213\",\r\n \"display_name\": \"Wage\",\r\n \"level\": 2,\r\n \"score\": 0.7343378\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C145236788\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q28161\",\r\n \"display_name\": \"Labour economics\",\r\n \"level\": 1,\r\n \"score\": 0.72396404\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C14981831\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q1713661\",\r\n \"display_name\": \"Market clearing\",\r\n \"level\": 2,\r\n \"score\": 0.70149326\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C2778126366\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q41171\",\r\n \"display_name\": \"Unemployment\",\r\n \"level\": 2,\r\n \"score\": 0.6718695\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C2776544115\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q17058676\",\r\n \"display_name\": \"Involuntary unemployment\",\r\n \"level\": 3,\r\n \"score\": 0.6377661\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C182306322\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q1779371\",\r\n \"display_name\": \"Order (exchange)\",\r\n \"level\": 2,\r\n \"score\": 0.59540087\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C6968784\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q1193835\",\r\n \"display_name\": \"Efficiency wage\",\r\n \"level\": 3,\r\n \"score\": 0.53425324\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C994546\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q207449\",\r\n \"display_name\": \"Division of labour\",\r\n \"level\": 2,\r\n \"score\": 0.43008915\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C182095102\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q6007285\",\r\n \"display_name\": \"Implicit contract theory\",\r\n \"level\": 3,\r\n \"score\": 0.42236993\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C18762648\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q42213\",\r\n \"display_name\": \"Work (physics)\",\r\n \"level\": 2,\r\n \"score\": 0.41878027\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C175444787\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q39072\",\r\n \"display_name\": \"Microeconomics\",\r\n \"level\": 1,\r\n \"score\": 0.30064553\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C80984254\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q608190\",\r\n \"display_name\": \"Labor relations\",\r\n \"level\": 2,\r\n \"score\": 0.22578001\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C34447519\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q179522\",\r\n \"display_name\": \"Market economy\",\r\n \"level\": 1,\r\n \"score\": 0.18438369\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C139719470\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q39680\",\r\n \"display_name\": \"Macroeconomics\",\r\n \"level\": 1,\r\n \"score\": 0.08346212\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C78519656\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q101333\",\r\n \"display_name\": \"Mechanical engineering\",\r\n \"level\": 1,\r\n \"score\": 0\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C10138342\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q43015\",\r\n \"display_name\": \"Finance\",\r\n \"level\": 1,\r\n \"score\": 0\r\n },\r\n {\r\n \"id\": \"https://openalex.org/C127413603\",\r\n \"wikidata\": \"https://www.wikidata.org/wiki/Q11023\",\r\n \"display_name\": \"Engineering\",\r\n \"level\": 0,\r\n \"score\": 0\r\n }\r\n ],\r\n \"mesh\": [],\r\n \"locations_count\": 1,\r\n \"locations\": [\r\n {\r\n \"is_oa\": false,\r\n \"landing_page_url\": \"https://doi.org/10.2307/1885099\",\r\n \"pdf_url\": null,\r\n \"source\": {\r\n \"id\": \"https://openalex.org/S203860005\",\r\n \"display_name\": \"The Quarterly Journal of Economics\",\r\n \"issn_l\": \"0033-5533\",\r\n \"issn\": [\r\n \"0033-5533\",\r\n \"1531-4650\"\r\n ],\r\n \"is_oa\": false,\r\n \"is_in_doaj\": false,\r\n \"host_organization\": \"https://openalex.org/P4310311648\",\r\n \"host_organization_name\": \"Oxford University Press\",\r\n \"host_organization_lineage\": [\r\n \"https://openalex.org/P4310311647\",\r\n \"https://openalex.org/P4310311648\"\r\n ],\r\n \"host_organization_lineage_names\": [\r\n \"University of Oxford\",\r\n \"Oxford University Press\"\r\n ],\r\n \"type\": \"journal\"\r\n },\r\n \"license\": null,\r\n \"version\": null,\r\n \"is_accepted\": false,\r\n \"is_published\": false\r\n }\r\n ],\r\n \"best_oa_location\": null,\r\n \"sustainable_development_goals\": [\r\n {\r\n \"id\": \"https://metadata.un.org/sdg/8\",\r\n \"score\": 0.77,\r\n \"display_name\": \"Decent work and economic growth\"\r\n }\r\n ],\r\n \"grants\": [],\r\n \"referenced_works_count\": 20,\r\n \"referenced_works\": [\r\n \"https://openalex.org/W1480035415\",\r\n \"https://openalex.org/W1502717336\",\r\n \"https://openalex.org/W1516136238\",\r\n \"https://openalex.org/W1739556303\",\r\n \"https://openalex.org/W1990700960\",\r\n \"https://openalex.org/W2035384243\",\r\n \"https://openalex.org/W2061276533\",\r\n \"https://openalex.org/W2068723801\",\r\n \"https://openalex.org/W2074308844\",\r\n \"https://openalex.org/W2086436931\",\r\n \"https://openalex.org/W2088972693\",\r\n \"https://openalex.org/W2117172030\",\r\n \"https://openalex.org/W2148539013\",\r\n \"https://openalex.org/W2157300266\",\r\n \"https://openalex.org/W2162994934\",\r\n \"https://openalex.org/W2166184809\",\r\n \"https://openalex.org/W2332585815\",\r\n \"https://openalex.org/W2512666569\",\r\n \"https://openalex.org/W2796935577\",\r\n \"https://openalex.org/W3023342100\"\r\n ],\r\n \"related_works\": [\r\n \"https://openalex.org/W3181694214\",\r\n \"https://openalex.org/W2495368365\",\r\n \"https://openalex.org/W1491227498\",\r\n \"https://openalex.org/W2099326003\",\r\n \"https://openalex.org/W2090028775\",\r\n \"https://openalex.org/W2083061677\",\r\n \"https://openalex.org/W2127336856\",\r\n \"https://openalex.org/W3124441914\",\r\n \"https://openalex.org/W1592829115\",\r\n \"https://openalex.org/W3124968136\"\r\n ],\r\n \"ngrams_url\": \"https://api.openalex.org/works/W2099326003/ngrams\",\r\n \"abstract_inverted_index\": {\r\n \"This\": [\r\n 0\r\n ],\r\n \"paper\": [\r\n 1,\r\n 64\r\n ],\r\n \"explains\": [\r\n 2\r\n ],\r\n \"involuntary\": [\r\n 3\r\n ],\r\n \"unemployment\": [\r\n 4\r\n ],\r\n \"in\": [\r\n 5\r\n ],\r\n \"terms\": [\r\n 6\r\n ],\r\n \"of\": [\r\n 7,\r\n 10,\r\n 71\r\n ],\r\n \"the\": [\r\n 8,\r\n 20,\r\n 38,\r\n 47,\r\n 57\r\n ],\r\n \"response\": [\r\n 9\r\n ],\r\n \"firms\": [\r\n 11,\r\n 33\r\n ],\r\n \"to\": [\r\n 12,\r\n 29\r\n ],\r\n \"workers'\": [\r\n 13\r\n ],\r\n \"group\": [\r\n 14\r\n ],\r\n \"behavior.\": [\r\n 15\r\n ],\r\n \"Workers'\": [\r\n 16\r\n ],\r\n \"effort\": [\r\n 17\r\n ],\r\n \"depends\": [\r\n 18\r\n ],\r\n \"upon\": [\r\n 19\r\n ],\r\n \"norms\": [\r\n 21\r\n ],\r\n \"determining\": [\r\n 22\r\n ],\r\n \"a\": [\r\n 23,\r\n 67\r\n ],\r\n \"fair\": [\r\n 24\r\n ],\r\n \"day's\": [\r\n 25\r\n ],\r\n \"work.\": [\r\n 26\r\n ],\r\n \"In\": [\r\n 27\r\n ],\r\n \"order\": [\r\n 28\r\n ],\r\n \"affect\": [\r\n 30\r\n ],\r\n \"those\": [\r\n 31,\r\n 53\r\n ],\r\n \"norms,\": [\r\n 32\r\n ],\r\n \"may\": [\r\n 34\r\n ],\r\n \"pay\": [\r\n 35,\r\n 43,\r\n 55\r\n ],\r\n \"more\": [\r\n 36,\r\n 45\r\n ],\r\n \"than\": [\r\n 37,\r\n 46\r\n ],\r\n \"market-clearing\": [\r\n 39,\r\n 48,\r\n 58\r\n ],\r\n \"wage.\": [\r\n 40\r\n ],\r\n \"Industries\": [\r\n 41\r\n ],\r\n \"that\": [\r\n 42,\r\n 54\r\n ],\r\n \"consistently\": [\r\n 44\r\n ],\r\n \"wage\": [\r\n 49,\r\n 59\r\n ],\r\n \"are\": [\r\n 50,\r\n 60\r\n ],\r\n \"primary,\": [\r\n 51\r\n ],\r\n \"and\": [\r\n 52,\r\n 76\r\n ],\r\n \"only\": [\r\n 56\r\n ],\r\n \"secondary.\": [\r\n 61,\r\n 77\r\n ],\r\n \"Thus,\": [\r\n 62\r\n ],\r\n \"this\": [\r\n 63\r\n ],\r\n \"also\": [\r\n 65\r\n ],\r\n \"gives\": [\r\n 66\r\n ],\r\n \"theory\": [\r\n 68\r\n ],\r\n \"for\": [\r\n 69\r\n ],\r\n \"division\": [\r\n 70\r\n ],\r\n \"labor\": [\r\n 72\r\n ],\r\n \"markets\": [\r\n 73\r\n ],\r\n \"between\": [\r\n 74\r\n ],\r\n \"primary\": [\r\n 75\r\n ]\r\n },\r\n \"cited_by_api_url\": \"https://api.openalex.org/works?filter=cites:W2099326003\",\r\n \"counts_by_year\": [\r\n {\r\n \"year\": 2024,\r\n \"cited_by_count\": 5\r\n },\r\n {\r\n \"year\": 2023,\r\n \"cited_by_count\": 76\r\n },\r\n {\r\n \"year\": 2022,\r\n \"cited_by_count\": 75\r\n },\r\n {\r\n \"year\": 2021,\r\n \"cited_by_count\": 74\r\n },\r\n {\r\n \"year\": 2020,\r\n \"cited_by_count\": 98\r\n },\r\n {\r\n \"year\": 2019,\r\n \"cited_by_count\": 109\r\n },\r\n {\r\n \"year\": 2018,\r\n \"cited_by_count\": 96\r\n },\r\n {\r\n \"year\": 2017,\r\n \"cited_by_count\": 100\r\n },\r\n {\r\n \"year\": 2016,\r\n \"cited_by_count\": 108\r\n },\r\n {\r\n \"year\": 2015,\r\n \"cited_by_count\": 121\r\n },\r\n {\r\n \"year\": 2014,\r\n \"cited_by_count\": 133\r\n },\r\n {\r\n \"year\": 2013,\r\n \"cited_by_count\": 121\r\n },\r\n {\r\n \"year\": 2012,\r\n \"cited_by_count\": 131\r\n }\r\n ],\r\n \"updated_date\": \"2024-02-22T15:54:42.549913\",\r\n \"created_date\": \"2016-06-24\"\r\n}", + "items": [ + { + "itemType": "journalArticle", + "title": "Labor Contracts as Partial Gift Exchange", + "creators": [ + { + "firstName": "George A.", + "lastName": "Akerlof", + "creatorType": "author" + } + ], + "date": "1982-11-01", + "DOI": "10.2307/1885099", + "ISSN": "0033-5533", + "extra": "OpenAlex: https://openalex.org/W2099326003", + "issue": "4", + "language": "en", + "pages": "543", + "publicationTitle": "The Quarterly Journal of Economics", + "volume": "97", + "attachments": [], + "tags": [ + { + "tag": "exchange" + }, + { + "tag": "gift" + }, + { + "tag": "labor" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "import", + "input": "{\"id\":\"https://openalex.org/W3123223998\",\"doi\":\"https://doi.org/10.1257/0002828042002561\",\"title\":\"Are Emily and Greg More Employable Than Lakisha and Jamal? A Field Experiment on Labor Market Discrimination\",\"display_name\":\"Are Emily and Greg More Employable Than Lakisha and Jamal? A Field Experiment on Labor Market Discrimination\",\"publication_year\":2004,\"publication_date\":\"2004-09-01\",\"ids\":{\"openalex\":\"https://openalex.org/W3123223998\",\"doi\":\"https://doi.org/10.1257/0002828042002561\",\"mag\":\"3123223998\"},\"language\":\"en\",\"primary_location\":{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.1257/0002828042002561\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S23254222\",\"display_name\":\"The American Economic Review\",\"issn_l\":\"0002-8282\",\"issn\":[\"1944-7981\",\"0002-8282\"],\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310315912\",\"host_organization_name\":\"American Economic Association\",\"host_organization_lineage\":[\"https://openalex.org/P4310315912\"],\"host_organization_lineage_names\":[\"American Economic Association\"],\"type\":\"journal\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false},\"type\":\"article\",\"type_crossref\":\"journal-article\",\"indexed_in\":[\"crossref\"],\"open_access\":{\"is_oa\":true,\"oa_status\":\"green\",\"oa_url\":\"http://papers.nber.org/papers/w9873.pdf\",\"any_repository_has_fulltext\":true},\"authorships\":[{\"author_position\":\"first\",\"author\":{\"id\":\"https://openalex.org/A5002563734\",\"display_name\":\"Marianne Bertrand\",\"orcid\":null},\"institutions\":[{\"id\":\"https://openalex.org/I40347166\",\"display_name\":\"University of Chicago\",\"ror\":\"https://ror.org/024mw5h28\",\"country_code\":\"US\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I40347166\"]}],\"countries\":[\"US\"],\"is_corresponding\":false,\"raw_author_name\":\"Marianne Bertrand\",\"raw_affiliation_string\":\"University of Chicago ( )\",\"raw_affiliation_strings\":[\"University of Chicago ( )\"]},{\"author_position\":\"last\",\"author\":{\"id\":\"https://openalex.org/A5034703281\",\"display_name\":\"Sendhil Mullainathan\",\"orcid\":\"https://orcid.org/0000-0001-8508-4052\"},\"institutions\":[{\"id\":\"https://openalex.org/I63966007\",\"display_name\":\"Massachusetts Institute of Technology\",\"ror\":\"https://ror.org/042nb2s44\",\"country_code\":\"US\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I63966007\"]}],\"countries\":[\"US\"],\"is_corresponding\":false,\"raw_author_name\":\"Sendhil Mullainathan\",\"raw_affiliation_string\":\"Massachusetts Institute Of Technology#TAB#\",\"raw_affiliation_strings\":[\"Massachusetts Institute Of Technology#TAB#\"]}],\"countries_distinct_count\":1,\"institutions_distinct_count\":2,\"corresponding_author_ids\":[],\"corresponding_institution_ids\":[],\"apc_list\":null,\"apc_paid\":null,\"has_fulltext\":false,\"cited_by_count\":3465,\"cited_by_percentile_year\":{\"min\":99,\"max\":100},\"biblio\":{\"volume\":\"94\",\"issue\":\"4\",\"first_page\":\"991\",\"last_page\":\"1013\"},\"is_retracted\":false,\"is_paratext\":false,\"primary_topic\":{\"id\":\"https://openalex.org/T12970\",\"display_name\":\"Labor Market Discrimination and Inequality in Employment\",\"score\":1.0,\"subfield\":{\"id\":\"3312\",\"display_name\":\"Sociology and Political Science\"},\"field\":{\"id\":\"33\",\"display_name\":\"Social Sciences\"},\"domain\":{\"id\":\"2\",\"display_name\":\"Social Sciences\"}},\"topics\":[{\"id\":\"https://openalex.org/T12970\",\"display_name\":\"Labor Market Discrimination and Inequality in Employment\",\"score\":1.0,\"subfield\":{\"id\":\"3312\",\"display_name\":\"Sociology and Political Science\"},\"field\":{\"id\":\"33\",\"display_name\":\"Social Sciences\"},\"domain\":{\"id\":\"2\",\"display_name\":\"Social Sciences\"}},{\"id\":\"https://openalex.org/T14006\",\"display_name\":\"Linguistic Borrowing and Language Contact Phenomena\",\"score\":0.9506,\"subfield\":{\"id\":\"1203\",\"display_name\":\"Language and Linguistics\"},\"field\":{\"id\":\"12\",\"display_name\":\"Arts and Humanities\"},\"domain\":{\"id\":\"2\",\"display_name\":\"Social Sciences\"}},{\"id\":\"https://openalex.org/T12380\",\"display_name\":\"Authorship Attribution and User Profiling in Text\",\"score\":0.9505,\"subfield\":{\"id\":\"1702\",\"display_name\":\"Artificial Intelligence\"},\"field\":{\"id\":\"17\",\"display_name\":\"Computer Science\"},\"domain\":{\"id\":\"3\",\"display_name\":\"Physical Sciences\"}}],\"keywords\":[{\"keyword\":\"labor market discrimination\",\"score\":0.6636},{\"keyword\":\"emily\",\"score\":0.3282}],\"concepts\":[{\"id\":\"https://openalex.org/C204495577\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1205349\",\"display_name\":\"Callback\",\"level\":2,\"score\":0.83815134},{\"id\":\"https://openalex.org/C201280247\",\"wikidata\":\"https://www.wikidata.org/wiki/Q11032\",\"display_name\":\"Newspaper\",\"level\":2,\"score\":0.8025631},{\"id\":\"https://openalex.org/C76509639\",\"wikidata\":\"https://www.wikidata.org/wiki/Q918036\",\"display_name\":\"Race (biology)\",\"level\":2,\"score\":0.71496654},{\"id\":\"https://openalex.org/C56273599\",\"wikidata\":\"https://www.wikidata.org/wiki/Q3122841\",\"display_name\":\"White (mutation)\",\"level\":3,\"score\":0.6915195},{\"id\":\"https://openalex.org/C112698675\",\"wikidata\":\"https://www.wikidata.org/wiki/Q37038\",\"display_name\":\"Advertising\",\"level\":1,\"score\":0.49600014},{\"id\":\"https://openalex.org/C2987028688\",\"wikidata\":\"https://www.wikidata.org/wiki/Q49085\",\"display_name\":\"African american\",\"level\":2,\"score\":0.46188635},{\"id\":\"https://openalex.org/C2779530757\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1207505\",\"display_name\":\"Quality (philosophy)\",\"level\":2,\"score\":0.41410452},{\"id\":\"https://openalex.org/C145236788\",\"wikidata\":\"https://www.wikidata.org/wiki/Q28161\",\"display_name\":\"Labour economics\",\"level\":1,\"score\":0.4028681},{\"id\":\"https://openalex.org/C162324750\",\"wikidata\":\"https://www.wikidata.org/wiki/Q8134\",\"display_name\":\"Economics\",\"level\":0,\"score\":0.35625333},{\"id\":\"https://openalex.org/C144024400\",\"wikidata\":\"https://www.wikidata.org/wiki/Q21201\",\"display_name\":\"Sociology\",\"level\":0,\"score\":0.30022982},{\"id\":\"https://openalex.org/C144133560\",\"wikidata\":\"https://www.wikidata.org/wiki/Q4830453\",\"display_name\":\"Business\",\"level\":0,\"score\":0.28154504},{\"id\":\"https://openalex.org/C107993555\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1662673\",\"display_name\":\"Gender studies\",\"level\":1,\"score\":0.18850306},{\"id\":\"https://openalex.org/C41008148\",\"wikidata\":\"https://www.wikidata.org/wiki/Q21198\",\"display_name\":\"Computer science\",\"level\":0,\"score\":0.09495148},{\"id\":\"https://openalex.org/C55493867\",\"wikidata\":\"https://www.wikidata.org/wiki/Q7094\",\"display_name\":\"Biochemistry\",\"level\":1,\"score\":0.0},{\"id\":\"https://openalex.org/C185592680\",\"wikidata\":\"https://www.wikidata.org/wiki/Q2329\",\"display_name\":\"Chemistry\",\"level\":0,\"score\":0.0},{\"id\":\"https://openalex.org/C2549261\",\"wikidata\":\"https://www.wikidata.org/wiki/Q43455\",\"display_name\":\"Ethnology\",\"level\":1,\"score\":0.0},{\"id\":\"https://openalex.org/C138885662\",\"wikidata\":\"https://www.wikidata.org/wiki/Q5891\",\"display_name\":\"Philosophy\",\"level\":0,\"score\":0.0},{\"id\":\"https://openalex.org/C111472728\",\"wikidata\":\"https://www.wikidata.org/wiki/Q9471\",\"display_name\":\"Epistemology\",\"level\":1,\"score\":0.0},{\"id\":\"https://openalex.org/C104317684\",\"wikidata\":\"https://www.wikidata.org/wiki/Q7187\",\"display_name\":\"Gene\",\"level\":2,\"score\":0.0},{\"id\":\"https://openalex.org/C199360897\",\"wikidata\":\"https://www.wikidata.org/wiki/Q9143\",\"display_name\":\"Programming language\",\"level\":1,\"score\":0.0}],\"mesh\":[],\"locations_count\":5,\"locations\":[{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.1257/0002828042002561\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S23254222\",\"display_name\":\"The American Economic Review\",\"issn_l\":\"0002-8282\",\"issn\":[\"1944-7981\",\"0002-8282\"],\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310315912\",\"host_organization_name\":\"American Economic Association\",\"host_organization_lineage\":[\"https://openalex.org/P4310315912\"],\"host_organization_lineage_names\":[\"American Economic Association\"],\"type\":\"journal\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false},{\"is_oa\":true,\"landing_page_url\":\"http://papers.nber.org/papers/w9873.pdf\",\"pdf_url\":\"http://papers.nber.org/papers/w9873.pdf\",\"source\":{\"id\":\"https://openalex.org/S4308707206\",\"display_name\":\"Library Union Catalog of Bavaria, Berlin and Brandenburg (B3Kat Repository)\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/I157725225\",\"host_organization_name\":\"University of Illinois Urbana-Champaign\",\"host_organization_lineage\":[\"https://openalex.org/I157725225\"],\"host_organization_lineage_names\":[\"University of Illinois Urbana-Champaign\"],\"type\":\"repository\"},\"license\":null,\"version\":\"publishedVersion\",\"is_accepted\":true,\"is_published\":true},{\"is_oa\":true,\"landing_page_url\":\"http://s3.amazonaws.com/fieldexperiments-papers2/papers/00216.pdf\",\"pdf_url\":\"http://s3.amazonaws.com/fieldexperiments-papers2/papers/00216.pdf\",\"source\":{\"id\":\"https://openalex.org/S4306401271\",\"display_name\":\"RePEc: Research Papers in Economics\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/I77793887\",\"host_organization_name\":\"Federal Reserve Bank of St. Louis\",\"host_organization_lineage\":[\"https://openalex.org/I77793887\"],\"host_organization_lineage_names\":[\"Federal Reserve Bank of St. Louis\"],\"type\":\"repository\"},\"license\":null,\"version\":\"publishedVersion\",\"is_accepted\":true,\"is_published\":true},{\"is_oa\":true,\"landing_page_url\":\"http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.841.6374\",\"pdf_url\":\"http://www.nber.org/papers/w9873.pdf\",\"source\":{\"id\":\"https://openalex.org/S4306400349\",\"display_name\":\"CiteSeer X (The Pennsylvania State University)\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/I130769515\",\"host_organization_name\":\"Pennsylvania State University\",\"host_organization_lineage\":[\"https://openalex.org/I130769515\"],\"host_organization_lineage_names\":[\"Pennsylvania State University\"],\"type\":\"repository\"},\"license\":null,\"version\":\"publishedVersion\",\"is_accepted\":true,\"is_published\":true},{\"is_oa\":true,\"landing_page_url\":\"http://hdl.handle.net/1721.1/63261\",\"pdf_url\":\"https://dspace.mit.edu/bitstream/1721.1/63261/1/areemilygregmore00bert.pdf\",\"source\":{\"id\":\"https://openalex.org/S4306400425\",\"display_name\":\"DSpace@MIT (Massachusetts Institute of Technology)\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/I63966007\",\"host_organization_name\":\"Massachusetts Institute of Technology\",\"host_organization_lineage\":[\"https://openalex.org/I63966007\"],\"host_organization_lineage_names\":[\"Massachusetts Institute of Technology\"],\"type\":\"repository\"},\"license\":\"cc-by-nc\",\"version\":\"submittedVersion\",\"is_accepted\":false,\"is_published\":false}],\"best_oa_location\":{\"is_oa\":true,\"landing_page_url\":\"http://papers.nber.org/papers/w9873.pdf\",\"pdf_url\":\"http://papers.nber.org/papers/w9873.pdf\",\"source\":{\"id\":\"https://openalex.org/S4308707206\",\"display_name\":\"Library Union Catalog of Bavaria, Berlin and Brandenburg (B3Kat Repository)\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/I157725225\",\"host_organization_name\":\"University of Illinois Urbana-Champaign\",\"host_organization_lineage\":[\"https://openalex.org/I157725225\"],\"host_organization_lineage_names\":[\"University of Illinois Urbana-Champaign\"],\"type\":\"repository\"},\"license\":null,\"version\":\"publishedVersion\",\"is_accepted\":true,\"is_published\":true},\"sustainable_development_goals\":[],\"grants\":[],\"referenced_works_count\":13,\"referenced_works\":[\"https://openalex.org/W1522598817\",\"https://openalex.org/W1978385790\",\"https://openalex.org/W1991418004\",\"https://openalex.org/W2010532565\",\"https://openalex.org/W2034666618\",\"https://openalex.org/W2067516326\",\"https://openalex.org/W2116190275\",\"https://openalex.org/W2159594033\",\"https://openalex.org/W3122492922\",\"https://openalex.org/W3122889739\",\"https://openalex.org/W3124290904\",\"https://openalex.org/W4240275752\",\"https://openalex.org/W4251381017\"],\"related_works\":[\"https://openalex.org/W2613684332\",\"https://openalex.org/W2283761799\",\"https://openalex.org/W2117563254\",\"https://openalex.org/W2036388380\",\"https://openalex.org/W2369126155\",\"https://openalex.org/W2577299680\",\"https://openalex.org/W2376554757\",\"https://openalex.org/W612150824\",\"https://openalex.org/W2898656313\",\"https://openalex.org/W2126556840\"],\"ngrams_url\":\"https://api.openalex.org/works/W3123223998/ngrams\",\"abstract_inverted_index\":{\"We\":[0,66],\"study\":[1],\"race\":[2,83],\"in\":[3,14,90],\"the\":[4,78,91],\"labor\":[5,93],\"market\":[6],\"by\":[7,82],\"sending\":[8],\"fictitious\":[9],\"resumes\":[10,23],\"to\":[11,45,86],\"help-wanted\":[12],\"ads\":[13],\"Boston\":[15],\"and\":[16,63],\"Chicago\":[17],\"newspapers.\":[18],\"To\":[19],\"manipulate\":[20],\"perceived\":[21],\"race,\":[22],\"are\":[24,41,73],\"randomly\":[25],\"assigned\":[26],\"African-American-\":[27],\"or\":[28],\"White-sounding\":[29],\"names.\":[30,79],\"White\":[31,49],\"names\":[32,50],\"receive\":[33],\"50\":[34],\"percent\":[35],\"more\":[36,43],\"callbacks\":[37],\"for\":[38,48,52],\"interviews.\":[39],\"Callbacks\":[40],\"also\":[42,67],\"responsive\":[44],\"resume\":[46],\"quality\":[47],\"than\":[51],\"African-American\":[53],\"ones.\":[54],\"The\":[55],\"racial\":[56],\"gap\":[57],\"is\":[58],\"uniform\":[59],\"across\":[60],\"occupation,\":[61],\"industry,\":[62],\"employer\":[64],\"size.\":[65],\"find\":[68],\"little\":[69],\"evidence\":[70],\"that\":[71],\"employers\":[72],\"inferring\":[74],\"social\":[75],\"class\":[76],\"from\":[77],\"Differential\":[80],\"treatment\":[81],\"still\":[84,87],\"appears\":[85],\"be\":[88],\"prominent\":[89],\"U.S.\":[92],\"market.\":[94]},\"cited_by_api_url\":\"https://api.openalex.org/works?filter=cites:W3123223998\",\"counts_by_year\":[{\"year\":2024,\"cited_by_count\":17},{\"year\":2023,\"cited_by_count\":274},{\"year\":2022,\"cited_by_count\":277},{\"year\":2021,\"cited_by_count\":281},{\"year\":2020,\"cited_by_count\":328},{\"year\":2019,\"cited_by_count\":367},{\"year\":2018,\"cited_by_count\":233},{\"year\":2017,\"cited_by_count\":220},{\"year\":2016,\"cited_by_count\":186},{\"year\":2015,\"cited_by_count\":178},{\"year\":2014,\"cited_by_count\":199},{\"year\":2013,\"cited_by_count\":149},{\"year\":2012,\"cited_by_count\":156}],\"updated_date\":\"2024-02-18T16:41:58.927399\",\"created_date\":\"2021-02-01\"}\r\n", + "items": [ + { + "itemType": "journalArticle", + "title": "Are Emily and Greg More Employable Than Lakisha and Jamal? A Field Experiment on Labor Market Discrimination", + "creators": [ + { + "firstName": "Marianne", + "lastName": "Bertrand", + "creatorType": "author" + }, + { + "firstName": "Sendhil", + "lastName": "Mullainathan", + "creatorType": "author" + } + ], + "date": "2004-09-01", + "DOI": "10.1257/0002828042002561", + "ISSN": "1944-7981", + "extra": "OpenAlex: https://openalex.org/W3123223998", + "issue": "4", + "language": "en", + "pages": "991-1013", + "publicationTitle": "The American Economic Review", + "volume": "94", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "emily" + }, + { + "tag": "labor market discrimination" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "import", + "input": "{\"id\":\"https://openalex.org/W2105705711\",\"doi\":\"https://doi.org/10.1007/978-94-017-1406-8_2\",\"title\":\"The Effects of Financial Incentives in Experiments: A Review and Capital-Labor-Production Framework\",\"display_name\":\"The Effects of Financial Incentives in Experiments: A Review and Capital-Labor-Production Framework\",\"publication_year\":1999,\"publication_date\":\"1999-01-01\",\"ids\":{\"openalex\":\"https://openalex.org/W2105705711\",\"doi\":\"https://doi.org/10.1007/978-94-017-1406-8_2\",\"mag\":\"2105705711\"},\"language\":\"en\",\"primary_location\":{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.1007/978-94-017-1406-8_2\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4306463937\",\"display_name\":\"Springer eBooks\",\"issn_l\":null,\"issn\":null,\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310319965\",\"host_organization_name\":\"Springer Nature\",\"host_organization_lineage\":[\"https://openalex.org/P4310319965\"],\"host_organization_lineage_names\":[\"Springer Nature\"],\"type\":\"ebook platform\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false},\"type\":\"book-chapter\",\"type_crossref\":\"book-chapter\",\"indexed_in\":[\"crossref\"],\"open_access\":{\"is_oa\":true,\"oa_status\":\"green\",\"oa_url\":\"https://authors.library.caltech.edu/83580/1/sswp1059.pdf\",\"any_repository_has_fulltext\":true},\"authorships\":[{\"author_position\":\"first\",\"author\":{\"id\":\"https://openalex.org/A5024087833\",\"display_name\":\"Colin F. Camerer\",\"orcid\":\"https://orcid.org/0000-0003-4049-1871\"},\"institutions\":[{\"id\":\"https://openalex.org/I122411786\",\"display_name\":\"California Institute of Technology\",\"ror\":\"https://ror.org/05dxps055\",\"country_code\":\"US\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I122411786\"]}],\"countries\":[\"US\"],\"is_corresponding\":false,\"raw_author_name\":\"Colin F. Camerer\",\"raw_affiliation_string\":\"Division of Humanities and Social Sciences 228-77, California Institute of Technology, Pasadena,\",\"raw_affiliation_strings\":[\"Division of Humanities and Social Sciences 228-77, California Institute of Technology, Pasadena,\"]},{\"author_position\":\"last\",\"author\":{\"id\":\"https://openalex.org/A5047900722\",\"display_name\":\"Robin M. Hogarth\",\"orcid\":\"https://orcid.org/0000-0001-7671-8981\"},\"institutions\":[{\"id\":\"https://openalex.org/I40347166\",\"display_name\":\"University of Chicago\",\"ror\":\"https://ror.org/024mw5h28\",\"country_code\":\"US\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I40347166\"]}],\"countries\":[\"US\"],\"is_corresponding\":false,\"raw_author_name\":\"Robin M. Hogarth\",\"raw_affiliation_string\":\"University of Chicago (Chicago).\",\"raw_affiliation_strings\":[\"University of Chicago (Chicago).\"]}],\"countries_distinct_count\":1,\"institutions_distinct_count\":2,\"corresponding_author_ids\":[],\"corresponding_institution_ids\":[],\"apc_list\":null,\"apc_paid\":null,\"has_fulltext\":false,\"cited_by_count\":622,\"cited_by_percentile_year\":{\"min\":99,\"max\":100},\"biblio\":{\"volume\":null,\"issue\":null,\"first_page\":\"7\",\"last_page\":\"48\"},\"is_retracted\":false,\"is_paratext\":false,\"primary_topic\":{\"id\":\"https://openalex.org/T10646\",\"display_name\":\"Social Preferences and Economic Behavior\",\"score\":0.9999,\"subfield\":{\"id\":\"https://openalex.org/subfields/3311\",\"display_name\":\"Safety Research\"},\"field\":{\"id\":\"https://openalex.org/fields/33\",\"display_name\":\"Social Sciences\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}},\"topics\":[{\"id\":\"https://openalex.org/T10646\",\"display_name\":\"Social Preferences and Economic Behavior\",\"score\":0.9999,\"subfield\":{\"id\":\"https://openalex.org/subfields/3311\",\"display_name\":\"Safety Research\"},\"field\":{\"id\":\"https://openalex.org/fields/33\",\"display_name\":\"Social Sciences\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}},{\"id\":\"https://openalex.org/T10315\",\"display_name\":\"Behavioral Economics and Decision Making\",\"score\":0.9985,\"subfield\":{\"id\":\"https://openalex.org/subfields/1800\",\"display_name\":\"General Decision Sciences\"},\"field\":{\"id\":\"https://openalex.org/fields/18\",\"display_name\":\"Decision Sciences\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}},{\"id\":\"https://openalex.org/T10841\",\"display_name\":\"Discrete Choice Models in Economics and Health Care\",\"score\":0.9821,\"subfield\":{\"id\":\"https://openalex.org/subfields/2002\",\"display_name\":\"Economics and Econometrics\"},\"field\":{\"id\":\"https://openalex.org/fields/20\",\"display_name\":\"Economics, Econometrics and Finance\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}}],\"keywords\":[{\"keyword\":\"financial incentives\",\"score\":0.6353},{\"keyword\":\"experiments\",\"score\":0.4196},{\"keyword\":\"capital-labor-production\",\"score\":0.25}],\"concepts\":[{\"id\":\"https://openalex.org/C29122968\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1414816\",\"display_name\":\"Incentive\",\"level\":2,\"score\":0.8655314},{\"id\":\"https://openalex.org/C2779861158\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1549811\",\"display_name\":\"Generosity\",\"level\":2,\"score\":0.597156},{\"id\":\"https://openalex.org/C145097563\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1148747\",\"display_name\":\"Payment\",\"level\":2,\"score\":0.56911683},{\"id\":\"https://openalex.org/C2778348673\",\"wikidata\":\"https://www.wikidata.org/wiki/Q739302\",\"display_name\":\"Production (economics)\",\"level\":2,\"score\":0.55046386},{\"id\":\"https://openalex.org/C162324750\",\"wikidata\":\"https://www.wikidata.org/wiki/Q8134\",\"display_name\":\"Economics\",\"level\":0,\"score\":0.53527635},{\"id\":\"https://openalex.org/C175444787\",\"wikidata\":\"https://www.wikidata.org/wiki/Q39072\",\"display_name\":\"Microeconomics\",\"level\":1,\"score\":0.49067962},{\"id\":\"https://openalex.org/C196083921\",\"wikidata\":\"https://www.wikidata.org/wiki/Q7915758\",\"display_name\":\"Variance (accounting)\",\"level\":2,\"score\":0.4220477},{\"id\":\"https://openalex.org/C100001284\",\"wikidata\":\"https://www.wikidata.org/wiki/Q2248246\",\"display_name\":\"Public economics\",\"level\":1,\"score\":0.35535687},{\"id\":\"https://openalex.org/C10138342\",\"wikidata\":\"https://www.wikidata.org/wiki/Q43015\",\"display_name\":\"Finance\",\"level\":1,\"score\":0.17811051},{\"id\":\"https://openalex.org/C121955636\",\"wikidata\":\"https://www.wikidata.org/wiki/Q4116214\",\"display_name\":\"Accounting\",\"level\":1,\"score\":0.08130938},{\"id\":\"https://openalex.org/C138885662\",\"wikidata\":\"https://www.wikidata.org/wiki/Q5891\",\"display_name\":\"Philosophy\",\"level\":0,\"score\":0.0},{\"id\":\"https://openalex.org/C27206212\",\"wikidata\":\"https://www.wikidata.org/wiki/Q34178\",\"display_name\":\"Theology\",\"level\":1,\"score\":0.0}],\"mesh\":[],\"locations_count\":3,\"locations\":[{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.1007/978-94-017-1406-8_2\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4306463937\",\"display_name\":\"Springer eBooks\",\"issn_l\":null,\"issn\":null,\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310319965\",\"host_organization_name\":\"Springer Nature\",\"host_organization_lineage\":[\"https://openalex.org/P4310319965\"],\"host_organization_lineage_names\":[\"Springer Nature\"],\"type\":\"ebook platform\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false},{\"is_oa\":true,\"landing_page_url\":\"https://resolver.caltech.edu/CaltechAUTHORS:20171129-161418280\",\"pdf_url\":\"https://authors.library.caltech.edu/83580/1/sswp1059.pdf\",\"source\":{\"id\":\"https://openalex.org/S4306402161\",\"display_name\":\"CaltechAUTHORS (California Institute of Technology)\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/I122411786\",\"host_organization_name\":\"California Institute of Technology\",\"host_organization_lineage\":[\"https://openalex.org/I122411786\"],\"host_organization_lineage_names\":[\"California Institute of Technology\"],\"type\":\"repository\"},\"license\":null,\"version\":\"acceptedVersion\",\"is_accepted\":true,\"is_published\":false},{\"is_oa\":true,\"landing_page_url\":\"https://resolver.caltech.edu/CaltechAUTHORS:20110208-132914477\",\"pdf_url\":\"https://authors.library.caltech.edu/22080/1/wp1059%5B1%5D.pdf\",\"source\":{\"id\":\"https://openalex.org/S4306402162\",\"display_name\":\"CaltechAUTHORS (California Institute of Technology)\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/I122411786\",\"host_organization_name\":\"California Institute of Technology\",\"host_organization_lineage\":[\"https://openalex.org/I122411786\"],\"host_organization_lineage_names\":[\"California Institute of Technology\"],\"type\":\"repository\"},\"license\":null,\"version\":\"acceptedVersion\",\"is_accepted\":true,\"is_published\":false}],\"best_oa_location\":{\"is_oa\":true,\"landing_page_url\":\"https://resolver.caltech.edu/CaltechAUTHORS:20171129-161418280\",\"pdf_url\":\"https://authors.library.caltech.edu/83580/1/sswp1059.pdf\",\"source\":{\"id\":\"https://openalex.org/S4306402161\",\"display_name\":\"CaltechAUTHORS (California Institute of Technology)\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/I122411786\",\"host_organization_name\":\"California Institute of Technology\",\"host_organization_lineage\":[\"https://openalex.org/I122411786\"],\"host_organization_lineage_names\":[\"California Institute of Technology\"],\"type\":\"repository\"},\"license\":null,\"version\":\"acceptedVersion\",\"is_accepted\":true,\"is_published\":false},\"sustainable_development_goals\":[{\"id\":\"https://metadata.un.org/sdg/8\",\"display_name\":\"Decent work and economic growth\",\"score\":0.7}],\"grants\":[],\"referenced_works_count\":78,\"referenced_works\":[\"https://openalex.org/W1964405317\",\"https://openalex.org/W1964897423\",\"https://openalex.org/W1971669205\",\"https://openalex.org/W1973893247\",\"https://openalex.org/W1974975426\",\"https://openalex.org/W1975547507\",\"https://openalex.org/W1975989400\",\"https://openalex.org/W1978429956\",\"https://openalex.org/W1988930314\",\"https://openalex.org/W1988942456\",\"https://openalex.org/W1989930562\",\"https://openalex.org/W1993159809\",\"https://openalex.org/W1993308331\",\"https://openalex.org/W1993415685\",\"https://openalex.org/W1994069242\",\"https://openalex.org/W1995243998\",\"https://openalex.org/W1999945441\",\"https://openalex.org/W2002646132\",\"https://openalex.org/W2005513160\",\"https://openalex.org/W2007545850\",\"https://openalex.org/W2012218966\",\"https://openalex.org/W2013107161\",\"https://openalex.org/W2014686230\",\"https://openalex.org/W2015441835\",\"https://openalex.org/W2023124293\",\"https://openalex.org/W2023772254\",\"https://openalex.org/W2027369625\",\"https://openalex.org/W2033673182\",\"https://openalex.org/W2035920101\",\"https://openalex.org/W2041946752\",\"https://openalex.org/W2043765516\",\"https://openalex.org/W2045163169\",\"https://openalex.org/W2045385178\",\"https://openalex.org/W2045744884\",\"https://openalex.org/W2048229474\",\"https://openalex.org/W2049297495\",\"https://openalex.org/W2053046778\",\"https://openalex.org/W2053617883\",\"https://openalex.org/W2055269809\",\"https://openalex.org/W2057925076\",\"https://openalex.org/W2058953064\",\"https://openalex.org/W2062687423\",\"https://openalex.org/W2063125613\",\"https://openalex.org/W2065612900\",\"https://openalex.org/W2066088184\",\"https://openalex.org/W2067835286\",\"https://openalex.org/W2068473107\",\"https://openalex.org/W2072365199\",\"https://openalex.org/W2074960359\",\"https://openalex.org/W2075742573\",\"https://openalex.org/W2078169121\",\"https://openalex.org/W2079053008\",\"https://openalex.org/W2081124617\",\"https://openalex.org/W2083307720\",\"https://openalex.org/W2087991264\",\"https://openalex.org/W2088646424\",\"https://openalex.org/W2120677542\",\"https://openalex.org/W2131229778\",\"https://openalex.org/W2147330019\",\"https://openalex.org/W2151844206\",\"https://openalex.org/W2156616450\",\"https://openalex.org/W2161901642\",\"https://openalex.org/W2165828708\",\"https://openalex.org/W2172873870\",\"https://openalex.org/W2313173377\",\"https://openalex.org/W2315360633\",\"https://openalex.org/W2321372096\",\"https://openalex.org/W2412876785\",\"https://openalex.org/W3122684324\",\"https://openalex.org/W3124187280\",\"https://openalex.org/W4229716956\",\"https://openalex.org/W4231282061\",\"https://openalex.org/W4234863607\",\"https://openalex.org/W4242490622\",\"https://openalex.org/W4245280887\",\"https://openalex.org/W4246756863\",\"https://openalex.org/W4253633548\",\"https://openalex.org/W4290377501\"],\"related_works\":[\"https://openalex.org/W4388803188\",\"https://openalex.org/W4234975527\",\"https://openalex.org/W2108936692\",\"https://openalex.org/W4317927411\",\"https://openalex.org/W2071684985\",\"https://openalex.org/W2285351234\",\"https://openalex.org/W1867350216\",\"https://openalex.org/W4247867945\",\"https://openalex.org/W4298004773\",\"https://openalex.org/W4385380367\"],\"ngrams_url\":\"https://api.openalex.org/works/W2105705711/ngrams\",\"abstract_inverted_index\":{\"We\":[0,83],\"review\":[1],\"74\":[2],\"experiments\":[3],\"with\":[4,71],\"no,\":[5],\"low,\":[6],\"or\":[7],\"high\":[8],\"performance-based\":[9],\"financial\":[10],\"incentives.\":[11,98],\"The\":[12],\"modal\":[13],\"result\":[14],\"is\":[15,23,81],\"no\":[16,87],\"effect\":[17],\"on\":[18,78],\"mean\":[19],\"performance\":[20,33],\"(though\":[21],\"variance\":[22],\"usually\":[24],\"reduced\":[25],\"by\":[26,96],\"higher\":[27],\"payment).\":[28],\"Higher\":[29],\"incentive\":[30],\"does\":[31],\"improve\":[32],\"often,\":[34],\"typically\":[35],\"judgment\":[36],\"tasks\":[37],\"that\":[38,86],\"are\":[39,55],\"responsive\":[40],\"to\":[41,57],\"better\":[42],\"effort.\":[43],\"Incentives\":[44],\"also\":[45,84],\"reduce\":[46],\"\\u201cpresentation\\u201d\":[47],\"effects\":[48,54,58],\"(e.g.,\":[49],\"generosity\":[50],\"and\":[51,65,69],\"risk-seeking).\":[52],\"Incentive\":[53],\"comparable\":[56],\"of\":[59],\"other\":[60],\"variables,\":[61,73],\"particularly\":[62],\"\\u201ccognitive\":[63],\"capital\\u201d\":[64],\"task\":[66],\"\\u201cproduction\\u201d\":[67],\"demands,\":[68],\"interact\":[70],\"those\":[72],\"so\":[74],\"a\":[75],\"narrow-minded\":[76],\"focus\":[77],\"incentives\":[79],\"alone\":[80],\"misguided.\":[82],\"note\":[85],\"replicated\":[88],\"study\":[89],\"has\":[90],\"made\":[91],\"rationality\":[92],\"violations\":[93],\"disappear\":[94],\"purely\":[95],\"raising\":[97]},\"cited_by_api_url\":\"https://api.openalex.org/works?filter=cites:W2105705711\",\"counts_by_year\":[{\"year\":2023,\"cited_by_count\":3},{\"year\":2022,\"cited_by_count\":5},{\"year\":2021,\"cited_by_count\":9},{\"year\":2020,\"cited_by_count\":18},{\"year\":2019,\"cited_by_count\":21},{\"year\":2018,\"cited_by_count\":21},{\"year\":2017,\"cited_by_count\":21},{\"year\":2016,\"cited_by_count\":26},{\"year\":2015,\"cited_by_count\":36},{\"year\":2014,\"cited_by_count\":48},{\"year\":2013,\"cited_by_count\":41},{\"year\":2012,\"cited_by_count\":62}],\"updated_date\":\"2024-02-23T23:28:16.339197\",\"created_date\":\"2016-06-24\"}\r\n", + "items": [ + { + "itemType": "bookSection", + "title": "The Effects of Financial Incentives in Experiments: A Review and Capital-Labor-Production Framework", + "creators": [ + { + "firstName": "Colin F.", + "lastName": "Camerer", + "creatorType": "author" + }, + { + "firstName": "Robin M.", + "lastName": "Hogarth", + "creatorType": "author" + } + ], + "date": "1999-01-01", + "bookTitle": "Springer eBooks", + "extra": "OpenAlex: https://openalex.org/W2105705711", + "language": "en", + "pages": "7-48", + "publisher": "Springer Nature", + "attachments": [ + { + "title": "Accepted Version PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "capital-labor-production" + }, + { + "tag": "experiments" + }, + { + "tag": "financial incentives" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "import", + "input": "{\"id\":\"https://openalex.org/W4234549826\",\"doi\":\"https://doi.org/10.1215/9780822377009\",\"title\":\"Clinical Labor\",\"display_name\":\"Clinical Labor\",\"publication_year\":2014,\"publication_date\":\"2014-01-01\",\"ids\":{\"openalex\":\"https://openalex.org/W4234549826\",\"doi\":\"https://doi.org/10.1215/9780822377009\"},\"language\":null,\"primary_location\":{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.1215/9780822377009\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4306463122\",\"display_name\":\"Duke University Press eBooks\",\"issn_l\":null,\"issn\":null,\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310315698\",\"host_organization_name\":\"Duke University Press\",\"host_organization_lineage\":[\"https://openalex.org/P4310315572\",\"https://openalex.org/P4310315698\"],\"host_organization_lineage_names\":[\"Duke University\",\"Duke University Press\"],\"type\":\"ebook platform\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false},\"type\":\"book\",\"type_crossref\":\"book\",\"indexed_in\":[\"crossref\"],\"open_access\":{\"is_oa\":false,\"oa_status\":\"closed\",\"oa_url\":null,\"any_repository_has_fulltext\":false},\"authorships\":[{\"author_position\":\"first\",\"author\":{\"id\":\"https://openalex.org/A5081203523\",\"display_name\":\"Melinda Cooper\",\"orcid\":\"https://orcid.org/0000-0001-8341-8282\"},\"institutions\":[],\"countries\":[],\"is_corresponding\":false,\"raw_author_name\":\"Melinda Cooper\",\"raw_affiliation_string\":\"\",\"raw_affiliation_strings\":[]},{\"author_position\":\"last\",\"author\":{\"id\":\"https://openalex.org/A5053202470\",\"display_name\":\"Catherine Waldby\",\"orcid\":\"https://orcid.org/0000-0002-5989-9917\"},\"institutions\":[],\"countries\":[],\"is_corresponding\":false,\"raw_author_name\":\"Catherine Waldby\",\"raw_affiliation_string\":\"\",\"raw_affiliation_strings\":[]}],\"countries_distinct_count\":0,\"institutions_distinct_count\":0,\"corresponding_author_ids\":[],\"corresponding_institution_ids\":[],\"apc_list\":null,\"apc_paid\":null,\"has_fulltext\":false,\"cited_by_count\":406,\"cited_by_percentile_year\":{\"min\":99,\"max\":100},\"biblio\":{\"volume\":null,\"issue\":null,\"first_page\":null,\"last_page\":null},\"is_retracted\":false,\"is_paratext\":false,\"primary_topic\":{\"id\":\"https://openalex.org/T12664\",\"display_name\":\"Development and Evaluation of Clinical Guidelines\",\"score\":0.3247,\"subfield\":{\"id\":\"https://openalex.org/subfields/2739\",\"display_name\":\"Public Health, Environmental and Occupational Health\"},\"field\":{\"id\":\"https://openalex.org/fields/27\",\"display_name\":\"Medicine\"},\"domain\":{\"id\":\"https://openalex.org/domains/4\",\"display_name\":\"Health Sciences\"}},\"topics\":[{\"id\":\"https://openalex.org/T12664\",\"display_name\":\"Development and Evaluation of Clinical Guidelines\",\"score\":0.3247,\"subfield\":{\"id\":\"https://openalex.org/subfields/2739\",\"display_name\":\"Public Health, Environmental and Occupational Health\"},\"field\":{\"id\":\"https://openalex.org/fields/27\",\"display_name\":\"Medicine\"},\"domain\":{\"id\":\"https://openalex.org/domains/4\",\"display_name\":\"Health Sciences\"}}],\"keywords\":[{\"keyword\":\"labor\",\"score\":0.7357},{\"keyword\":\"clinical\",\"score\":0.6233}],\"concepts\":[{\"id\":\"https://openalex.org/C17744445\",\"wikidata\":\"https://www.wikidata.org/wiki/Q36442\",\"display_name\":\"Political science\",\"level\":0,\"score\":0.3224085}],\"mesh\":[],\"locations_count\":1,\"locations\":[{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.1215/9780822377009\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4306463122\",\"display_name\":\"Duke University Press eBooks\",\"issn_l\":null,\"issn\":null,\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310315698\",\"host_organization_name\":\"Duke University Press\",\"host_organization_lineage\":[\"https://openalex.org/P4310315572\",\"https://openalex.org/P4310315698\"],\"host_organization_lineage_names\":[\"Duke University\",\"Duke University Press\"],\"type\":\"ebook platform\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false}],\"best_oa_location\":null,\"sustainable_development_goals\":[{\"id\":\"https://metadata.un.org/sdg/8\",\"score\":0.45,\"display_name\":\"Decent work and economic growth\"}],\"grants\":[],\"referenced_works_count\":0,\"referenced_works\":[],\"related_works\":[\"https://openalex.org/W2748952813\",\"https://openalex.org/W2899084033\",\"https://openalex.org/W2955725829\",\"https://openalex.org/W2949263084\",\"https://openalex.org/W2743539335\",\"https://openalex.org/W2890326160\",\"https://openalex.org/W594353338\",\"https://openalex.org/W2724734218\",\"https://openalex.org/W4382466601\",\"https://openalex.org/W2922049016\"],\"ngrams_url\":\"https://api.openalex.org/works/W4234549826/ngrams\",\"abstract_inverted_index\":null,\"cited_by_api_url\":\"https://api.openalex.org/works?filter=cites:W4234549826\",\"counts_by_year\":[{\"year\":2023,\"cited_by_count\":11},{\"year\":2022,\"cited_by_count\":16},{\"year\":2021,\"cited_by_count\":45},{\"year\":2020,\"cited_by_count\":29},{\"year\":2019,\"cited_by_count\":61},{\"year\":2018,\"cited_by_count\":140},{\"year\":2017,\"cited_by_count\":41},{\"year\":2016,\"cited_by_count\":33},{\"year\":2015,\"cited_by_count\":23},{\"year\":2014,\"cited_by_count\":6},{\"year\":2012,\"cited_by_count\":1}],\"updated_date\":\"2024-02-22T22:31:09.009786\",\"created_date\":\"2022-05-12\"}\r\n", + "items": [ + { + "itemType": "book", + "title": "Clinical Labor", + "creators": [ + { + "firstName": "Melinda", + "lastName": "Cooper", + "creatorType": "author" + }, + { + "firstName": "Catherine", + "lastName": "Waldby", + "creatorType": "author" + } + ], + "date": "2014-01-01", + "extra": "OpenAlex: https://openalex.org/W4234549826", + "publisher": "Duke University Press", + "attachments": [], + "tags": [ + { + "tag": "clinical" + }, + { + "tag": "labor" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "import", + "input": "{\"id\":\"https://openalex.org/W2257674859\",\"doi\":\"https://doi.org/10.18130/v3v002\",\"title\":\"The GULag and Laogai: A Comparative Study of Forced Labor through Camp Literature\",\"display_name\":\"The GULag and Laogai: A Comparative Study of Forced Labor through Camp Literature\",\"publication_year\":2017,\"publication_date\":\"2017-08-09\",\"ids\":{\"openalex\":\"https://openalex.org/W2257674859\",\"doi\":\"https://doi.org/10.18130/v3v002\",\"mag\":\"2257674859\"},\"language\":\"en\",\"primary_location\":{\"is_oa\":true,\"landing_page_url\":\"https://doi.org/10.18130/v3v002\",\"pdf_url\":\"https://libraetd.lib.virginia.edu/downloads/5425kb078?filename=Stepanic_Stanley_Dec2012.pdf\",\"source\":null,\"license\":null,\"version\":\"publishedVersion\",\"is_accepted\":true,\"is_published\":true},\"type\":\"dissertation\",\"type_crossref\":\"dissertation\",\"indexed_in\":[\"crossref\"],\"open_access\":{\"is_oa\":true,\"oa_status\":\"bronze\",\"oa_url\":\"https://libraetd.lib.virginia.edu/downloads/5425kb078?filename=Stepanic_Stanley_Dec2012.pdf\",\"any_repository_has_fulltext\":true},\"authorships\":[{\"author_position\":\"first\",\"author\":{\"id\":\"https://openalex.org/A5078709935\",\"display_name\":\"Stanley Joseph Stepanic\",\"orcid\":null},\"institutions\":[{\"id\":\"https://openalex.org/I51556381\",\"display_name\":\"University of Virginia\",\"ror\":\"https://ror.org/0153tk833\",\"country_code\":\"US\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I51556381\"]}],\"countries\":[\"US\"],\"is_corresponding\":true,\"raw_author_name\":\"Stanley Joseph Stepanic\",\"raw_affiliation_string\":\"University of Virginia\",\"raw_affiliation_strings\":[\"University of Virginia\"]}],\"countries_distinct_count\":1,\"institutions_distinct_count\":1,\"corresponding_author_ids\":[\"https://openalex.org/A5078709935\"],\"corresponding_institution_ids\":[\"https://openalex.org/I51556381\"],\"apc_list\":null,\"apc_paid\":null,\"has_fulltext\":true,\"fulltext_origin\":\"pdf\",\"cited_by_count\":1,\"cited_by_percentile_year\":{\"min\":70,\"max\":76},\"biblio\":{\"volume\":null,\"issue\":null,\"first_page\":null,\"last_page\":null},\"is_retracted\":false,\"is_paratext\":false,\"primary_topic\":{\"id\":\"https://openalex.org/T13802\",\"display_name\":\"Social and Cultural Development in Vietnam\",\"score\":0.9421,\"subfield\":{\"id\":\"https://openalex.org/subfields/3312\",\"display_name\":\"Sociology and Political Science\"},\"field\":{\"id\":\"https://openalex.org/fields/33\",\"display_name\":\"Social Sciences\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}},\"topics\":[{\"id\":\"https://openalex.org/T13802\",\"display_name\":\"Social and Cultural Development in Vietnam\",\"score\":0.9421,\"subfield\":{\"id\":\"https://openalex.org/subfields/3312\",\"display_name\":\"Sociology and Political Science\"},\"field\":{\"id\":\"https://openalex.org/fields/33\",\"display_name\":\"Social Sciences\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}},{\"id\":\"https://openalex.org/T10893\",\"display_name\":\"Religious Diversity and Regulation in Chinese Society\",\"score\":0.9331,\"subfield\":{\"id\":\"https://openalex.org/subfields/3312\",\"display_name\":\"Sociology and Political Science\"},\"field\":{\"id\":\"https://openalex.org/fields/33\",\"display_name\":\"Social Sciences\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}}],\"keywords\":[{\"keyword\":\"gulag\",\"score\":0.6365},{\"keyword\":\"forced labor\",\"score\":0.5605},{\"keyword\":\"camp\",\"score\":0.3939},{\"keyword\":\"laogai\",\"score\":0.3371}],\"concepts\":[{\"id\":\"https://openalex.org/C2776721811\",\"wikidata\":\"https://www.wikidata.org/wiki/Q161448\",\"display_name\":\"Gulag\",\"level\":2,\"score\":0.97338235},{\"id\":\"https://openalex.org/C95457728\",\"wikidata\":\"https://www.wikidata.org/wiki/Q309\",\"display_name\":\"History\",\"level\":0,\"score\":0.34109622},{\"id\":\"https://openalex.org/C17744445\",\"wikidata\":\"https://www.wikidata.org/wiki/Q36442\",\"display_name\":\"Political science\",\"level\":0,\"score\":0.33254576},{\"id\":\"https://openalex.org/C199539241\",\"wikidata\":\"https://www.wikidata.org/wiki/Q7748\",\"display_name\":\"Law\",\"level\":1,\"score\":0.12201893}],\"mesh\":[],\"locations_count\":1,\"locations\":[{\"is_oa\":true,\"landing_page_url\":\"https://doi.org/10.18130/v3v002\",\"pdf_url\":\"https://libraetd.lib.virginia.edu/downloads/5425kb078?filename=Stepanic_Stanley_Dec2012.pdf\",\"source\":null,\"license\":null,\"version\":\"publishedVersion\",\"is_accepted\":true,\"is_published\":true}],\"best_oa_location\":{\"is_oa\":true,\"landing_page_url\":\"https://doi.org/10.18130/v3v002\",\"pdf_url\":\"https://libraetd.lib.virginia.edu/downloads/5425kb078?filename=Stepanic_Stanley_Dec2012.pdf\",\"source\":null,\"license\":null,\"version\":\"publishedVersion\",\"is_accepted\":true,\"is_published\":true},\"sustainable_development_goals\":[{\"id\":\"https://metadata.un.org/sdg/8\",\"score\":0.67,\"display_name\":\"Decent work and economic growth\"}],\"grants\":[],\"referenced_works_count\":0,\"referenced_works\":[],\"related_works\":[\"https://openalex.org/W2748952813\",\"https://openalex.org/W2590215521\",\"https://openalex.org/W2331145549\",\"https://openalex.org/W1514633335\",\"https://openalex.org/W4200446317\",\"https://openalex.org/W3210235098\",\"https://openalex.org/W4386637648\",\"https://openalex.org/W4386051922\",\"https://openalex.org/W2932913126\",\"https://openalex.org/W1503036515\"],\"ngrams_url\":\"https://api.openalex.org/works/W2257674859/ngrams\",\"abstract_inverted_index\":{\"This\":[0,190],\"is\":[1,96,184,221,349,358,361,558,564,651,654],\"the\":[2,12,18,43,61,64,122,131,153,156,161,195,243,253,257,271,337,340,387,407,417,425,435,438,526,529,533,536,567,599,629,634,668,674,703,710,723,727,739],\"first\":[3,661],\"comparative\":[4],\"study\":[5],\"ever\":[6],\"undertaken\":[7],\"in\":[8,17,39,42,69,108,125,152,232,252,309,334,376,404,525,573,582,620,696,755],\"an\":[9,57],\"investigation\":[10],\"of\":[11,14,60,63,66,77,88,175,270,273,327,339,380,386,423,437,466,482,487,528,593,631,686,706,757],\"history\":[13,62,76],\"forced\":[15,67,89,296],\"labor\":[16,68,272],\"Soviet\":[19,126,154,310,575],\"Union\":[20],\"and\":[21,30,49,102,127,179,200,286,383,445,448,454,458,477,490,503,515,544,601,612,649,670,688,726,748],\"China.\":[22],\"It\":[23,207,653],\"makes\":[24],\"no\":[25],\"claims\":[26],\"to\":[27,36,54,97,115,144,193,226,236,247,260,292,297,303,306,316,352,397,473,492,498,509,511,523,566,586,613,729],\"be\":[28,217,234,304,353,398],\"exhaustive,\":[29],\"serves\":[31],\"mainly\":[32],\"as\":[33,104,148,617,691],\"a\":[34,74,137,228,377,401,590,646,684,732],\"foundation\":[35],\"further\":[37],\"work\":[38,191,293],\"this\":[40,198,321,348,557,562],\"subject\":[41],\"near\":[44],\"future.\":[45],\"Various\":[46],\"historical\":[47],\"works\":[48],\"documents\":[50],\"have\":[51,369,396],\"been\":[52,374,644,678],\"utilized\":[53],\"create,\":[55],\"firstly,\":[56],\"acceptable\":[58],\"overview\":[59],\"practice\":[65],\"both\":[70,111],\"countries,\":[71],\"followed\":[72],\"by\":[73,86,120,598],\"short\":[75],\"so\":[78,261],\"-\":[79,330,539,570,623,752],\"called\":[80],\"\\u2018camp\":[81],\"literature',\":[82],\"or\":[83,604,608,639],\"memoirs\":[84],\"written\":[85],\"survivors\":[87],\"labor,\":[90,611],\"generally\":[91],\"speaking.\":[92],\"The\":[93,574],\"main\":[94],\"focus\":[95],\"analyze\":[98],\"several\":[99,116,202],\"key\":[100],\"similarities\":[101],\"differences\":[103],\"they\":[105,676],\"are\":[106,290,412,496,585],\"found\":[107],\"examples\":[109],\"from\":[110,500,546],\"countries.\":[112],\"Differences\":[113],\"lead\":[114],\"interesting\":[117],\"points,\":[118],\"discovered\":[119],\"observing\":[121],\"narrative\":[123],\"persona\":[124],\"Chinese\":[128,132,254,647,740],\"examples.\":[129],\"On\":[130],\"side,\":[133],\"one\":[134,245,595],\"can\":[135],\"find\":[136],\"much\":[138],\"more\":[139],\"accepting\":[140],\"narrator,\":[141],\"who\":[142,281,289,312,549,596],\"seems\":[143],\"view\":[145],\"his\":[146,182,187,607],\"situation\":[147],\"somehow\":[149],\"necessary,\":[150],\"whereas\":[151],\"context\":[155],\"prisoner\":[157,258],\"almost\":[158],\"always\":[159],\"condemns\":[160],\"government.\":[162],\"Even\":[163],\"when\":[164],\"he\":[165,168,641,650],\"does\":[166,208,239,256],\"not,\":[167,250],\"at\":[169,223,450,461],\"least\":[170],\"suggests\":[171,181],\"that\":[172,230,346,365,393,434,714],\"some\":[173],\"sort\":[174,705],\"mistake\":[176],\"was\":[177,716,722,744],\"made\":[178],\"rarely\":[180],\"imprisonment\":[183],\"truly\":[185],\"for\":[186,197,204,278,287,370,410,456,480,532,673],\"own\":[188,610],\"good.\":[189],\"aims\":[192],\"investigate\":[194],\"reason\":[196],\"phenomenon\":[199],\"poses\":[201],\"reasons\":[203],\"its\":[205,467],\"existence.\":[206],\"not\":[209,363,391,432,471,507,521],\"provide\":[210],\"answers,\":[211],\"only\":[212,462],\"possibilities.\":[213],\"Further\":[214],\"research\":[215],\"will\":[216,324,343,550],\"required,\":[218],\"if\":[219],\"it\":[220,357,362,390,431,470,506,520,637],\"even\":[222,659],\"all\":[224,347],\"possible\":[225],\"answer\":[227],\"question\":[229],\"may,\":[231],\"fact,\":[233],\"impossible\":[235],\"prove.\":[237],\"Namely,\":[238],\"one's\":[240],\"culture\":[241],\"shape\":[242],\"way\":[244,322,728],\"tends\":[246],\"think?\":[248],\"If\":[633],\"why,\":[251],\"context,\":[255],\"seem\":[259],\"willingly\":[262],\"accept\":[263],\"their\":[264,671],\"situation?\":[265],\"W4\":[266],\"\\u2018mz\":[267],\"...make\":[268],\"use\":[269],\"those\":[274,279,288,307,746],\"persons\":[275],\"under\":[276],\"arrest,\\u2018\":[277],\"gentlemen\":[280],\"live\":[282],\"without\":[283,294,734],\"any\":[284],\"occupation,\\u2018\":[285],\"unable\":[291],\"being\":[295],\"do\":[298],\"so.\":[299],\"Such\":[300],\"punishment\":[301],\"ought\":[302],\"applied\":[305],\"working\":[308],\"institutions\":[311],\"demonstrate\":[313],\"unconscientious\":[314],\"attitudes\":[315],\"work,\":[317],\"tardiness,\":[318],\"etc.\":[319,428],\"...In\":[320],\"we\":[323],\"create\":[325],\"schools\":[326],\"labor.\":[328],\"1\":[329],\"Dzerzhinsky's\":[331],\"public\":[332],\"speech\":[333],\"1919\":[335],\"concerning\":[336,628],\"reeducation\":[338],\"bourgeois.\":[341],\"You\":[342],\"say,\":[344],\"perhaps,\":[345],\"too\":[350],\"stupid\":[351,364,392,433,472,508,522],\"true.\":[354,359],\"But,\":[355],\"unfortunately,\":[356],\"And\":[360],\"160,\":[366],\"000,000\":[367],\"people\":[368,616],\"eighteen\":[371],\"years\":[372],\"past\":[373],\"resident\":[375],\"vast\":[378],\"territory\":[379],\"good\":[381],\"soil\":[382],\"starving\":[384],\"most\":[385],\"time?\":[388],\"Is\":[389,430,469,505,519],\"three\":[394],\"families\":[395],\"crowded\":[399],\"into\":[400,589],\"single\":[402],\"room\":[403],\"Moscow,\":[405],\"while\":[406,484],\"millions\":[408,488],\"needed\":[409],\"housing\":[411],\"lavished\":[413],\"on\":[414,443],\"projects\":[415],\"like\":[416],\"\\u2018Palace\":[418],\"ofSoviets'\":[419],\"(The\":[420],\"Communist\":[421],\"Tower\":[422],\"Babel),\":[424],\"\\u2018Dynamo\":[426],\"',\":[427],\"?\":[429],\"construction\":[436],\"Dniepostroi\":[439],\"Water\":[440],\"Plant\":[441],\"went\":[442,701],\"day\":[444],\"night,\":[446],\"winter\":[447],\"summer,\":[449],\"enormous\":[451],\"sacrifice\":[452],\"oflives\":[453],\"money\":[455],\"years,\":[457],\"now\":[459],\"functions\":[460],\"twelve\":[463],\"per\":[464],\"cent\":[465],\"capacity?\":[468],\"let\":[474],\"horses,\":[475],\"cows,\":[476],\"pigs\":[478],\"starve\":[479],\"lack\":[481],\"fodder\":[483],\"spending\":[485],\"tens\":[486],\"importing\":[489],\"trying\":[491],\"breed\":[493],\"rabbits,\":[494],\"which\":[495],\"certain\":[497],\"succumb\":[499],\"unsuitable\":[501],\"food\":[502],\"climate?\":[504],\"try\":[510],\"domesticate\":[512],\"Karelian\":[513],\"elks\":[514],\"Kamchatka\":[516],\"bears\":[517],\"instead?\":[518],\"import,\":[524],\"vicinity\":[527],\"Arctic\":[530],\"Circle,\":[531],\"purpose\":[534],\"ofbuilding\":[535],\"White\":[537],\"Sea\":[538],\"Baltic\":[540],\"Canal,\":[541],\"60,000\":[542],\"Usbeks\":[543],\"Khirghizians\":[545],\"southern\":[547],\"Russia\":[548],\"probably\":[551],\"perish\":[552],\"within\":[553],\"six\":[554],\"months?\":[555],\"All\":[556],\"revoltingly\":[559],\"stupid,\":[560],\"but\":[561,708],\"stupidity\":[563],\"armed\":[565],\"teeth.\":[568],\"2\":[569],\"Ivan\":[571],\"Solonevich\":[572],\"Paradise\":[576],\"Lost.\":[577],\"China\":[578],\"'s\":[579],\"basic\":[580],\"goals\":[581],\"criminal\":[583],\"reform\":[584],\"turn\":[587],\"ojfenders\":[588],\"dijferent\":[591],\"kind\":[592],\"person,\":[594],\"abides\":[597],\"law\":[600],\"supports\":[602],\"himself\":[603],\"herself\":[605],\"with\":[606,683,692],\"her\":[609],\"reestablish\":[614],\"these\":[615],\"free\":[618],\"citizens\":[619],\"society.\":[621],\"3\":[622],\"Beijing's\":[624],\"official\":[625],\"political\":[626],\"statement\":[627],\"existence\":[630],\"Laogai.\":[632],\"reader\":[635],\"finds\":[636],\"preposterous\":[638],\"exaggerated,\":[640],\"has\":[642],\"never\":[643],\"inside\":[645],\"prison,\":[648],\"lucky.\":[652],\"utterly\":[655],\"typical\":[656],\"ofthat\":[657],\"country,\":[658],\"today...The\":[660],\"times\":[662],\"I\":[663,680,700,715,737,743],\"encountered\":[664],\"prisoners\":[665],\"actually\":[666],\"thanking\":[667],\"government\":[669],\"jailers\":[672],\"sentences\":[675],\"had\":[677],\"given,\":[679],\"regarded\":[681],\"them\":[682],\"mixture\":[685],\"astonishment\":[687],\"scorn.\":[689],\"Later,\":[690],\"my\":[693,719],\"Ideological\":[694],\"Reviews\":[695],\"Prison\":[697],\"Number\":[698],\"One,\":[699],\"through\":[702,731],\"same\":[704],\"motions,\":[707],\"maintained\":[709],\"small\":[711],\"mental\":[712],\"reserve\":[713],\"onbz\":[717],\"protecting\":[718],\"skin:\":[720],\"That\":[721],\"form\":[724],\"expected\":[725],\"go\":[730],\"sentence\":[733],\"trouble.\":[735],\"Before\":[736],\"left\":[738],\"jails,\":[741],\"though,\":[742],\"writing\":[745],\"phrases\":[747],\"believing\":[749],\"them.\":[750],\"4\":[751],\"Bao\":[753],\"Ruo-Wang\":[754],\"Prisoner\":[756],\"Mao.\":[758]},\"cited_by_api_url\":\"https://api.openalex.org/works?filter=cites:W2257674859\",\"counts_by_year\":[{\"year\":2013,\"cited_by_count\":1}],\"updated_date\":\"2024-02-20T18:51:19.096305\",\"created_date\":\"2016-06-24\"}\r\n", + "items": [ + { + "itemType": "thesis", + "title": "The GULag and Laogai: A Comparative Study of Forced Labor through Camp Literature", + "creators": [ + { + "firstName": "Stanley Joseph", + "lastName": "Stepanic", + "creatorType": "author" + } + ], + "date": "2017-08-09", + "extra": "OpenAlex: https://openalex.org/W2257674859", + "language": "en", + "university": "University of Virginia", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "camp" + }, + { + "tag": "forced labor" + }, + { + "tag": "gulag" + }, + { + "tag": "laogai" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "import", + "input": "{\"meta\":{\"count\":5,\"db_response_time_ms\":444,\"page\":1,\"per_page\":25,\"groups_count\":null},\"results\":[{\"id\":\"https://openalex.org/W2046245907\",\"doi\":\"https://doi.org/10.1109/tau.1965.1161805\",\"title\":\"On the audibility of amplifier phase distortion\",\"display_name\":\"On the audibility of amplifier phase distortion\",\"relevance_score\":0.99999994,\"publication_year\":1965,\"publication_date\":\"1965-07-01\",\"ids\":{\"openalex\":\"https://openalex.org/W2046245907\",\"doi\":\"https://doi.org/10.1109/tau.1965.1161805\",\"mag\":\"2046245907\"},\"language\":\"en\",\"primary_location\":{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.1109/tau.1965.1161805\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S186564409\",\"display_name\":\"IEEE Transactions on Audio\",\"issn_l\":\"0096-1620\",\"issn\":[\"1558-2663\",\"0096-1620\"],\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310319808\",\"host_organization_name\":\"Institute of Electrical and Electronics Engineers\",\"host_organization_lineage\":[\"https://openalex.org/P4310319808\"],\"host_organization_lineage_names\":[\"Institute of Electrical and Electronics Engineers\"],\"type\":\"journal\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false},\"type\":\"article\",\"type_crossref\":\"journal-article\",\"indexed_in\":[\"crossref\"],\"open_access\":{\"is_oa\":false,\"oa_status\":\"closed\",\"oa_url\":null,\"any_repository_has_fulltext\":false},\"authorships\":[{\"author_position\":\"first\",\"author\":{\"id\":\"https://openalex.org/A5025692314\",\"display_name\":\"G. Wentworth\",\"orcid\":null},\"institutions\":[],\"countries\":[],\"is_corresponding\":true,\"raw_author_name\":\"G. Wentworth\",\"raw_affiliation_string\":\"Ridgmar Blvd. Fort Worth, Tex\",\"raw_affiliation_strings\":[\"Ridgmar Blvd. Fort Worth, Tex\"]}],\"countries_distinct_count\":0,\"institutions_distinct_count\":0,\"corresponding_author_ids\":[\"https://openalex.org/A5025692314\"],\"corresponding_institution_ids\":[],\"apc_list\":null,\"apc_paid\":null,\"has_fulltext\":true,\"fulltext_origin\":\"ngrams\",\"cited_by_count\":2,\"cited_by_percentile_year\":{\"min\":74,\"max\":78},\"biblio\":{\"volume\":\"AU-13\",\"issue\":\"4\",\"first_page\":\"99\",\"last_page\":\"99\"},\"is_retracted\":false,\"is_paratext\":false,\"primary_topic\":{\"id\":\"https://openalex.org/T10688\",\"display_name\":\"Image Denoising Techniques and Algorithms\",\"score\":0.5802,\"subfield\":{\"id\":\"https://openalex.org/subfields/1707\",\"display_name\":\"Computer Vision and Pattern Recognition\"},\"field\":{\"id\":\"https://openalex.org/fields/17\",\"display_name\":\"Computer Science\"},\"domain\":{\"id\":\"https://openalex.org/domains/3\",\"display_name\":\"Physical Sciences\"}},\"topics\":[{\"id\":\"https://openalex.org/T10688\",\"display_name\":\"Image Denoising Techniques and Algorithms\",\"score\":0.5802,\"subfield\":{\"id\":\"https://openalex.org/subfields/1707\",\"display_name\":\"Computer Vision and Pattern Recognition\"},\"field\":{\"id\":\"https://openalex.org/fields/17\",\"display_name\":\"Computer Science\"},\"domain\":{\"id\":\"https://openalex.org/domains/3\",\"display_name\":\"Physical Sciences\"}},{\"id\":\"https://openalex.org/T13493\",\"display_name\":\"Acousto-Optic Interaction in Crystalline Materials\",\"score\":0.5614,\"subfield\":{\"id\":\"https://openalex.org/subfields/3107\",\"display_name\":\"Atomic and Molecular Physics, and Optics\"},\"field\":{\"id\":\"https://openalex.org/fields/31\",\"display_name\":\"Physics and Astronomy\"},\"domain\":{\"id\":\"https://openalex.org/domains/3\",\"display_name\":\"Physical Sciences\"}},{\"id\":\"https://openalex.org/T10662\",\"display_name\":\"Guided Wave Structural Health Monitoring in Materials\",\"score\":0.5351,\"subfield\":{\"id\":\"https://openalex.org/subfields/2211\",\"display_name\":\"Mechanics of Materials\"},\"field\":{\"id\":\"https://openalex.org/fields/22\",\"display_name\":\"Engineering\"},\"domain\":{\"id\":\"https://openalex.org/domains/3\",\"display_name\":\"Physical Sciences\"}}],\"keywords\":[{\"keyword\":\"amplifier phase distortion\",\"score\":0.8078},{\"keyword\":\"audibility\",\"score\":0.5295}],\"concepts\":[{\"id\":\"https://openalex.org/C194257627\",\"wikidata\":\"https://www.wikidata.org/wiki/Q211554\",\"display_name\":\"Amplifier\",\"level\":3,\"score\":0.66258776},{\"id\":\"https://openalex.org/C126780896\",\"wikidata\":\"https://www.wikidata.org/wiki/Q899871\",\"display_name\":\"Distortion (music)\",\"level\":4,\"score\":0.65470827},{\"id\":\"https://openalex.org/C57747864\",\"wikidata\":\"https://www.wikidata.org/wiki/Q7180948\",\"display_name\":\"Phase distortion\",\"level\":3,\"score\":0.60850114},{\"id\":\"https://openalex.org/C44280652\",\"wikidata\":\"https://www.wikidata.org/wiki/Q104837\",\"display_name\":\"Phase (matter)\",\"level\":2,\"score\":0.51192963},{\"id\":\"https://openalex.org/C24890656\",\"wikidata\":\"https://www.wikidata.org/wiki/Q82811\",\"display_name\":\"Acoustics\",\"level\":1,\"score\":0.477577},{\"id\":\"https://openalex.org/C192562407\",\"wikidata\":\"https://www.wikidata.org/wiki/Q228736\",\"display_name\":\"Materials science\",\"level\":0,\"score\":0.44682446},{\"id\":\"https://openalex.org/C119599485\",\"wikidata\":\"https://www.wikidata.org/wiki/Q43035\",\"display_name\":\"Electrical engineering\",\"level\":1,\"score\":0.43042603},{\"id\":\"https://openalex.org/C121332964\",\"wikidata\":\"https://www.wikidata.org/wiki/Q413\",\"display_name\":\"Physics\",\"level\":0,\"score\":0.34204704},{\"id\":\"https://openalex.org/C127413603\",\"wikidata\":\"https://www.wikidata.org/wiki/Q11023\",\"display_name\":\"Engineering\",\"level\":0,\"score\":0.33855706},{\"id\":\"https://openalex.org/C106131492\",\"wikidata\":\"https://www.wikidata.org/wiki/Q3072260\",\"display_name\":\"Filter (signal processing)\",\"level\":2,\"score\":0.09166792},{\"id\":\"https://openalex.org/C46362747\",\"wikidata\":\"https://www.wikidata.org/wiki/Q173431\",\"display_name\":\"CMOS\",\"level\":2,\"score\":0.0},{\"id\":\"https://openalex.org/C62520636\",\"wikidata\":\"https://www.wikidata.org/wiki/Q944\",\"display_name\":\"Quantum mechanics\",\"level\":1,\"score\":0.0}],\"mesh\":[],\"locations_count\":1,\"locations\":[{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.1109/tau.1965.1161805\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S186564409\",\"display_name\":\"IEEE Transactions on Audio\",\"issn_l\":\"0096-1620\",\"issn\":[\"1558-2663\",\"0096-1620\"],\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310319808\",\"host_organization_name\":\"Institute of Electrical and Electronics Engineers\",\"host_organization_lineage\":[\"https://openalex.org/P4310319808\"],\"host_organization_lineage_names\":[\"Institute of Electrical and Electronics Engineers\"],\"type\":\"journal\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false}],\"best_oa_location\":null,\"sustainable_development_goals\":[{\"score\":0.74,\"id\":\"https://metadata.un.org/sdg/7\",\"display_name\":\"Affordable and clean energy\"}],\"grants\":[],\"referenced_works_count\":0,\"referenced_works\":[],\"related_works\":[\"https://openalex.org/W2116460786\",\"https://openalex.org/W2626065499\",\"https://openalex.org/W2074878601\",\"https://openalex.org/W1918166830\",\"https://openalex.org/W2060986946\",\"https://openalex.org/W2136031634\",\"https://openalex.org/W2084404188\",\"https://openalex.org/W4247383620\",\"https://openalex.org/W3113937270\",\"https://openalex.org/W1568978649\"],\"ngrams_url\":\"https://api.openalex.org/works/W2046245907/ngrams\",\"abstract_inverted_index\":null,\"cited_by_api_url\":\"https://api.openalex.org/works?filter=cites:W2046245907\",\"counts_by_year\":[],\"updated_date\":\"2024-02-27T07:19:02.045114\",\"created_date\":\"2016-06-24\"},{\"id\":\"https://openalex.org/W4237963058\",\"doi\":\"https://doi.org/10.1056/nejm198301133080228\",\"title\":\"Notices\",\"display_name\":\"Notices\",\"relevance_score\":0.99999994,\"publication_year\":1983,\"publication_date\":\"1983-01-13\",\"ids\":{\"openalex\":\"https://openalex.org/W4237963058\",\"doi\":\"https://doi.org/10.1056/nejm198301133080228\"},\"language\":null,\"primary_location\":{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.1056/nejm198301133080228\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S62468778\",\"display_name\":\"The New England Journal of Medicine\",\"issn_l\":\"0028-4793\",\"issn\":[\"0028-4793\",\"1533-4406\"],\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310320239\",\"host_organization_name\":\"Massachusetts Medical Society\",\"host_organization_lineage\":[\"https://openalex.org/P4310320239\"],\"host_organization_lineage_names\":[\"Massachusetts Medical Society\"],\"type\":\"journal\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false},\"type\":\"article\",\"type_crossref\":\"journal-article\",\"indexed_in\":[\"crossref\"],\"open_access\":{\"is_oa\":false,\"oa_status\":\"closed\",\"oa_url\":null,\"any_repository_has_fulltext\":false},\"authorships\":[],\"countries_distinct_count\":0,\"institutions_distinct_count\":0,\"corresponding_author_ids\":[],\"corresponding_institution_ids\":[],\"apc_list\":null,\"apc_paid\":null,\"has_fulltext\":false,\"cited_by_count\":0,\"cited_by_percentile_year\":{\"min\":0,\"max\":60},\"biblio\":{\"volume\":\"308\",\"issue\":\"2\",\"first_page\":\"112\",\"last_page\":\"112\"},\"is_retracted\":false,\"is_paratext\":false,\"primary_topic\":null,\"topics\":[],\"keywords\":[],\"concepts\":[{\"id\":\"https://openalex.org/C71924100\",\"wikidata\":\"https://www.wikidata.org/wiki/Q11190\",\"display_name\":\"Medicine\",\"level\":0,\"score\":0.90406847}],\"mesh\":[],\"locations_count\":1,\"locations\":[{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.1056/nejm198301133080228\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S62468778\",\"display_name\":\"The New England Journal of Medicine\",\"issn_l\":\"0028-4793\",\"issn\":[\"0028-4793\",\"1533-4406\"],\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310320239\",\"host_organization_name\":\"Massachusetts Medical Society\",\"host_organization_lineage\":[\"https://openalex.org/P4310320239\"],\"host_organization_lineage_names\":[\"Massachusetts Medical Society\"],\"type\":\"journal\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false}],\"best_oa_location\":null,\"sustainable_development_goals\":[],\"grants\":[],\"referenced_works_count\":0,\"referenced_works\":[],\"related_works\":[\"https://openalex.org/W2048182022\",\"https://openalex.org/W2748952813\",\"https://openalex.org/W2899084033\",\"https://openalex.org/W3032375762\",\"https://openalex.org/W1995515455\",\"https://openalex.org/W2080531066\",\"https://openalex.org/W3108674512\",\"https://openalex.org/W1506200166\",\"https://openalex.org/W2604872355\",\"https://openalex.org/W3031052312\"],\"ngrams_url\":\"https://api.openalex.org/works/W4237963058/ngrams\",\"abstract_inverted_index\":null,\"cited_by_api_url\":\"https://api.openalex.org/works?filter=cites:W4237963058\",\"counts_by_year\":[],\"updated_date\":\"2024-03-03T21:00:09.353994\",\"created_date\":\"2022-05-12\"},{\"id\":\"https://openalex.org/W4239223537\",\"doi\":\"https://doi.org/10.4018/978-1-7998-7705-9.ch090\",\"title\":\"The Big Data Research Ecosystem\",\"display_name\":\"The Big Data Research Ecosystem\",\"relevance_score\":0.99999994,\"publication_year\":2020,\"publication_date\":\"2020-11-27\",\"ids\":{\"openalex\":\"https://openalex.org/W4239223537\",\"doi\":\"https://doi.org/10.4018/978-1-7998-7705-9.ch090\"},\"language\":\"en\",\"primary_location\":{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.4018/978-1-7998-7705-9.ch090\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4306463409\",\"display_name\":\"IGI Global eBooks\",\"issn_l\":null,\"issn\":null,\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310320424\",\"host_organization_name\":\"IGI Global\",\"host_organization_lineage\":[\"https://openalex.org/P4310320424\"],\"host_organization_lineage_names\":[\"IGI Global\"],\"type\":\"ebook platform\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false},\"type\":\"book-chapter\",\"type_crossref\":\"book-chapter\",\"indexed_in\":[\"crossref\"],\"open_access\":{\"is_oa\":false,\"oa_status\":\"closed\",\"oa_url\":null,\"any_repository_has_fulltext\":false},\"authorships\":[{\"author_position\":\"first\",\"author\":{\"id\":\"https://openalex.org/A5079822857\",\"display_name\":\"Moses John Strydom\",\"orcid\":\"https://orcid.org/0000-0002-8865-7474\"},\"institutions\":[{\"id\":\"https://openalex.org/I165390105\",\"display_name\":\"University of South Africa\",\"ror\":\"https://ror.org/048cwvf49\",\"country_code\":\"ZA\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I165390105\"]}],\"countries\":[\"ZA\"],\"is_corresponding\":false,\"raw_author_name\":\"Moses John Strydom\",\"raw_affiliation_string\":\"University of South Africa, South Africa\",\"raw_affiliation_strings\":[\"University of South Africa, South Africa\"]},{\"author_position\":\"last\",\"author\":{\"id\":\"https://openalex.org/A5016670485\",\"display_name\":\"Sheryl Buckley\",\"orcid\":\"https://orcid.org/0000-0002-2393-4741\"},\"institutions\":[{\"id\":\"https://openalex.org/I165390105\",\"display_name\":\"University of South Africa\",\"ror\":\"https://ror.org/048cwvf49\",\"country_code\":\"ZA\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I165390105\"]}],\"countries\":[\"ZA\"],\"is_corresponding\":false,\"raw_author_name\":\"Sheryl Buckley\",\"raw_affiliation_string\":\"University of South Africa, South Africa\",\"raw_affiliation_strings\":[\"University of South Africa, South Africa\"]}],\"countries_distinct_count\":1,\"institutions_distinct_count\":1,\"corresponding_author_ids\":[],\"corresponding_institution_ids\":[],\"apc_list\":null,\"apc_paid\":null,\"has_fulltext\":false,\"cited_by_count\":0,\"cited_by_percentile_year\":{\"min\":0,\"max\":67},\"biblio\":{\"volume\":null,\"issue\":null,\"first_page\":\"2027\",\"last_page\":\"2057\"},\"is_retracted\":false,\"is_paratext\":false,\"primary_topic\":{\"id\":\"https://openalex.org/T11891\",\"display_name\":\"Impact of Big Data Analytics on Business Performance\",\"score\":0.9997,\"subfield\":{\"id\":\"https://openalex.org/subfields/1404\",\"display_name\":\"Management Information Systems\"},\"field\":{\"id\":\"https://openalex.org/fields/14\",\"display_name\":\"Business, Management and Accounting\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}},\"topics\":[{\"id\":\"https://openalex.org/T11891\",\"display_name\":\"Impact of Big Data Analytics on Business Performance\",\"score\":0.9997,\"subfield\":{\"id\":\"https://openalex.org/subfields/1404\",\"display_name\":\"Management Information Systems\"},\"field\":{\"id\":\"https://openalex.org/fields/14\",\"display_name\":\"Business, Management and Accounting\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}},{\"id\":\"https://openalex.org/T14280\",\"display_name\":\"Impact of Big Data on Society and Industry\",\"score\":0.9881,\"subfield\":{\"id\":\"https://openalex.org/subfields/1802\",\"display_name\":\"Information Systems and Management\"},\"field\":{\"id\":\"https://openalex.org/fields/18\",\"display_name\":\"Decision Sciences\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}},{\"id\":\"https://openalex.org/T11719\",\"display_name\":\"Data Quality Assessment and Improvement\",\"score\":0.9859,\"subfield\":{\"id\":\"https://openalex.org/subfields/1803\",\"display_name\":\"Management Science and Operations Research\"},\"field\":{\"id\":\"https://openalex.org/fields/18\",\"display_name\":\"Decision Sciences\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}}],\"keywords\":[{\"keyword\":\"big data research ecosystem\",\"score\":0.9748},{\"keyword\":\"big data\",\"score\":0.6606}],\"concepts\":[{\"id\":\"https://openalex.org/C75684735\",\"wikidata\":\"https://www.wikidata.org/wiki/Q858810\",\"display_name\":\"Big data\",\"level\":2,\"score\":0.8965882},{\"id\":\"https://openalex.org/C2522767166\",\"wikidata\":\"https://www.wikidata.org/wiki/Q2374463\",\"display_name\":\"Data science\",\"level\":1,\"score\":0.73832947},{\"id\":\"https://openalex.org/C9652623\",\"wikidata\":\"https://www.wikidata.org/wiki/Q190109\",\"display_name\":\"Field (mathematics)\",\"level\":2,\"score\":0.63086545},{\"id\":\"https://openalex.org/C63882131\",\"wikidata\":\"https://www.wikidata.org/wiki/Q17122954\",\"display_name\":\"Strengths and weaknesses\",\"level\":2,\"score\":0.5127207},{\"id\":\"https://openalex.org/C2776291640\",\"wikidata\":\"https://www.wikidata.org/wiki/Q2912517\",\"display_name\":\"Value (mathematics)\",\"level\":2,\"score\":0.500679},{\"id\":\"https://openalex.org/C98045186\",\"wikidata\":\"https://www.wikidata.org/wiki/Q205663\",\"display_name\":\"Process (computing)\",\"level\":2,\"score\":0.47819757},{\"id\":\"https://openalex.org/C539667460\",\"wikidata\":\"https://www.wikidata.org/wiki/Q2414942\",\"display_name\":\"Management science\",\"level\":1,\"score\":0.3904409},{\"id\":\"https://openalex.org/C41008148\",\"wikidata\":\"https://www.wikidata.org/wiki/Q21198\",\"display_name\":\"Computer science\",\"level\":0,\"score\":0.38717905},{\"id\":\"https://openalex.org/C55587333\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1133029\",\"display_name\":\"Engineering ethics\",\"level\":1,\"score\":0.33696997},{\"id\":\"https://openalex.org/C127413603\",\"wikidata\":\"https://www.wikidata.org/wiki/Q11023\",\"display_name\":\"Engineering\",\"level\":0,\"score\":0.20919424},{\"id\":\"https://openalex.org/C124101348\",\"wikidata\":\"https://www.wikidata.org/wiki/Q172491\",\"display_name\":\"Data mining\",\"level\":1,\"score\":0.09868121},{\"id\":\"https://openalex.org/C111472728\",\"wikidata\":\"https://www.wikidata.org/wiki/Q9471\",\"display_name\":\"Epistemology\",\"level\":1,\"score\":0.09483838},{\"id\":\"https://openalex.org/C33923547\",\"wikidata\":\"https://www.wikidata.org/wiki/Q395\",\"display_name\":\"Mathematics\",\"level\":0,\"score\":0.0},{\"id\":\"https://openalex.org/C119857082\",\"wikidata\":\"https://www.wikidata.org/wiki/Q2539\",\"display_name\":\"Machine learning\",\"level\":1,\"score\":0.0},{\"id\":\"https://openalex.org/C202444582\",\"wikidata\":\"https://www.wikidata.org/wiki/Q837863\",\"display_name\":\"Pure mathematics\",\"level\":1,\"score\":0.0},{\"id\":\"https://openalex.org/C111919701\",\"wikidata\":\"https://www.wikidata.org/wiki/Q9135\",\"display_name\":\"Operating system\",\"level\":1,\"score\":0.0},{\"id\":\"https://openalex.org/C138885662\",\"wikidata\":\"https://www.wikidata.org/wiki/Q5891\",\"display_name\":\"Philosophy\",\"level\":0,\"score\":0.0}],\"mesh\":[],\"locations_count\":1,\"locations\":[{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.4018/978-1-7998-7705-9.ch090\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4306463409\",\"display_name\":\"IGI Global eBooks\",\"issn_l\":null,\"issn\":null,\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310320424\",\"host_organization_name\":\"IGI Global\",\"host_organization_lineage\":[\"https://openalex.org/P4310320424\"],\"host_organization_lineage_names\":[\"IGI Global\"],\"type\":\"ebook platform\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false}],\"best_oa_location\":null,\"sustainable_development_goals\":[],\"grants\":[],\"referenced_works_count\":55,\"referenced_works\":[\"https://openalex.org/W174892117\",\"https://openalex.org/W841229804\",\"https://openalex.org/W916305875\",\"https://openalex.org/W1177011000\",\"https://openalex.org/W1729469618\",\"https://openalex.org/W1967228906\",\"https://openalex.org/W2007338412\",\"https://openalex.org/W2043896876\",\"https://openalex.org/W2109574129\",\"https://openalex.org/W2118023920\",\"https://openalex.org/W2159128662\",\"https://openalex.org/W2202488771\",\"https://openalex.org/W2261525379\",\"https://openalex.org/W2269816967\",\"https://openalex.org/W2276640131\",\"https://openalex.org/W2287388632\",\"https://openalex.org/W2290480557\",\"https://openalex.org/W2307193480\",\"https://openalex.org/W2379922473\",\"https://openalex.org/W2393015989\",\"https://openalex.org/W2395492686\",\"https://openalex.org/W2398958885\",\"https://openalex.org/W2412675936\",\"https://openalex.org/W2417029388\",\"https://openalex.org/W2468725466\",\"https://openalex.org/W2506205276\",\"https://openalex.org/W2529628152\",\"https://openalex.org/W2533835508\",\"https://openalex.org/W2557108776\",\"https://openalex.org/W2571665755\",\"https://openalex.org/W2582605192\",\"https://openalex.org/W2583655187\",\"https://openalex.org/W2589699175\",\"https://openalex.org/W2593865443\",\"https://openalex.org/W2603280631\",\"https://openalex.org/W2605195075\",\"https://openalex.org/W2605610514\",\"https://openalex.org/W2605660454\",\"https://openalex.org/W2624543473\",\"https://openalex.org/W2734575787\",\"https://openalex.org/W2736503637\",\"https://openalex.org/W2739265471\",\"https://openalex.org/W2750764235\",\"https://openalex.org/W2753588101\",\"https://openalex.org/W2755741740\",\"https://openalex.org/W2763310390\",\"https://openalex.org/W2763473974\",\"https://openalex.org/W2765564498\",\"https://openalex.org/W2766908073\",\"https://openalex.org/W2767547957\",\"https://openalex.org/W2772452442\",\"https://openalex.org/W2774112958\",\"https://openalex.org/W2788448133\",\"https://openalex.org/W2802730911\",\"https://openalex.org/W3099185017\"],\"related_works\":[\"https://openalex.org/W4390608645\",\"https://openalex.org/W4233347783\",\"https://openalex.org/W4295769391\",\"https://openalex.org/W4247566972\",\"https://openalex.org/W2960264696\",\"https://openalex.org/W3090563135\",\"https://openalex.org/W2497432351\",\"https://openalex.org/W4206777497\",\"https://openalex.org/W2972220648\",\"https://openalex.org/W2910064364\"],\"ngrams_url\":\"https://api.openalex.org/works/W4239223537/ngrams\",\"abstract_inverted_index\":{\"Big\":[0],\"data\":[1,28,102,127],\"is\":[2,30,34],\"the\":[3,26,53,96],\"emerging\":[4],\"field\":[5,54,99],\"where\":[6],\"innovative\":[7],\"technology\":[8,46],\"offers\":[9],\"new\":[10],\"ways\":[11],\"to\":[12,36,55,110,141],\"extract\":[13],\"value\":[14],\"from\":[15],\"an\":[16,88],\"unequivocal\":[17],\"plethora\":[18],\"of\":[19,74,92,100,113,125],\"available\":[20],\"information.\":[21],\"By\":[22],\"its\":[23],\"fundamental\":[24],\"characteristic,\":[25],\"big\":[27,101,126,143],\"ecosystem\":[29],\"highly\":[31],\"conjectural\":[32],\"and\":[33,38,47,67,82,116,134,138],\"susceptible\":[35],\"continuous\":[37],\"rapid\":[39],\"evolution\":[40],\"in\":[41,45,57,95,122],\"line\":[42],\"with\":[43],\"developments\":[44],\"opportunities,\":[48],\"a\":[49,71],\"situation\":[50],\"that\":[51],\"predisposes\":[52],\"research\":[56,103],\"very\":[58],\"brief\":[59],\"time\":[60],\"spans.\":[61],\"Against\":[62],\"this\":[63],\"background,\":[64],\"both\":[65],\"academics\":[66],\"practitioners\":[68],\"oddly\":[69],\"have\":[70],\"limited\":[72],\"understanding\":[73],\"how\":[75],\"organizations\":[76],\"translate\":[77],\"potential\":[78],\"into\":[79],\"actual\":[80],\"social\":[81],\"economic\":[83],\"value.\":[84],\"This\":[85],\"chapter\":[86],\"conducts\":[87],\"in-depth\":[89],\"systematic\":[90],\"review\":[91],\"existing\":[93],\"penchants\":[94],\"rapidly\":[97],\"developing\":[98],\"and,\":[104],\"thereafter,\":[105],\"systematically\":[106],\"reviewed\":[107],\"these\":[108],\"studies\":[109],\"identify\":[111],\"some\":[112],\"their\":[114],\"weaknesses\":[115],\"challenges.\":[117],\"The\":[118],\"authors\":[119],\"argue\":[120],\"that,\":[121],\"practice,\":[123],\"most\":[124],\"surveys\":[128],\"do\":[129],\"not\":[130],\"focus\":[131],\"on\":[132],\"technologies,\":[133],\"instead\":[135],\"present\":[136],\"algorithms\":[137],\"approaches\":[139],\"employed\":[140],\"process\":[142],\"data.\":[144]},\"cited_by_api_url\":\"https://api.openalex.org/works?filter=cites:W4239223537\",\"counts_by_year\":[],\"updated_date\":\"2024-02-25T19:34:08.400474\",\"created_date\":\"2022-05-12\"},{\"id\":\"https://openalex.org/W78857221\",\"doi\":null,\"title\":\"RELATIVE BIOLOGICAL EFFECTIVENESS OF HIGH ENERGY PROTONS AFFECTING CABBAGE SEEDS\",\"display_name\":\"RELATIVE BIOLOGICAL EFFECTIVENESS OF HIGH ENERGY PROTONS AFFECTING CABBAGE SEEDS\",\"relevance_score\":0.99999994,\"publication_year\":1966,\"publication_date\":\"1966-08-01\",\"ids\":{\"openalex\":\"https://openalex.org/W78857221\",\"mag\":\"78857221\"},\"language\":\"de\",\"primary_location\":{\"is_oa\":false,\"landing_page_url\":\"http://www.osti.gov/scitech/biblio/4528110\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4210171837\",\"display_name\":\"Genetika\",\"issn_l\":\"0534-0012\",\"issn\":[\"1820-6069\",\"0534-0012\"],\"is_oa\":true,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310321594\",\"host_organization_name\":\"Serbian Genetics Society\",\"host_organization_lineage\":[\"https://openalex.org/P4310321594\"],\"host_organization_lineage_names\":[\"Serbian Genetics Society\"],\"type\":\"journal\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false},\"type\":\"article\",\"type_crossref\":\"journal-article\",\"indexed_in\":[],\"open_access\":{\"is_oa\":false,\"oa_status\":\"closed\",\"oa_url\":null,\"any_repository_has_fulltext\":false},\"authorships\":[{\"author_position\":\"first\",\"author\":{\"id\":\"https://openalex.org/A5007998022\",\"display_name\":\"L.V. Nevzgodina\",\"orcid\":null},\"institutions\":[],\"countries\":[],\"is_corresponding\":false,\"raw_author_name\":\"L.V. Nevzgodina\",\"raw_affiliation_string\":\"\",\"raw_affiliation_strings\":[]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5068277177\",\"display_name\":\"\\u0412. \\u0413. \\u041a\\u0443\\u0437\\u043d\\u0435\\u0446\\u043e\\u0432\",\"orcid\":\"https://orcid.org/0000-0003-1996-0055\"},\"institutions\":[],\"countries\":[],\"is_corresponding\":false,\"raw_author_name\":\"V.G. Kuznetsov\",\"raw_affiliation_string\":\"\",\"raw_affiliation_strings\":[]},{\"author_position\":\"last\",\"author\":{\"id\":\"https://openalex.org/A5004871662\",\"display_name\":\"Sychkov\",\"orcid\":null},\"institutions\":[],\"countries\":[],\"is_corresponding\":false,\"raw_author_name\":\"Sychkov\",\"raw_affiliation_string\":\"\",\"raw_affiliation_strings\":[]}],\"countries_distinct_count\":0,\"institutions_distinct_count\":0,\"corresponding_author_ids\":[],\"corresponding_institution_ids\":[],\"apc_list\":null,\"apc_paid\":null,\"has_fulltext\":false,\"cited_by_count\":0,\"cited_by_percentile_year\":{\"min\":0,\"max\":66},\"biblio\":{\"volume\":null,\"issue\":null,\"first_page\":null,\"last_page\":null},\"is_retracted\":false,\"is_paratext\":false,\"primary_topic\":{\"id\":\"https://openalex.org/T12976\",\"display_name\":\"Influence of Magnetic Fields on Biological Systems\",\"score\":0.1936,\"subfield\":{\"id\":\"https://openalex.org/subfields/1314\",\"display_name\":\"Physiology\"},\"field\":{\"id\":\"https://openalex.org/fields/13\",\"display_name\":\"Biochemistry, Genetics and Molecular Biology\"},\"domain\":{\"id\":\"https://openalex.org/domains/1\",\"display_name\":\"Life Sciences\"}},\"topics\":[{\"id\":\"https://openalex.org/T12976\",\"display_name\":\"Influence of Magnetic Fields on Biological Systems\",\"score\":0.1936,\"subfield\":{\"id\":\"https://openalex.org/subfields/1314\",\"display_name\":\"Physiology\"},\"field\":{\"id\":\"https://openalex.org/fields/13\",\"display_name\":\"Biochemistry, Genetics and Molecular Biology\"},\"domain\":{\"id\":\"https://openalex.org/domains/1\",\"display_name\":\"Life Sciences\"}},{\"id\":\"https://openalex.org/T12639\",\"display_name\":\"Global Energy Transition and Fossil Fuel Depletion\",\"score\":0.1922,\"subfield\":{\"id\":\"https://openalex.org/subfields/2105\",\"display_name\":\"Renewable Energy, Sustainability and the Environment\"},\"field\":{\"id\":\"https://openalex.org/fields/21\",\"display_name\":\"Energy\"},\"domain\":{\"id\":\"https://openalex.org/domains/3\",\"display_name\":\"Physical Sciences\"}},{\"id\":\"https://openalex.org/T13776\",\"display_name\":\"Medicinal and Therapeutic Potential of Sea Buckthorn\",\"score\":0.1719,\"subfield\":{\"id\":\"https://openalex.org/subfields/2707\",\"display_name\":\"Complementary and alternative medicine\"},\"field\":{\"id\":\"https://openalex.org/fields/27\",\"display_name\":\"Medicine\"},\"domain\":{\"id\":\"https://openalex.org/domains/4\",\"display_name\":\"Health Sciences\"}}],\"keywords\":[{\"keyword\":\"cabbage seeds\",\"score\":0.622},{\"keyword\":\"high energy protons\",\"score\":0.5826},{\"keyword\":\"relative biological effectiveness\",\"score\":0.2662}],\"concepts\":[{\"id\":\"https://openalex.org/C39432304\",\"wikidata\":\"https://www.wikidata.org/wiki/Q188847\",\"display_name\":\"Environmental science\",\"level\":0,\"score\":0.39743245},{\"id\":\"https://openalex.org/C86803240\",\"wikidata\":\"https://www.wikidata.org/wiki/Q420\",\"display_name\":\"Biology\",\"level\":0,\"score\":0.36749262},{\"id\":\"https://openalex.org/C144027150\",\"wikidata\":\"https://www.wikidata.org/wiki/Q48803\",\"display_name\":\"Horticulture\",\"level\":1,\"score\":0.34196246}],\"mesh\":[],\"locations_count\":1,\"locations\":[{\"is_oa\":false,\"landing_page_url\":\"http://www.osti.gov/scitech/biblio/4528110\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4210171837\",\"display_name\":\"Genetika\",\"issn_l\":\"0534-0012\",\"issn\":[\"1820-6069\",\"0534-0012\"],\"is_oa\":true,\"is_in_doaj\":false,\"host_organization\":\"https://openalex.org/P4310321594\",\"host_organization_name\":\"Serbian Genetics Society\",\"host_organization_lineage\":[\"https://openalex.org/P4310321594\"],\"host_organization_lineage_names\":[\"Serbian Genetics Society\"],\"type\":\"journal\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false}],\"best_oa_location\":null,\"sustainable_development_goals\":[{\"score\":0.53,\"id\":\"https://metadata.un.org/sdg/2\",\"display_name\":\"Zero hunger\"}],\"grants\":[],\"referenced_works_count\":0,\"referenced_works\":[],\"related_works\":[\"https://openalex.org/W7475701\",\"https://openalex.org/W17057142\",\"https://openalex.org/W22326495\",\"https://openalex.org/W72313218\",\"https://openalex.org/W91982152\",\"https://openalex.org/W98590474\",\"https://openalex.org/W126479662\",\"https://openalex.org/W135474527\",\"https://openalex.org/W136277763\",\"https://openalex.org/W137814310\",\"https://openalex.org/W206653402\",\"https://openalex.org/W234420188\",\"https://openalex.org/W241081558\",\"https://openalex.org/W278696559\",\"https://openalex.org/W329171942\",\"https://openalex.org/W865308638\",\"https://openalex.org/W1993604795\",\"https://openalex.org/W2266389294\",\"https://openalex.org/W2270463542\",\"https://openalex.org/W3194140224\"],\"ngrams_url\":\"https://api.openalex.org/works/W78857221/ngrams\",\"abstract_inverted_index\":null,\"cited_by_api_url\":\"https://api.openalex.org/works?filter=cites:W78857221\",\"counts_by_year\":[],\"updated_date\":\"2024-02-25T13:03:22.988032\",\"created_date\":\"2016-06-24\"},{\"id\":\"https://openalex.org/W2358372115\",\"doi\":null,\"title\":\"Reasons and Preventions of the Credit Risk with Village Banks\",\"display_name\":\"Reasons and Preventions of the Credit Risk with Village Banks\",\"relevance_score\":0.99999994,\"publication_year\":2012,\"publication_date\":\"2012-01-01\",\"ids\":{\"openalex\":\"https://openalex.org/W2358372115\",\"mag\":\"2358372115\"},\"language\":\"en\",\"primary_location\":{\"is_oa\":false,\"landing_page_url\":\"https://en.cnki.com.cn/Article_en/CJFDTOTAL-SQZJ201203023.htm\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S2764379636\",\"display_name\":\"Journal of Shangqiu Vocational and Technical College\",\"issn_l\":null,\"issn\":null,\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":null,\"host_organization_name\":null,\"host_organization_lineage\":[],\"host_organization_lineage_names\":[],\"type\":\"journal\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false},\"type\":\"article\",\"type_crossref\":\"journal-article\",\"indexed_in\":[],\"open_access\":{\"is_oa\":false,\"oa_status\":\"closed\",\"oa_url\":null,\"any_repository_has_fulltext\":false},\"authorships\":[{\"author_position\":\"first\",\"author\":{\"id\":\"https://openalex.org/A5072691128\",\"display_name\":\"Ying Pang\",\"orcid\":\"https://orcid.org/0000-0001-6195-2150\"},\"institutions\":[{\"id\":\"https://openalex.org/I40963666\",\"display_name\":\"Central China Normal University\",\"ror\":\"https://ror.org/03x1jna21\",\"country_code\":\"CN\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I40963666\"]}],\"countries\":[\"CN\"],\"is_corresponding\":true,\"raw_author_name\":\"Pang Ying\",\"raw_affiliation_string\":\"Economic College, Central China Normal University, Wuhan 430079, China )\",\"raw_affiliation_strings\":[\"Economic College, Central China Normal University, Wuhan 430079, China )\"]}],\"countries_distinct_count\":1,\"institutions_distinct_count\":1,\"corresponding_author_ids\":[\"https://openalex.org/A5072691128\"],\"corresponding_institution_ids\":[\"https://openalex.org/I40963666\"],\"apc_list\":null,\"apc_paid\":null,\"has_fulltext\":false,\"cited_by_count\":0,\"cited_by_percentile_year\":{\"min\":0,\"max\":70},\"biblio\":{\"volume\":null,\"issue\":null,\"first_page\":null,\"last_page\":null},\"is_retracted\":false,\"is_paratext\":false,\"primary_topic\":{\"id\":\"https://openalex.org/T10987\",\"display_name\":\"Microfinance, Gender Empowerment, and Economic Development\",\"score\":0.7316,\"subfield\":{\"id\":\"https://openalex.org/subfields/2002\",\"display_name\":\"Economics and Econometrics\"},\"field\":{\"id\":\"https://openalex.org/fields/20\",\"display_name\":\"Economics, Econometrics and Finance\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}},\"topics\":[{\"id\":\"https://openalex.org/T10987\",\"display_name\":\"Microfinance, Gender Empowerment, and Economic Development\",\"score\":0.7316,\"subfield\":{\"id\":\"https://openalex.org/subfields/2002\",\"display_name\":\"Economics and Econometrics\"},\"field\":{\"id\":\"https://openalex.org/fields/20\",\"display_name\":\"Economics, Econometrics and Finance\"},\"domain\":{\"id\":\"https://openalex.org/domains/2\",\"display_name\":\"Social Sciences\"}}],\"keywords\":[{\"keyword\":\"credit risk\",\"score\":0.6668},{\"keyword\":\"preventions\",\"score\":0.2534}],\"concepts\":[{\"id\":\"https://openalex.org/C178350159\",\"wikidata\":\"https://www.wikidata.org/wiki/Q162714\",\"display_name\":\"Credit risk\",\"level\":2,\"score\":0.69062895},{\"id\":\"https://openalex.org/C182306322\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1779371\",\"display_name\":\"Order (exchange)\",\"level\":2,\"score\":0.6181609},{\"id\":\"https://openalex.org/C144133560\",\"wikidata\":\"https://www.wikidata.org/wiki/Q4830453\",\"display_name\":\"Business\",\"level\":0,\"score\":0.6125847},{\"id\":\"https://openalex.org/C24308983\",\"wikidata\":\"https://www.wikidata.org/wiki/Q5183781\",\"display_name\":\"Credit reference\",\"level\":3,\"score\":0.59351885},{\"id\":\"https://openalex.org/C68842666\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1070699\",\"display_name\":\"Credit history\",\"level\":2,\"score\":0.57673407},{\"id\":\"https://openalex.org/C31348098\",\"wikidata\":\"https://www.wikidata.org/wiki/Q3423719\",\"display_name\":\"Credit enhancement\",\"level\":4,\"score\":0.5681863},{\"id\":\"https://openalex.org/C2982805371\",\"wikidata\":\"https://www.wikidata.org/wiki/Q104493\",\"display_name\":\"Risk prevention\",\"level\":2,\"score\":0.48103765},{\"id\":\"https://openalex.org/C180879305\",\"wikidata\":\"https://www.wikidata.org/wiki/Q590998\",\"display_name\":\"Credit crunch\",\"level\":2,\"score\":0.43411663},{\"id\":\"https://openalex.org/C10138342\",\"wikidata\":\"https://www.wikidata.org/wiki/Q43015\",\"display_name\":\"Finance\",\"level\":1,\"score\":0.41794646},{\"id\":\"https://openalex.org/C73283319\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1416617\",\"display_name\":\"Financial system\",\"level\":1,\"score\":0.36988437},{\"id\":\"https://openalex.org/C162118730\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1128453\",\"display_name\":\"Actuarial science\",\"level\":1,\"score\":0.34195477},{\"id\":\"https://openalex.org/C112930515\",\"wikidata\":\"https://www.wikidata.org/wiki/Q4389547\",\"display_name\":\"Risk analysis (engineering)\",\"level\":1,\"score\":0.22332808}],\"mesh\":[],\"locations_count\":1,\"locations\":[{\"is_oa\":false,\"landing_page_url\":\"https://en.cnki.com.cn/Article_en/CJFDTOTAL-SQZJ201203023.htm\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S2764379636\",\"display_name\":\"Journal of Shangqiu Vocational and Technical College\",\"issn_l\":null,\"issn\":null,\"is_oa\":false,\"is_in_doaj\":false,\"host_organization\":null,\"host_organization_name\":null,\"host_organization_lineage\":[],\"host_organization_lineage_names\":[],\"type\":\"journal\"},\"license\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false}],\"best_oa_location\":null,\"sustainable_development_goals\":[],\"grants\":[],\"referenced_works_count\":0,\"referenced_works\":[],\"related_works\":[\"https://openalex.org/W2348633948\",\"https://openalex.org/W2351788559\",\"https://openalex.org/W2354090623\",\"https://openalex.org/W2355993715\",\"https://openalex.org/W2357332618\",\"https://openalex.org/W2358595772\",\"https://openalex.org/W2359558374\",\"https://openalex.org/W2361023201\",\"https://openalex.org/W2364845452\",\"https://openalex.org/W2364984641\",\"https://openalex.org/W2365176669\",\"https://openalex.org/W2369743027\",\"https://openalex.org/W2374288397\",\"https://openalex.org/W2379826515\",\"https://openalex.org/W2380611485\",\"https://openalex.org/W2385249515\",\"https://openalex.org/W2386016711\",\"https://openalex.org/W2388342831\",\"https://openalex.org/W2392239461\",\"https://openalex.org/W2393937760\"],\"ngrams_url\":\"https://api.openalex.org/works/W2358372115/ngrams\",\"abstract_inverted_index\":{\"Village\":[0],\"banks\":[1],\"are\":[2,23],\"the\":[3,7,26,34,38,45,51,54,57,61,73,76,90],\"core\":[4],\"strength\":[5],\"of\":[6,13,25,42,53,56,66,92],\"new\":[8],\"rural\":[9,30,68],\"financial\":[10,69],\"institutions.But\":[11],\"because\":[12],\"their\":[14],\"own\":[15],\"development\":[16,43],\"is\":[17],\"not\":[18],\"perfect\":[19],\"and\":[20,63,71,84,87],\"many\":[21],\"people\":[22],\"lack\":[24],\"credit\":[27,58,77,95],\"consciousness\":[28],\"in\":[29,37],\"area,credit\":[31],\"risk\":[32],\"becomes\":[33],\"outstanding\":[35],\"problem\":[36],\"village\":[39,93],\"banks'\":[40,94],\"process\":[41],\"at\":[44],\"present\":[46],\"stage.This\":[47],\"article\":[48],\"starts\":[49],\"from\":[50],\"form\":[52],\"expression\":[55],\"risk,combining\":[59],\"with\":[60,75,89],\"characteristic\":[62],\"special\":[64],\"status\":[65],\"our\":[67],\"market.Analyzing\":[70],\"discussing\":[72],\"reasons\":[74],\"risk,in\":[78],\"order\":[79],\"putting\":[80],\"forward\":[81],\"some\":[82],\"positive\":[83],\"effective\":[85],\"countermeasures\":[86],\"suggestions\":[88],\"prevention\":[91],\"risk.\":[96]},\"cited_by_api_url\":\"https://api.openalex.org/works?filter=cites:W2358372115\",\"counts_by_year\":[],\"updated_date\":\"2024-03-01T20:11:08.405481\",\"created_date\":\"2016-06-24\"}],\"group_by\":[]}\r\n", + "items": [ + { + "itemType": "journalArticle", + "title": "On the audibility of amplifier phase distortion", + "creators": [ + { + "firstName": "G.", + "lastName": "Wentworth", + "creatorType": "author" + } + ], + "date": "1965-07-01", + "DOI": "10.1109/tau.1965.1161805", + "ISSN": "1558-2663", + "extra": "OpenAlex: https://openalex.org/W2046245907", + "issue": "4", + "language": "en", + "pages": "99", + "publicationTitle": "IEEE Transactions on Audio", + "volume": "AU-13", + "attachments": [], + "tags": [ + { + "tag": "amplifier phase distortion" + }, + { + "tag": "audibility" + } + ], + "notes": [], + "seeAlso": [] + }, + { + "itemType": "journalArticle", + "title": "Notices", + "creators": [], + "date": "1983-01-13", + "DOI": "10.1056/nejm198301133080228", + "ISSN": "0028-4793", + "extra": "OpenAlex: https://openalex.org/W4237963058", + "issue": "2", + "pages": "112", + "publicationTitle": "The New England Journal of Medicine", + "volume": "308", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + }, + { + "itemType": "bookSection", + "title": "The Big Data Research Ecosystem", + "creators": [ + { + "firstName": "Moses John", + "lastName": "Strydom", + "creatorType": "author" + }, + { + "firstName": "Sheryl", + "lastName": "Buckley", + "creatorType": "author" + } + ], + "date": "2020-11-27", + "bookTitle": "IGI Global eBooks", + "extra": "OpenAlex: https://openalex.org/W4239223537", + "language": "en", + "pages": "2027-2057", + "publisher": "IGI Global", + "attachments": [], + "tags": [ + { + "tag": "big data" + }, + { + "tag": "big data research ecosystem" + } + ], + "notes": [], + "seeAlso": [] + }, + { + "itemType": "journalArticle", + "title": "Relative Biological Effectiveness of High Energy Protons Affecting Cabbage Seeds", + "creators": [ + { + "firstName": "L. V.", + "lastName": "Nevzgodina", + "creatorType": "author" + }, + { + "firstName": "В. Г.", + "lastName": "Кузнецов", + "creatorType": "author" + }, + { + "firstName": "", + "lastName": "Sychkov", + "creatorType": "author" + } + ], + "date": "1966-08-01", + "ISSN": "1820-6069", + "extra": "OpenAlex: https://openalex.org/W78857221", + "language": "de", + "publicationTitle": "Genetika", + "attachments": [], + "tags": [ + { + "tag": "cabbage seeds" + }, + { + "tag": "high energy protons" + }, + { + "tag": "relative biological effectiveness" + } + ], + "notes": [], + "seeAlso": [] + }, + { + "itemType": "journalArticle", + "title": "Reasons and Preventions of the Credit Risk with Village Banks", + "creators": [ + { + "firstName": "Ying", + "lastName": "Pang", + "creatorType": "author" + } + ], + "date": "2012-01-01", + "extra": "OpenAlex: https://openalex.org/W2358372115", + "language": "en", + "publicationTitle": "Journal of Shangqiu Vocational and Technical College", + "attachments": [], + "tags": [ + { + "tag": "credit risk" + }, + { + "tag": "preventions" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "import", + "input": "{\"id\":\"https://openalex.org/W2962935454\",\"doi\":null,\"title\":\"Generalizing to Unseen Domains via Adversarial Data Augmentation\",\"display_name\":\"Generalizing to Unseen Domains via Adversarial Data Augmentation\",\"publication_year\":2018,\"publication_date\":\"2018-05-01\",\"ids\":{\"openalex\":\"https://openalex.org/W2962935454\",\"mag\":\"2962935454\"},\"language\":\"en\",\"primary_location\":{\"is_oa\":false,\"landing_page_url\":\"https://papers.nips.cc/paper/7779-generalizing-to-unseen-domains-via-adversarial-data-augmentation.pdf\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4306420609\",\"display_name\":\"Neural Information Processing Systems\",\"issn_l\":null,\"issn\":null,\"is_oa\":false,\"is_in_doaj\":false,\"is_core\":false,\"host_organization\":null,\"host_organization_name\":null,\"host_organization_lineage\":[],\"host_organization_lineage_names\":[],\"type\":\"conference\"},\"license\":null,\"license_id\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false},\"type\":\"article\",\"type_crossref\":\"proceedings-article\",\"indexed_in\":[],\"open_access\":{\"is_oa\":false,\"oa_status\":\"closed\",\"oa_url\":null,\"any_repository_has_fulltext\":false},\"authorships\":[{\"author_position\":\"first\",\"author\":{\"id\":\"https://openalex.org/A5087171315\",\"display_name\":\"Riccardo Volpi\",\"orcid\":\"https://orcid.org/0000-0003-4485-9573\"},\"institutions\":[{\"id\":\"https://openalex.org/I30771326\",\"display_name\":\"Italian Institute of Technology\",\"ror\":\"https://ror.org/042t93s57\",\"country_code\":\"IT\",\"type\":\"facility\",\"lineage\":[\"https://openalex.org/I30771326\"]}],\"countries\":[\"IT\"],\"is_corresponding\":false,\"raw_author_name\":\"Riccardo Volpi\",\"raw_affiliation_strings\":[],\"affiliations\":[]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5008595840\",\"display_name\":\"Hongseok Namkoong\",\"orcid\":\"https://orcid.org/0000-0002-5708-4044\"},\"institutions\":[{\"id\":\"https://openalex.org/I78577930\",\"display_name\":\"Columbia University\",\"ror\":\"https://ror.org/00hj8s172\",\"country_code\":\"US\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I78577930\"]}],\"countries\":[\"US\"],\"is_corresponding\":false,\"raw_author_name\":\"Hongseok Namkoong\",\"raw_affiliation_strings\":[],\"affiliations\":[]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5026399398\",\"display_name\":\"Ozan \\u015eener\",\"orcid\":\"https://orcid.org/0000-0002-1542-7547\"},\"institutions\":[{\"id\":\"https://openalex.org/I205783295\",\"display_name\":\"Cornell University\",\"ror\":\"https://ror.org/05bnh6r87\",\"country_code\":\"US\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I205783295\"]}],\"countries\":[\"US\"],\"is_corresponding\":false,\"raw_author_name\":\"Ozan Sener\",\"raw_affiliation_strings\":[],\"affiliations\":[]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5061331093\",\"display_name\":\"John C. Duchi\",\"orcid\":\"https://orcid.org/0000-0003-0045-7185\"},\"institutions\":[{\"id\":\"https://openalex.org/I97018004\",\"display_name\":\"Stanford University\",\"ror\":\"https://ror.org/00f54p054\",\"country_code\":\"US\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I97018004\"]}],\"countries\":[\"US\"],\"is_corresponding\":false,\"raw_author_name\":\"John C. Duchi\",\"raw_affiliation_strings\":[],\"affiliations\":[]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5007242502\",\"display_name\":\"Vittorio Murino\",\"orcid\":\"https://orcid.org/0000-0002-8645-2328\"},\"institutions\":[{\"id\":\"https://openalex.org/I30771326\",\"display_name\":\"Italian Institute of Technology\",\"ror\":\"https://ror.org/042t93s57\",\"country_code\":\"IT\",\"type\":\"facility\",\"lineage\":[\"https://openalex.org/I30771326\"]}],\"countries\":[\"IT\"],\"is_corresponding\":false,\"raw_author_name\":\"Vittorio Murino\",\"raw_affiliation_strings\":[],\"affiliations\":[]},{\"author_position\":\"last\",\"author\":{\"id\":\"https://openalex.org/A5042646536\",\"display_name\":\"Silvio Savarese\",\"orcid\":null},\"institutions\":[{\"id\":\"https://openalex.org/I97018004\",\"display_name\":\"Stanford University\",\"ror\":\"https://ror.org/00f54p054\",\"country_code\":\"US\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I97018004\"]}],\"countries\":[\"US\"],\"is_corresponding\":false,\"raw_author_name\":\"Silvio Savarese\",\"raw_affiliation_strings\":[],\"affiliations\":[]}],\"countries_distinct_count\":2,\"institutions_distinct_count\":4,\"corresponding_author_ids\":[],\"corresponding_institution_ids\":[],\"apc_list\":null,\"apc_paid\":null,\"fwci\":11.363,\"has_fulltext\":false,\"cited_by_count\":142,\"cited_by_percentile_year\":{\"min\":99,\"max\":100},\"biblio\":{\"volume\":\"31\",\"issue\":null,\"first_page\":\"5334\",\"last_page\":\"5344\"},\"is_retracted\":false,\"is_paratext\":false,\"primary_topic\":{\"id\":\"https://openalex.org/T11307\",\"display_name\":\"Advances in Transfer Learning and Domain Adaptation\",\"score\":0.9932,\"subfield\":{\"id\":\"https://openalex.org/subfields/1702\",\"display_name\":\"Artificial Intelligence\"},\"field\":{\"id\":\"https://openalex.org/fields/17\",\"display_name\":\"Computer Science\"},\"domain\":{\"id\":\"https://openalex.org/domains/3\",\"display_name\":\"Physical Sciences\"}},\"topics\":[{\"id\":\"https://openalex.org/T11307\",\"display_name\":\"Advances in Transfer Learning and Domain Adaptation\",\"score\":0.9932,\"subfield\":{\"id\":\"https://openalex.org/subfields/1702\",\"display_name\":\"Artificial Intelligence\"},\"field\":{\"id\":\"https://openalex.org/fields/17\",\"display_name\":\"Computer Science\"},\"domain\":{\"id\":\"https://openalex.org/domains/3\",\"display_name\":\"Physical Sciences\"}},{\"id\":\"https://openalex.org/T11689\",\"display_name\":\"Adversarial Robustness in Deep Learning Models\",\"score\":0.9897,\"subfield\":{\"id\":\"https://openalex.org/subfields/1702\",\"display_name\":\"Artificial Intelligence\"},\"field\":{\"id\":\"https://openalex.org/fields/17\",\"display_name\":\"Computer Science\"},\"domain\":{\"id\":\"https://openalex.org/domains/3\",\"display_name\":\"Physical Sciences\"}},{\"id\":\"https://openalex.org/T11775\",\"display_name\":\"Applications of Deep Learning in Medical Imaging\",\"score\":0.9777,\"subfield\":{\"id\":\"https://openalex.org/subfields/2741\",\"display_name\":\"Radiology, Nuclear Medicine and Imaging\"},\"field\":{\"id\":\"https://openalex.org/fields/27\",\"display_name\":\"Medicine\"},\"domain\":{\"id\":\"https://openalex.org/domains/4\",\"display_name\":\"Health Sciences\"}}],\"keywords\":[{\"id\":\"https://openalex.org/keywords/domain-adaptation\",\"display_name\":\"Domain Adaptation\",\"score\":0.6031},{\"id\":\"https://openalex.org/keywords/unsupervised-learning\",\"display_name\":\"Unsupervised Learning\",\"score\":0.565551},{\"id\":\"https://openalex.org/keywords/adversarial-examples\",\"display_name\":\"Adversarial Examples\",\"score\":0.563401},{\"id\":\"https://openalex.org/keywords/transfer-learning\",\"display_name\":\"Transfer Learning\",\"score\":0.559807},{\"id\":\"https://openalex.org/keywords/representation-learning\",\"display_name\":\"Representation Learning\",\"score\":0.526564}],\"concepts\":[{\"id\":\"https://openalex.org/C41008148\",\"wikidata\":\"https://www.wikidata.org/wiki/Q21198\",\"display_name\":\"Computer science\",\"level\":0,\"score\":0.6881822},{\"id\":\"https://openalex.org/C2776135515\",\"wikidata\":\"https://www.wikidata.org/wiki/Q17143721\",\"display_name\":\"Regularization (linguistics)\",\"level\":2,\"score\":0.67249304},{\"id\":\"https://openalex.org/C188441871\",\"wikidata\":\"https://www.wikidata.org/wiki/Q7554146\",\"display_name\":\"Softmax function\",\"level\":3,\"score\":0.6059211},{\"id\":\"https://openalex.org/C154945302\",\"wikidata\":\"https://www.wikidata.org/wiki/Q11660\",\"display_name\":\"Artificial intelligence\",\"level\":1,\"score\":0.5804972},{\"id\":\"https://openalex.org/C75553542\",\"wikidata\":\"https://www.wikidata.org/wiki/Q178161\",\"display_name\":\"A priori and a posteriori\",\"level\":2,\"score\":0.56781113},{\"id\":\"https://openalex.org/C36503486\",\"wikidata\":\"https://www.wikidata.org/wiki/Q11235244\",\"display_name\":\"Domain (mathematical analysis)\",\"level\":2,\"score\":0.47703072},{\"id\":\"https://openalex.org/C89600930\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1423946\",\"display_name\":\"Segmentation\",\"level\":2,\"score\":0.4638946},{\"id\":\"https://openalex.org/C77618280\",\"wikidata\":\"https://www.wikidata.org/wiki/Q1155772\",\"display_name\":\"Scheme (mathematics)\",\"level\":2,\"score\":0.45647982},{\"id\":\"https://openalex.org/C204323151\",\"wikidata\":\"https://www.wikidata.org/wiki/Q905424\",\"display_name\":\"Range (aeronautics)\",\"level\":2,\"score\":0.42658007},{\"id\":\"https://openalex.org/C2776401178\",\"wikidata\":\"https://www.wikidata.org/wiki/Q12050496\",\"display_name\":\"Feature (linguistics)\",\"level\":2,\"score\":0.42016298},{\"id\":\"https://openalex.org/C153180895\",\"wikidata\":\"https://www.wikidata.org/wiki/Q7148389\",\"display_name\":\"Pattern recognition (psychology)\",\"level\":2,\"score\":0.41843256},{\"id\":\"https://openalex.org/C83665646\",\"wikidata\":\"https://www.wikidata.org/wiki/Q42139305\",\"display_name\":\"Feature vector\",\"level\":2,\"score\":0.41224036},{\"id\":\"https://openalex.org/C159694833\",\"wikidata\":\"https://www.wikidata.org/wiki/Q2321565\",\"display_name\":\"Iterative method\",\"level\":2,\"score\":0.41180462},{\"id\":\"https://openalex.org/C11413529\",\"wikidata\":\"https://www.wikidata.org/wiki/Q8366\",\"display_name\":\"Algorithm\",\"level\":1,\"score\":0.40941933},{\"id\":\"https://openalex.org/C119857082\",\"wikidata\":\"https://www.wikidata.org/wiki/Q2539\",\"display_name\":\"Machine learning\",\"level\":1,\"score\":0.3678398},{\"id\":\"https://openalex.org/C80444323\",\"wikidata\":\"https://www.wikidata.org/wiki/Q2878974\",\"display_name\":\"Theoretical computer science\",\"level\":1,\"score\":0.3276114},{\"id\":\"https://openalex.org/C108583219\",\"wikidata\":\"https://www.wikidata.org/wiki/Q197536\",\"display_name\":\"Deep learning\",\"level\":2,\"score\":0.2830665},{\"id\":\"https://openalex.org/C33923547\",\"wikidata\":\"https://www.wikidata.org/wiki/Q395\",\"display_name\":\"Mathematics\",\"level\":0,\"score\":0.20898846},{\"id\":\"https://openalex.org/C134306372\",\"wikidata\":\"https://www.wikidata.org/wiki/Q7754\",\"display_name\":\"Mathematical analysis\",\"level\":1,\"score\":0.0},{\"id\":\"https://openalex.org/C138885662\",\"wikidata\":\"https://www.wikidata.org/wiki/Q5891\",\"display_name\":\"Philosophy\",\"level\":0,\"score\":0.0},{\"id\":\"https://openalex.org/C41895202\",\"wikidata\":\"https://www.wikidata.org/wiki/Q8162\",\"display_name\":\"Linguistics\",\"level\":1,\"score\":0.0},{\"id\":\"https://openalex.org/C192562407\",\"wikidata\":\"https://www.wikidata.org/wiki/Q228736\",\"display_name\":\"Materials science\",\"level\":0,\"score\":0.0},{\"id\":\"https://openalex.org/C111472728\",\"wikidata\":\"https://www.wikidata.org/wiki/Q9471\",\"display_name\":\"Epistemology\",\"level\":1,\"score\":0.0},{\"id\":\"https://openalex.org/C159985019\",\"wikidata\":\"https://www.wikidata.org/wiki/Q181790\",\"display_name\":\"Composite material\",\"level\":1,\"score\":0.0}],\"mesh\":[],\"locations_count\":1,\"locations\":[{\"is_oa\":false,\"landing_page_url\":\"https://papers.nips.cc/paper/7779-generalizing-to-unseen-domains-via-adversarial-data-augmentation.pdf\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4306420609\",\"display_name\":\"Neural Information Processing Systems\",\"issn_l\":null,\"issn\":null,\"is_oa\":false,\"is_in_doaj\":false,\"is_core\":false,\"host_organization\":null,\"host_organization_name\":null,\"host_organization_lineage\":[],\"host_organization_lineage_names\":[],\"type\":\"conference\"},\"license\":null,\"license_id\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false}],\"best_oa_location\":null,\"sustainable_development_goals\":[],\"grants\":[],\"datasets\":[],\"versions\":[],\"referenced_works_count\":0,\"referenced_works\":[],\"related_works\":[\"https://openalex.org/W2981368934\",\"https://openalex.org/W2970119729\",\"https://openalex.org/W2963838962\",\"https://openalex.org/W2963826681\",\"https://openalex.org/W2963118547\",\"https://openalex.org/W2963043696\",\"https://openalex.org/W2958360136\",\"https://openalex.org/W2894728917\",\"https://openalex.org/W2889965839\",\"https://openalex.org/W2798658180\",\"https://openalex.org/W2763549966\",\"https://openalex.org/W2593768305\",\"https://openalex.org/W2335728318\",\"https://openalex.org/W2194775991\",\"https://openalex.org/W2155858138\",\"https://openalex.org/W2112796928\",\"https://openalex.org/W2108598243\",\"https://openalex.org/W2104094955\",\"https://openalex.org/W1920962657\",\"https://openalex.org/W1731081199\"],\"ngrams_url\":\"https://api.openalex.org/works/W2962935454/ngrams\",\"abstract_inverted_index\":{\"We\":[0,13,63],\"are\":[1,22],\"concerned\":[2],\"with\":[3,49],\"learning\":[4],\"models\":[5,120],\"that\":[6,21,45,56,65,88,96,102],\"generalize\":[7],\"well\":[8],\"to\":[9],\"different\":[10],\"unseen\":[11],\"domains.\":[12,131],\"consider\":[14],\"a\":[15,36,52,92,124,127],\"worst-case\":[16],\"formulation\":[17],\"over\":[18],\"data\":[19,34,72],\"distributions\":[20],\"near\":[23],\"the\":[24,28,47,60],\"source\":[25,38],\"domain\":[26,55],\"in\":[27],\"feature\":[29],\"space.\":[30],\"Only\":[31],\"using\":[32],\"training\":[33],\"from\":[35,51,99],\"single\":[37],\"distribution,\":[39],\"we\":[40,76,86],\"propose\":[41],\"an\":[42,70],\"iterative\":[43,67],\"procedure\":[44],\"augments\":[46],\"dataset\":[48],\"examples\":[50,79],\"fictitious\":[53],\"target\":[54,130],\"is\":[57,69,91],\"hard\":[58],\"under\":[59],\"current\":[61],\"model.\":[62],\"show\":[64,87],\"our\":[66,89,117],\"scheme\":[68,95],\"adaptive\":[71],\"augmentation\":[73],\"method\":[74,90,118],\"where\":[75],\"append\":[77],\"adversarial\":[78],\"at\":[80],\"each\":[81],\"iteration.\":[82],\"For\":[83],\"softmax\":[84],\"losses,\":[85],\"data-dependent\":[93],\"regularization\":[94],\"behaves\":[97],\"differently\":[98],\"classical\":[100],\"regularizers\":[101],\"regularize\":[103],\"towards\":[104],\"zero\":[105],\"(e.g.,\":[106],\"ridge\":[107],\"or\":[108],\"lasso).\":[109],\"On\":[110],\"digit\":[111],\"recognition\":[112],\"and\":[113],\"semantic\":[114],\"segmentation\":[115],\"tasks,\":[116],\"learns\":[119],\"improve\":[121],\"performance\":[122],\"across\":[123],\"range\":[125],\"of\":[126],\"priori\":[128],\"unknown\":[129]},\"cited_by_api_url\":\"https://api.openalex.org/works?filter=cites:W2962935454\",\"counts_by_year\":[{\"year\":2022,\"cited_by_count\":1},{\"year\":2021,\"cited_by_count\":72},{\"year\":2020,\"cited_by_count\":43},{\"year\":2019,\"cited_by_count\":24},{\"year\":2018,\"cited_by_count\":2},{\"year\":2017,\"cited_by_count\":1}],\"updated_date\":\"2024-07-16T08:42:24.812785\",\"created_date\":\"2019-07-30\"}\n", + "items": [ + { + "itemType": "conferencePaper", + "title": "Generalizing to Unseen Domains via Adversarial Data Augmentation", + "creators": [ + { + "firstName": "Riccardo", + "lastName": "Volpi", + "creatorType": "author" + }, + { + "firstName": "Hongseok", + "lastName": "Namkoong", + "creatorType": "author" + }, + { + "firstName": "Ozan", + "lastName": "Şener", + "creatorType": "author" + }, + { + "firstName": "John C.", + "lastName": "Duchi", + "creatorType": "author" + }, + { + "firstName": "Vittorio", + "lastName": "Murino", + "creatorType": "author" + }, + { + "firstName": "Silvio", + "lastName": "Savarese", + "creatorType": "author" + } + ], + "date": "2018-05-01", + "extra": "OpenAlex: https://openalex.org/W2962935454", + "language": "en", + "pages": "5334-5344", + "proceedingsTitle": "Neural Information Processing Systems", + "volume": "31", + "attachments": [], + "tags": [ + { + "tag": "Adversarial Examples" + }, + { + "tag": "Domain Adaptation" + }, + { + "tag": "Representation Learning" + }, + { + "tag": "Transfer Learning" + }, + { + "tag": "Unsupervised Learning" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "import", + "input": "{\"id\":\"https://openalex.org/W2101234009\",\"doi\":\"https://doi.org/10.48550/arxiv.1201.0490\",\"title\":\"Scikit-learn: Machine Learning in Python\",\"display_name\":\"Scikit-learn: Machine Learning in Python\",\"publication_year\":2012,\"publication_date\":\"2012-01-01\",\"ids\":{\"openalex\":\"https://openalex.org/W2101234009\",\"doi\":\"https://doi.org/10.48550/arxiv.1201.0490\",\"mag\":\"2101234009\"},\"language\":\"en\",\"primary_location\":{\"is_oa\":true,\"landing_page_url\":\"https://arxiv.org/abs/1201.0490\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4306400194\",\"display_name\":\"arXiv (Cornell University)\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"is_core\":false,\"host_organization\":\"https://openalex.org/I205783295\",\"host_organization_name\":\"Cornell University\",\"host_organization_lineage\":[\"https://openalex.org/I205783295\"],\"host_organization_lineage_names\":[\"Cornell University\"],\"type\":\"repository\"},\"license\":\"other-oa\",\"license_id\":\"https://openalex.org/licenses/other-oa\",\"version\":null,\"is_accepted\":false,\"is_published\":false},\"type\":\"preprint\",\"type_crossref\":\"journal-article\",\"indexed_in\":[\"datacite\"],\"open_access\":{\"is_oa\":true,\"oa_status\":\"green\",\"oa_url\":\"https://arxiv.org/abs/1201.0490\",\"any_repository_has_fulltext\":true},\"authorships\":[{\"author_position\":\"first\",\"author\":{\"id\":\"https://openalex.org/A5066572762\",\"display_name\":\"Fabi\\u00e1n Pedregosa\",\"orcid\":\"https://orcid.org/0000-0003-4025-3953\"},\"institutions\":[{\"id\":\"https://openalex.org/I4210128565\",\"display_name\":\"CEA Saclay\",\"ror\":\"https://ror.org/03n15ch10\",\"country_code\":\"FR\",\"type\":\"government\",\"lineage\":[\"https://openalex.org/I2738703131\",\"https://openalex.org/I4210127723\",\"https://openalex.org/I4210128565\"]},{\"id\":\"https://openalex.org/I2738703131\",\"display_name\":\"Commissariat \\u00e0 l'\\u00c9nergie Atomique et aux \\u00c9nergies Alternatives\",\"ror\":\"https://ror.org/00jjx8s55\",\"country_code\":\"FR\",\"type\":\"government\",\"lineage\":[\"https://openalex.org/I2738703131\"]}],\"countries\":[\"FR\"],\"is_corresponding\":false,\"raw_author_name\":\"Fabian Pedregosa\",\"raw_affiliation_strings\":[\"LNAO - Laboratoire de Neuroimagerie Assist\\u00e9e par Ordinateur (France)\",\"PARIETAL - Modelling brain structure, function and variability based on high-field MRI data (Neurospin, CEA Saclay, B\\u00e2timent 145, 91191 Gif-sur-Yvette Cedex - France)\"],\"affiliations\":[{\"raw_affiliation_string\":\"PARIETAL - Modelling brain structure, function and variability based on high-field MRI data (Neurospin, CEA Saclay, B\\u00e2timent 145, 91191 Gif-sur-Yvette Cedex - France)\",\"institution_ids\":[\"https://openalex.org/I4210128565\",\"https://openalex.org/I2738703131\"]},{\"raw_affiliation_string\":\"LNAO - Laboratoire de Neuroimagerie Assist\\u00e9e par Ordinateur (France)\",\"institution_ids\":[]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5074733625\",\"display_name\":\"Ga\\u00ebl Varoquaux\",\"orcid\":\"https://orcid.org/0000-0003-1076-5122\"},\"institutions\":[{\"id\":\"https://openalex.org/I2738703131\",\"display_name\":\"Commissariat \\u00e0 l'\\u00c9nergie Atomique et aux \\u00c9nergies Alternatives\",\"ror\":\"https://ror.org/00jjx8s55\",\"country_code\":\"FR\",\"type\":\"government\",\"lineage\":[\"https://openalex.org/I2738703131\"]},{\"id\":\"https://openalex.org/I4210128565\",\"display_name\":\"CEA Saclay\",\"ror\":\"https://ror.org/03n15ch10\",\"country_code\":\"FR\",\"type\":\"government\",\"lineage\":[\"https://openalex.org/I2738703131\",\"https://openalex.org/I4210127723\",\"https://openalex.org/I4210128565\"]}],\"countries\":[\"FR\"],\"is_corresponding\":false,\"raw_author_name\":\"Ga\\u00ebl Varoquaux\",\"raw_affiliation_strings\":[\"LNAO - Laboratoire de Neuroimagerie Assist\\u00e9e par Ordinateur (France)\",\"PARIETAL - Modelling brain structure, function and variability based on high-field MRI data (Neurospin, CEA Saclay, B\\u00e2timent 145, 91191 Gif-sur-Yvette Cedex - France)\"],\"affiliations\":[{\"raw_affiliation_string\":\"LNAO - Laboratoire de Neuroimagerie Assist\\u00e9e par Ordinateur (France)\",\"institution_ids\":[]},{\"raw_affiliation_string\":\"PARIETAL - Modelling brain structure, function and variability based on high-field MRI data (Neurospin, CEA Saclay, B\\u00e2timent 145, 91191 Gif-sur-Yvette Cedex - France)\",\"institution_ids\":[\"https://openalex.org/I2738703131\",\"https://openalex.org/I4210128565\"]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5018256474\",\"display_name\":\"Alexandre Gramfort\",\"orcid\":\"https://orcid.org/0000-0001-9791-4404\"},\"institutions\":[{\"id\":\"https://openalex.org/I2738703131\",\"display_name\":\"Commissariat \\u00e0 l'\\u00c9nergie Atomique et aux \\u00c9nergies Alternatives\",\"ror\":\"https://ror.org/00jjx8s55\",\"country_code\":\"FR\",\"type\":\"government\",\"lineage\":[\"https://openalex.org/I2738703131\"]},{\"id\":\"https://openalex.org/I4210128565\",\"display_name\":\"CEA Saclay\",\"ror\":\"https://ror.org/03n15ch10\",\"country_code\":\"FR\",\"type\":\"government\",\"lineage\":[\"https://openalex.org/I2738703131\",\"https://openalex.org/I4210127723\",\"https://openalex.org/I4210128565\"]}],\"countries\":[\"FR\"],\"is_corresponding\":false,\"raw_author_name\":\"Alexandre Gramfort\",\"raw_affiliation_strings\":[\"LNAO - Laboratoire de Neuroimagerie Assist\\u00e9e par Ordinateur (France)\",\"PARIETAL - Modelling brain structure, function and variability based on high-field MRI data (Neurospin, CEA Saclay, B\\u00e2timent 145, 91191 Gif-sur-Yvette Cedex - France)\"],\"affiliations\":[{\"raw_affiliation_string\":\"PARIETAL - Modelling brain structure, function and variability based on high-field MRI data (Neurospin, CEA Saclay, B\\u00e2timent 145, 91191 Gif-sur-Yvette Cedex - France)\",\"institution_ids\":[\"https://openalex.org/I2738703131\",\"https://openalex.org/I4210128565\"]},{\"raw_affiliation_string\":\"LNAO - Laboratoire de Neuroimagerie Assist\\u00e9e par Ordinateur (France)\",\"institution_ids\":[]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5027430303\",\"display_name\":\"Vincent Michel\",\"orcid\":\"https://orcid.org/0000-0002-7025-4343\"},\"institutions\":[{\"id\":\"https://openalex.org/I2738703131\",\"display_name\":\"Commissariat \\u00e0 l'\\u00c9nergie Atomique et aux \\u00c9nergies Alternatives\",\"ror\":\"https://ror.org/00jjx8s55\",\"country_code\":\"FR\",\"type\":\"government\",\"lineage\":[\"https://openalex.org/I2738703131\"]},{\"id\":\"https://openalex.org/I4210128565\",\"display_name\":\"CEA Saclay\",\"ror\":\"https://ror.org/03n15ch10\",\"country_code\":\"FR\",\"type\":\"government\",\"lineage\":[\"https://openalex.org/I2738703131\",\"https://openalex.org/I4210127723\",\"https://openalex.org/I4210128565\"]}],\"countries\":[\"FR\"],\"is_corresponding\":false,\"raw_author_name\":\"Vincent Michel\",\"raw_affiliation_strings\":[\"LNAO - Laboratoire de Neuroimagerie Assist\\u00e9e par Ordinateur (France)\",\"PARIETAL - Modelling brain structure, function and variability based on high-field MRI data (Neurospin, CEA Saclay, B\\u00e2timent 145, 91191 Gif-sur-Yvette Cedex - France)\"],\"affiliations\":[{\"raw_affiliation_string\":\"LNAO - Laboratoire de Neuroimagerie Assist\\u00e9e par Ordinateur (France)\",\"institution_ids\":[]},{\"raw_affiliation_string\":\"PARIETAL - Modelling brain structure, function and variability based on high-field MRI data (Neurospin, CEA Saclay, B\\u00e2timent 145, 91191 Gif-sur-Yvette Cedex - France)\",\"institution_ids\":[\"https://openalex.org/I2738703131\",\"https://openalex.org/I4210128565\"]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5026762833\",\"display_name\":\"Bertrand Thirion\",\"orcid\":\"https://orcid.org/0000-0001-5018-7895\"},\"institutions\":[{\"id\":\"https://openalex.org/I2738703131\",\"display_name\":\"Commissariat \\u00e0 l'\\u00c9nergie Atomique et aux \\u00c9nergies Alternatives\",\"ror\":\"https://ror.org/00jjx8s55\",\"country_code\":\"FR\",\"type\":\"government\",\"lineage\":[\"https://openalex.org/I2738703131\"]},{\"id\":\"https://openalex.org/I4210128565\",\"display_name\":\"CEA Saclay\",\"ror\":\"https://ror.org/03n15ch10\",\"country_code\":\"FR\",\"type\":\"government\",\"lineage\":[\"https://openalex.org/I2738703131\",\"https://openalex.org/I4210127723\",\"https://openalex.org/I4210128565\"]}],\"countries\":[\"FR\"],\"is_corresponding\":false,\"raw_author_name\":\"Bertrand Thirion\",\"raw_affiliation_strings\":[\"LNAO - Laboratoire de Neuroimagerie Assist\\u00e9e par Ordinateur (France)\",\"PARIETAL - Modelling brain structure, function and variability based on high-field MRI data (Neurospin, CEA Saclay, B\\u00e2timent 145, 91191 Gif-sur-Yvette Cedex - France)\"],\"affiliations\":[{\"raw_affiliation_string\":\"LNAO - Laboratoire de Neuroimagerie Assist\\u00e9e par Ordinateur (France)\",\"institution_ids\":[]},{\"raw_affiliation_string\":\"PARIETAL - Modelling brain structure, function and variability based on high-field MRI data (Neurospin, CEA Saclay, B\\u00e2timent 145, 91191 Gif-sur-Yvette Cedex - France)\",\"institution_ids\":[\"https://openalex.org/I2738703131\",\"https://openalex.org/I4210128565\"]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5033960843\",\"display_name\":\"Olivier Grisel\",\"orcid\":\"https://orcid.org/0009-0006-0406-5989\"},\"institutions\":[{\"id\":\"https://openalex.org/I4210131947\",\"display_name\":\"Nuxe (France)\",\"ror\":\"https://ror.org/02m7qby09\",\"country_code\":\"FR\",\"type\":\"company\",\"lineage\":[\"https://openalex.org/I4210131947\"]}],\"countries\":[\"FR\"],\"is_corresponding\":false,\"raw_author_name\":\"Olivier Grisel\",\"raw_affiliation_strings\":[\"Nuxeo (18-20 rue Soleillet 75020 Paris - France)\"],\"affiliations\":[{\"raw_affiliation_string\":\"Nuxeo (18-20 rue Soleillet 75020 Paris - France)\",\"institution_ids\":[\"https://openalex.org/I4210131947\"]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5049123454\",\"display_name\":\"Mathieu Blondel\",\"orcid\":\"https://orcid.org/0000-0002-2366-2993\"},\"institutions\":[{\"id\":\"https://openalex.org/I65837984\",\"display_name\":\"Kobe University\",\"ror\":\"https://ror.org/03tgsfw79\",\"country_code\":\"JP\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I65837984\"]}],\"countries\":[\"JP\"],\"is_corresponding\":false,\"raw_author_name\":\"Mathieu Blondel\",\"raw_affiliation_strings\":[\"Kobe University (Japan)\"],\"affiliations\":[{\"raw_affiliation_string\":\"Kobe University (Japan)\",\"institution_ids\":[\"https://openalex.org/I65837984\"]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5088660184\",\"display_name\":\"Peter Prettenhofer\",\"orcid\":null},\"institutions\":[{\"id\":\"https://openalex.org/I51441396\",\"display_name\":\"Bauhaus-Universit\\u00e4t Weimar\",\"ror\":\"https://ror.org/033bb5z47\",\"country_code\":\"DE\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I51441396\"]}],\"countries\":[\"DE\"],\"is_corresponding\":false,\"raw_author_name\":\"Peter Prettenhofer\",\"raw_affiliation_strings\":[\"Bauhaus-Universit\\u00e4t Weimar (Geschwister-Scholl-Stra\\u00dfe 8 99423 Weimar - Germany)\"],\"affiliations\":[{\"raw_affiliation_string\":\"Bauhaus-Universit\\u00e4t Weimar (Geschwister-Scholl-Stra\\u00dfe 8 99423 Weimar - Germany)\",\"institution_ids\":[\"https://openalex.org/I51441396\"]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5103273436\",\"display_name\":\"Ron J. Weiss\",\"orcid\":\"https://orcid.org/0000-0003-2010-4053\"},\"institutions\":[{\"id\":\"https://openalex.org/I4210148186\",\"display_name\":\"Google (Canada)\",\"ror\":\"https://ror.org/04d06q394\",\"country_code\":\"CA\",\"type\":\"company\",\"lineage\":[\"https://openalex.org/I1291425158\",\"https://openalex.org/I4210128969\",\"https://openalex.org/I4210148186\"]}],\"countries\":[\"CA\"],\"is_corresponding\":false,\"raw_author_name\":\"Ron Weiss\",\"raw_affiliation_strings\":[\"Google Inc (Toronto - Canada)\"],\"affiliations\":[{\"raw_affiliation_string\":\"Google Inc (Toronto - Canada)\",\"institution_ids\":[\"https://openalex.org/I4210148186\"]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5087957070\",\"display_name\":\"Vincent Dubourg\",\"orcid\":null},\"institutions\":[],\"countries\":[\"FR\"],\"is_corresponding\":false,\"raw_author_name\":\"Vincent Dubourg\",\"raw_affiliation_strings\":[\"LAMI - Laboratoire de M\\u00e9canique et Ing\\u00e9nieries (IFMA. Campus des C\\u00e9zeaux BP 265 63175 Aubi\\u00e8re Cedex - France)\"],\"affiliations\":[{\"raw_affiliation_string\":\"LAMI - Laboratoire de M\\u00e9canique et Ing\\u00e9nieries (IFMA. Campus des C\\u00e9zeaux BP 265 63175 Aubi\\u00e8re Cedex - France)\",\"institution_ids\":[]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5038304150\",\"display_name\":\"Jake Vanderplas\",\"orcid\":\"https://orcid.org/0000-0002-9623-3401\"},\"institutions\":[{\"id\":\"https://openalex.org/I201448701\",\"display_name\":\"University of Washington\",\"ror\":\"https://ror.org/00cvxb145\",\"country_code\":\"US\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I201448701\"]}],\"countries\":[\"US\"],\"is_corresponding\":false,\"raw_author_name\":\"Jake Vanderplas\",\"raw_affiliation_strings\":[\"University of Washington [Seattle] (Seattle, Washington 98105 - United States)\"],\"affiliations\":[{\"raw_affiliation_string\":\"University of Washington [Seattle] (Seattle, Washington 98105 - United States)\",\"institution_ids\":[\"https://openalex.org/I201448701\"]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5034029772\",\"display_name\":\"Alexandre Passos\",\"orcid\":null},\"institutions\":[{\"id\":\"https://openalex.org/I177605424\",\"display_name\":\"Amherst College\",\"ror\":\"https://ror.org/028vqfs63\",\"country_code\":\"US\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I177605424\"]},{\"id\":\"https://openalex.org/I24603500\",\"display_name\":\"University of Massachusetts Amherst\",\"ror\":\"https://ror.org/0072zz521\",\"country_code\":\"US\",\"type\":\"education\",\"lineage\":[\"https://openalex.org/I24603500\"]}],\"countries\":[\"US\"],\"is_corresponding\":false,\"raw_author_name\":\"Alexandre Passos\",\"raw_affiliation_strings\":[\"Department of Mechanical and Industrial Engineering [UMass] (UMass Amherst College of Engineering Department of Mechanical and Industrial Engineering, 220 ELAB, University of Massachusetts Amherst, MA 01003-2210 - United States)\"],\"affiliations\":[{\"raw_affiliation_string\":\"Department of Mechanical and Industrial Engineering [UMass] (UMass Amherst College of Engineering Department of Mechanical and Industrial Engineering, 220 ELAB, University of Massachusetts Amherst, MA 01003-2210 - United States)\",\"institution_ids\":[\"https://openalex.org/I177605424\",\"https://openalex.org/I24603500\"]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5023051838\",\"display_name\":\"David Cournapeau\",\"orcid\":null},\"institutions\":[{\"id\":\"https://openalex.org/I4210121859\",\"display_name\":\"Enthought (United States)\",\"ror\":\"https://ror.org/02xfc1977\",\"country_code\":\"US\",\"type\":\"company\",\"lineage\":[\"https://openalex.org/I4210121859\"]}],\"countries\":[\"US\"],\"is_corresponding\":false,\"raw_author_name\":\"David Cournapeau\",\"raw_affiliation_strings\":[\"Enthought Inc (515 Congress Avenue Suite 2100 Austin, TX 78701 - United States)\"],\"affiliations\":[{\"raw_affiliation_string\":\"Enthought Inc (515 Congress Avenue Suite 2100 Austin, TX 78701 - United States)\",\"institution_ids\":[\"https://openalex.org/I4210121859\"]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5050910015\",\"display_name\":\"Matthieu Brucher\",\"orcid\":null},\"institutions\":[{\"id\":\"https://openalex.org/I103084370\",\"display_name\":\"Total (France)\",\"ror\":\"https://ror.org/04sk34n56\",\"country_code\":\"FR\",\"type\":\"company\",\"lineage\":[\"https://openalex.org/I103084370\"]}],\"countries\":[\"FR\"],\"is_corresponding\":false,\"raw_author_name\":\"Matthieu Brucher\",\"raw_affiliation_strings\":[\"TOTAL S.A. (France)\"],\"affiliations\":[{\"raw_affiliation_string\":\"TOTAL S.A. (France)\",\"institution_ids\":[\"https://openalex.org/I103084370\"]}]},{\"author_position\":\"middle\",\"author\":{\"id\":\"https://openalex.org/A5051111217\",\"display_name\":\"Marc de Perrot\",\"orcid\":\"https://orcid.org/0000-0003-2000-9427\"},\"institutions\":[],\"countries\":[\"FR\"],\"is_corresponding\":false,\"raw_author_name\":\"Matthieu Perrot\",\"raw_affiliation_strings\":[\"LNAO (France)\"],\"affiliations\":[{\"raw_affiliation_string\":\"LNAO (France)\",\"institution_ids\":[]}]},{\"author_position\":\"last\",\"author\":{\"id\":\"https://openalex.org/A5007095962\",\"display_name\":\"\\u00c9douard Duchesnay\",\"orcid\":\"https://orcid.org/0000-0002-4073-3490\"},\"institutions\":[],\"countries\":[\"FR\"],\"is_corresponding\":false,\"raw_author_name\":\"\\u00c9douard Duchesnay\",\"raw_affiliation_strings\":[\"LNAO - Laboratoire de Neuroimagerie Assist\\u00e9e par Ordinateur (France)\"],\"affiliations\":[{\"raw_affiliation_string\":\"LNAO - Laboratoire de Neuroimagerie Assist\\u00e9e par Ordinateur (France)\",\"institution_ids\":[]}]}],\"countries_distinct_count\":5,\"institutions_distinct_count\":11,\"corresponding_author_ids\":[],\"corresponding_institution_ids\":[],\"apc_list\":null,\"apc_paid\":null,\"fwci\":null,\"has_fulltext\":false,\"cited_by_count\":39943,\"cited_by_percentile_year\":{\"min\":99,\"max\":100},\"biblio\":{\"volume\":null,\"issue\":null,\"first_page\":null,\"last_page\":null},\"is_retracted\":false,\"is_paratext\":false,\"primary_topic\":{\"id\":\"https://openalex.org/T13650\",\"display_name\":\"Scientific Computing and Data Analysis with Python\",\"score\":0.9945,\"subfield\":{\"id\":\"https://openalex.org/subfields/1702\",\"display_name\":\"Artificial Intelligence\"},\"field\":{\"id\":\"https://openalex.org/fields/17\",\"display_name\":\"Computer Science\"},\"domain\":{\"id\":\"https://openalex.org/domains/3\",\"display_name\":\"Physical Sciences\"}},\"topics\":[{\"id\":\"https://openalex.org/T13650\",\"display_name\":\"Scientific Computing and Data Analysis with Python\",\"score\":0.9945,\"subfield\":{\"id\":\"https://openalex.org/subfields/1702\",\"display_name\":\"Artificial Intelligence\"},\"field\":{\"id\":\"https://openalex.org/fields/17\",\"display_name\":\"Computer Science\"},\"domain\":{\"id\":\"https://openalex.org/domains/3\",\"display_name\":\"Physical Sciences\"}},{\"id\":\"https://openalex.org/T12535\",\"display_name\":\"Learning with Noisy Labels in Machine Learning\",\"score\":0.9859,\"subfield\":{\"id\":\"https://openalex.org/subfields/1702\",\"display_name\":\"Artificial Intelligence\"},\"field\":{\"id\":\"https://openalex.org/fields/17\",\"display_name\":\"Computer Science\"},\"domain\":{\"id\":\"https://openalex.org/domains/3\",\"display_name\":\"Physical Sciences\"}},{\"id\":\"https://openalex.org/T11512\",\"display_name\":\"Anomaly Detection in High-Dimensional Data\",\"score\":0.9749,\"subfield\":{\"id\":\"https://openalex.org/subfields/1702\",\"display_name\":\"Artificial Intelligence\"},\"field\":{\"id\":\"https://openalex.org/fields/17\",\"display_name\":\"Computer Science\"},\"domain\":{\"id\":\"https://openalex.org/domains/3\",\"display_name\":\"Physical Sciences\"}}],\"keywords\":[{\"id\":\"https://openalex.org/keywords/python\",\"display_name\":\"Python\",\"score\":0.532244},{\"id\":\"https://openalex.org/keywords/robust-learning\",\"display_name\":\"Robust Learning\",\"score\":0.507829}],\"concepts\":[{\"id\":\"https://openalex.org/C519991488\",\"wikidata\":\"https://www.wikidata.org/wiki/Q28865\",\"display_name\":\"Python (programming language)\",\"level\":2,\"score\":0.87480295},{\"id\":\"https://openalex.org/C56666940\",\"wikidata\":\"https://www.wikidata.org/wiki/Q788790\",\"display_name\":\"Documentation\",\"level\":2,\"score\":0.834846},{\"id\":\"https://openalex.org/C41008148\",\"wikidata\":\"https://www.wikidata.org/wiki/Q21198\",\"display_name\":\"Computer science\",\"level\":0,\"score\":0.7323823},{\"id\":\"https://openalex.org/C174183944\",\"wikidata\":\"https://www.wikidata.org/wiki/Q334661\",\"display_name\":\"MIT License\",\"level\":3,\"score\":0.5501255},{\"id\":\"https://openalex.org/C154945302\",\"wikidata\":\"https://www.wikidata.org/wiki/Q11660\",\"display_name\":\"Artificial intelligence\",\"level\":1,\"score\":0.51199156},{\"id\":\"https://openalex.org/C119857082\",\"wikidata\":\"https://www.wikidata.org/wiki/Q2539\",\"display_name\":\"Machine learning\",\"level\":1,\"score\":0.43965548},{\"id\":\"https://openalex.org/C199360897\",\"wikidata\":\"https://www.wikidata.org/wiki/Q9143\",\"display_name\":\"Programming language\",\"level\":1,\"score\":0.39753842},{\"id\":\"https://openalex.org/C2780560020\",\"wikidata\":\"https://www.wikidata.org/wiki/Q79719\",\"display_name\":\"License\",\"level\":2,\"score\":0.35676372},{\"id\":\"https://openalex.org/C115903868\",\"wikidata\":\"https://www.wikidata.org/wiki/Q80993\",\"display_name\":\"Software engineering\",\"level\":1,\"score\":0.34812212},{\"id\":\"https://openalex.org/C111919701\",\"wikidata\":\"https://www.wikidata.org/wiki/Q9135\",\"display_name\":\"Operating system\",\"level\":1,\"score\":0.18154305}],\"mesh\":[],\"locations_count\":4,\"locations\":[{\"is_oa\":true,\"landing_page_url\":\"https://arxiv.org/abs/1201.0490\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4306400194\",\"display_name\":\"arXiv (Cornell University)\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"is_core\":false,\"host_organization\":\"https://openalex.org/I205783295\",\"host_organization_name\":\"Cornell University\",\"host_organization_lineage\":[\"https://openalex.org/I205783295\"],\"host_organization_lineage_names\":[\"Cornell University\"],\"type\":\"repository\"},\"license\":\"other-oa\",\"license_id\":\"https://openalex.org/licenses/other-oa\",\"version\":null,\"is_accepted\":false,\"is_published\":false},{\"is_oa\":true,\"landing_page_url\":\"https://inria.hal.science/hal-00650905\",\"pdf_url\":\"https://inria.hal.science/hal-00650905/document\",\"source\":{\"id\":\"https://openalex.org/S4306402512\",\"display_name\":\"HAL (Le Centre pour la Communication Scientifique Directe)\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"is_core\":false,\"host_organization\":\"https://openalex.org/I1294671590\",\"host_organization_name\":\"Centre National de la Recherche Scientifique\",\"host_organization_lineage\":[\"https://openalex.org/I1294671590\"],\"host_organization_lineage_names\":[\"Centre National de la Recherche Scientifique\"],\"type\":\"repository\"},\"license\":null,\"license_id\":null,\"version\":\"submittedVersion\",\"is_accepted\":false,\"is_published\":false},{\"is_oa\":true,\"landing_page_url\":\"https://orbi.uliege.be/handle/2268/225787\",\"pdf_url\":\"https://orbi.uliege.be/bitstream/2268/225787/1/1201.0490.pdf\",\"source\":{\"id\":\"https://openalex.org/S4306400651\",\"display_name\":\"Open Repository and Bibliography (University of Li\\u00e8ge)\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"is_core\":false,\"host_organization\":\"https://openalex.org/I157674565\",\"host_organization_name\":\"University of Li\\u00e8ge\",\"host_organization_lineage\":[\"https://openalex.org/I157674565\"],\"host_organization_lineage_names\":[\"University of Li\\u00e8ge\"],\"type\":\"repository\"},\"license\":null,\"license_id\":null,\"version\":\"submittedVersion\",\"is_accepted\":false,\"is_published\":false},{\"is_oa\":false,\"landing_page_url\":\"https://api.datacite.org/dois/10.48550/arxiv.1201.0490\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4393179698\",\"display_name\":\"DataCite API\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"is_core\":false,\"host_organization\":\"https://openalex.org/I4210145204\",\"host_organization_name\":\"DataCite\",\"host_organization_lineage\":[\"https://openalex.org/I4210145204\"],\"host_organization_lineage_names\":[\"DataCite\"],\"type\":\"metadata\"},\"license\":null,\"license_id\":null,\"version\":null}],\"best_oa_location\":{\"is_oa\":true,\"landing_page_url\":\"https://arxiv.org/abs/1201.0490\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S4306400194\",\"display_name\":\"arXiv (Cornell University)\",\"issn_l\":null,\"issn\":null,\"is_oa\":true,\"is_in_doaj\":false,\"is_core\":false,\"host_organization\":\"https://openalex.org/I205783295\",\"host_organization_name\":\"Cornell University\",\"host_organization_lineage\":[\"https://openalex.org/I205783295\"],\"host_organization_lineage_names\":[\"Cornell University\"],\"type\":\"repository\"},\"license\":\"other-oa\",\"license_id\":\"https://openalex.org/licenses/other-oa\",\"version\":null,\"is_accepted\":false,\"is_published\":false},\"sustainable_development_goals\":[{\"display_name\":\"Quality education\",\"id\":\"https://metadata.un.org/sdg/4\",\"score\":0.44}],\"grants\":[],\"datasets\":[],\"versions\":[],\"referenced_works_count\":13,\"referenced_works\":[\"https://openalex.org/W1496508106\",\"https://openalex.org/W1571024744\",\"https://openalex.org/W2024933578\",\"https://openalex.org/W2035776949\",\"https://openalex.org/W2040387238\",\"https://openalex.org/W2047804403\",\"https://openalex.org/W2063978378\",\"https://openalex.org/W2097360283\",\"https://openalex.org/W2097850441\",\"https://openalex.org/W2118585731\",\"https://openalex.org/W2146292423\",\"https://openalex.org/W2152799677\",\"https://openalex.org/W2153635508\"],\"related_works\":[\"https://openalex.org/W4392173297\",\"https://openalex.org/W4311683883\",\"https://openalex.org/W4221030787\",\"https://openalex.org/W4212902261\",\"https://openalex.org/W2790811106\",\"https://openalex.org/W2546377002\",\"https://openalex.org/W2207495067\",\"https://openalex.org/W2132241624\",\"https://openalex.org/W2036021480\",\"https://openalex.org/W1906486629\"],\"ngrams_url\":\"https://api.openalex.org/works/W2101234009/ngrams\",\"abstract_inverted_index\":{\"Scikit-learn\":[0],\"is\":[1,35,51],\"a\":[2,6,30],\"Python\":[3],\"module\":[4],\"integrating\":[5],\"wide\":[7],\"range\":[8],\"of\":[9,39],\"state-of-the-art\":[10],\"machine\":[11,25],\"learning\":[12,26],\"algorithms\":[13],\"for\":[14],\"medium-scale\":[15],\"supervised\":[16],\"and\":[17,43,50,64,70],\"unsupervised\":[18],\"problems.\":[19],\"This\":[20],\"package\":[21],\"focuses\":[22],\"on\":[23,37],\"bringing\":[24],\"to\":[27],\"non-specialists\":[28],\"using\":[29],\"general-purpose\":[31],\"high-level\":[32],\"language.\":[33],\"Emphasis\":[34],\"put\":[36],\"ease\":[38],\"use,\":[40],\"performance,\":[41],\"documentation,\":[42],\"API\":[44],\"consistency.\":[45],\"It\":[46],\"has\":[47],\"minimal\":[48],\"dependencies\":[49],\"distributed\":[52],\"under\":[53],\"the\":[54],\"simplified\":[55],\"BSD\":[56],\"license,\":[57],\"encouraging\":[58],\"its\":[59],\"use\":[60],\"in\":[61],\"both\":[62],\"academic\":[63],\"commercial\":[65],\"settings.\":[66],\"Source\":[67],\"code,\":[68],\"binaries,\":[69],\"documentation\":[71],\"can\":[72],\"be\":[73],\"downloaded\":[74],\"from\":[75],\"http://scikit-learn.org.\":[76]},\"cited_by_api_url\":\"https://api.openalex.org/works?filter=cites:W2101234009\",\"counts_by_year\":[{\"year\":2024,\"cited_by_count\":2991},{\"year\":2023,\"cited_by_count\":5425},{\"year\":2022,\"cited_by_count\":4906},{\"year\":2021,\"cited_by_count\":5734},{\"year\":2020,\"cited_by_count\":4486},{\"year\":2019,\"cited_by_count\":3155},{\"year\":2018,\"cited_by_count\":2112},{\"year\":2017,\"cited_by_count\":1343},{\"year\":2016,\"cited_by_count\":957},{\"year\":2015,\"cited_by_count\":675},{\"year\":2014,\"cited_by_count\":394},{\"year\":2013,\"cited_by_count\":173},{\"year\":2012,\"cited_by_count\":45}],\"updated_date\":\"2024-07-24T02:32:32.187119\",\"created_date\":\"2016-06-24\"}\n", + "items": [ + { + "itemType": "preprint", + "title": "Scikit-learn: Machine Learning in Python", + "creators": [ + { + "firstName": "Fabián", + "lastName": "Pedregosa", + "creatorType": "author" + }, + { + "firstName": "Gaël", + "lastName": "Varoquaux", + "creatorType": "author" + }, + { + "firstName": "Alexandre", + "lastName": "Gramfort", + "creatorType": "author" + }, + { + "firstName": "Vincent", + "lastName": "Michel", + "creatorType": "author" + }, + { + "firstName": "Bertrand", + "lastName": "Thirion", + "creatorType": "author" + }, + { + "firstName": "Olivier", + "lastName": "Grisel", + "creatorType": "author" + }, + { + "firstName": "Mathieu", + "lastName": "Blondel", + "creatorType": "author" + }, + { + "firstName": "Peter", + "lastName": "Prettenhofer", + "creatorType": "author" + }, + { + "firstName": "Ron J.", + "lastName": "Weiss", + "creatorType": "author" + }, + { + "firstName": "Vincent", + "lastName": "Dubourg", + "creatorType": "author" + }, + { + "firstName": "Jake", + "lastName": "Vanderplas", + "creatorType": "author" + }, + { + "firstName": "Alexandre", + "lastName": "Passos", + "creatorType": "author" + }, + { + "firstName": "David", + "lastName": "Cournapeau", + "creatorType": "author" + }, + { + "firstName": "Matthieu", + "lastName": "Brucher", + "creatorType": "author" + }, + { + "firstName": "Marc de", + "lastName": "Perrot", + "creatorType": "author" + }, + { + "firstName": "Édouard", + "lastName": "Duchesnay", + "creatorType": "author" + } + ], + "date": "2012-01-01", + "DOI": "10.48550/arxiv.1201.0490", + "extra": "OpenAlex: https://openalex.org/W2101234009", + "language": "en", + "repository": "Cornell University", + "attachments": [], + "tags": [ + { + "tag": "Python" + }, + { + "tag": "Robust Learning" + } + ], + "notes": [], + "seeAlso": [] + } + ] + } +] +/** END TEST CASES **/ diff --git a/OpenAlex.js b/OpenAlex.js new file mode 100644 index 00000000000..9a32d781d5d --- /dev/null +++ b/OpenAlex.js @@ -0,0 +1,444 @@ +{ + "translatorID": "432d79fe-79e1-4791-b3e1-baf700710163", + "label": "OpenAlex", + "creator": "Sebastian Karcher", + "target": "^https://openalex\\.org/works", + "minVersion": "5.0", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 12, + "browserSupport": "gcsibv", + "lastUpdated": "2024-07-29 14:16:50" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 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 detectWeb(doc, url) { + if (/\/works\/w\d+/i.test(url) || /zoom=w\d+/.test(url)) { + return 'journalArticle'; // we'll default to + } + else if (getSearchResults(doc, true)) { + return 'multiple'; + } + return false; +} + +function detectSearch(item) { + return !!item.openAlex; +} + +async function doSearch(item) { + await scrape([item.openAlex]); +} + +function getSearchResults(doc, checkOnly) { + var items = {}; + var found = false; + var rows = doc.querySelectorAll('a.v-list-item--link'); + for (let row of rows) { + let href = row.href; + let title = ZU.trimInternal(text(row, 'div.v-list-item__title')); + if (!href || !title) continue; + if (checkOnly) return true; + found = true; + items[href] = title; + } + 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; + let ids = []; + for (let url of Object.keys(items)) { + ids.push(url.match(/zoom=(w\d+)/i)[1]); + } + await scrape(ids); + } + else { + let id = url.match(/zoom=(w\d+)/i); + if (!id) { + id = url.match(/\/works\/(w\d+)/i); + } + await scrape([id[1]]); + } +} + + +async function scrape(ids) { + let apiURL = `https://api.openalex.org/works?filter=openalex:${ids.join("|")}`; + // Z.debug(apiURL); + let apiJSON = await requestText(apiURL); + let translator = Zotero.loadTranslator('import'); + translator.setTranslator('faa53754-fb55-4658-9094-ae8a7e0409a2'); // OpenAlex JSON + translator.setString(apiJSON); + translator.setHandler('itemDone', (_obj, item) => { + item.complete(); + }); + await translator.translate(); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://openalex.org/works?page=1&filter=default.search%3Alabor&sort=relevance_score%3Adesc", + "defer": true, + "items": "multiple" + }, + { + "type": "web", + "url": "https://openalex.org/works/w2029394297", + "items": [ + { + "itemType": "journalArticle", + "title": "Male-Female Wage Differentials in Urban Labor Markets", + "creators": [ + { + "firstName": "Ronald L.", + "lastName": "Oaxaca", + "creatorType": "author" + } + ], + "date": "1973-10-01", + "DOI": "10.2307/2525981", + "ISSN": "0020-6598", + "extra": "OpenAlex: https://openalex.org/W2029394297", + "issue": "3", + "language": "en", + "libraryCatalog": "OpenAlex", + "pages": "693", + "publicationTitle": "International economic review", + "volume": "14", + "attachments": [ + { + "title": "Submitted Version PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Gender Pay Gap" + }, + { + "tag": "Job Polarization" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://openalex.org/works?page=1&filter=default.search%3Atest&sort=relevance_score%3Adesc&zoom=w2159306398", + "items": [ + { + "itemType": "journalArticle", + "title": "Coefficient alpha and the internal structure of tests", + "creators": [ + { + "firstName": "Lee J.", + "lastName": "Cronbach", + "creatorType": "author" + } + ], + "date": "1951-09-01", + "DOI": "10.1007/bf02310555", + "ISSN": "0033-3123", + "extra": "OpenAlex: https://openalex.org/W2159306398", + "issue": "3", + "language": "en", + "libraryCatalog": "OpenAlex", + "pages": "297-334", + "publicationTitle": "Psychometrika", + "volume": "16", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Reliability Estimation" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "openAlex": "W2741809807" + }, + "items": [ + { + "itemType": "journalArticle", + "title": "The state of OA: a large-scale analysis of the prevalence and impact of Open Access articles", + "creators": [ + { + "firstName": "Heather", + "lastName": "Piwowar", + "creatorType": "author" + }, + { + "firstName": "Jason", + "lastName": "Priem", + "creatorType": "author" + }, + { + "firstName": "Vincent", + "lastName": "Larivière", + "creatorType": "author" + }, + { + "firstName": "Juan Pablo", + "lastName": "Alperín", + "creatorType": "author" + }, + { + "firstName": "Lisa", + "lastName": "Matthias", + "creatorType": "author" + }, + { + "firstName": "Bree", + "lastName": "Norlander", + "creatorType": "author" + }, + { + "firstName": "Ashley", + "lastName": "Farley", + "creatorType": "author" + }, + { + "firstName": "Jevin D.", + "lastName": "West", + "creatorType": "author" + }, + { + "firstName": "Stefanie", + "lastName": "Haustein", + "creatorType": "author" + } + ], + "date": "2018-02-13", + "DOI": "10.7717/peerj.4375", + "ISSN": "2167-8359", + "extra": "OpenAlex: https://openalex.org/W2741809807", + "language": "en", + "libraryCatalog": "OpenAlex", + "pages": "e4375", + "publicationTitle": "PeerJ", + "shortTitle": "The state of OA", + "volume": "6", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Open Access Publishing" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://openalex.org/works/w2964121744", + "detectedItemType": "journalArticle", + "items": [ + { + "itemType": "preprint", + "title": "Adam: A Method for Stochastic Optimization", + "creators": [ + { + "firstName": "Diederik P.", + "lastName": "Kingma", + "creatorType": "author" + }, + { + "firstName": "Jimmy", + "lastName": "Ba", + "creatorType": "author" + } + ], + "date": "2014-01-01", + "DOI": "10.48550/arxiv.1412.6980", + "extra": "OpenAlex: https://openalex.org/W2964121744", + "language": "en", + "libraryCatalog": "OpenAlex", + "repository": "Cornell University", + "shortTitle": "Adam", + "attachments": [], + "tags": [ + { + "tag": "Approximation Algorithms" + }, + { + "tag": "Convex Optimization" + }, + { + "tag": "Global Optimization" + }, + { + "tag": "Optimization Software" + }, + { + "tag": "Stochastic Gradient Descent" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://openalex.org/works/W2962935454", + "detectedItemType": "journalArticle", + "items": [ + { + "itemType": "conferencePaper", + "title": "Generalizing to Unseen Domains via Adversarial Data Augmentation", + "creators": [ + { + "firstName": "Riccardo", + "lastName": "Volpi", + "creatorType": "author" + }, + { + "firstName": "Hongseok", + "lastName": "Namkoong", + "creatorType": "author" + }, + { + "firstName": "Ozan", + "lastName": "Şener", + "creatorType": "author" + }, + { + "firstName": "John C.", + "lastName": "Duchi", + "creatorType": "author" + }, + { + "firstName": "Vittorio", + "lastName": "Murino", + "creatorType": "author" + }, + { + "firstName": "Silvio", + "lastName": "Savarese", + "creatorType": "author" + } + ], + "date": "2018-05-01", + "extra": "OpenAlex: https://openalex.org/W2962935454", + "language": "en", + "libraryCatalog": "OpenAlex", + "pages": "5334-5344", + "proceedingsTitle": "Neural Information Processing Systems", + "volume": "31", + "attachments": [], + "tags": [ + { + "tag": "Adversarial Examples" + }, + { + "tag": "Domain Adaptation" + }, + { + "tag": "Representation Learning" + }, + { + "tag": "Transfer Learning" + }, + { + "tag": "Unsupervised Learning" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://openalex.org/works/w2979586175", + "items": [ + { + "itemType": "journalArticle", + "title": "Two-Way Fixed Effects Estimators with Heterogeneous Treatment Effects", + "creators": [ + { + "firstName": "Clément de", + "lastName": "Chaisemartin", + "creatorType": "author" + }, + { + "firstName": "Xavier", + "lastName": "D’Haultfœuille", + "creatorType": "author" + } + ], + "date": "2020-09-01", + "DOI": "10.1257/aer.20181169", + "ISSN": "0002-8282", + "extra": "OpenAlex: https://openalex.org/W2979586175", + "issue": "9", + "language": "en", + "libraryCatalog": "OpenAlex", + "pages": "2964-2996", + "publicationTitle": "American Economic Review", + "volume": "110", + "attachments": [ + { + "title": "Submitted Version PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Treatment Effects" + } + ], + "notes": [], + "seeAlso": [] + } + ] + } +] +/** END TEST CASES **/ From 1124865649a3835ac0164730e022ff26a743771f Mon Sep 17 00:00:00 2001 From: Franklin Pezzuti Dyer <46753556+franklindyer@users.noreply.github.com> Date: Tue, 30 Jul 2024 08:57:40 -0600 Subject: [PATCH 100/158] Add translator for TinREAD library catalogs (#3223) Co-authored-by: Abe Jellinek --- Library Catalog (TinREAD).js | 282 +++++++++++++++++++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 Library Catalog (TinREAD).js diff --git a/Library Catalog (TinREAD).js b/Library Catalog (TinREAD).js new file mode 100644 index 00000000000..d44175f4978 --- /dev/null +++ b/Library Catalog (TinREAD).js @@ -0,0 +1,282 @@ +{ + "translatorID": "78835a5b-3378-49c2-a94f-3422aab0e949", + "label": "Library Catalog (TinREAD)", + "creator": "Franklin Pezzuti Dyer", + "target": "^https?://[^/]+/opac/bibliographic_view", + "minVersion": "5.0", + "maxVersion": "", + "priority": 250, + "inRepository": true, + "translatorType": 4, + "browserSupport": "gcsibv", + "lastUpdated": "2024-07-30 14:56:12" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 Franklin Pezzuti Dyer + + 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 ***** +*/ + +const ICON_DETECT_MAPPING = { + "s_book.gif": "journalArticle", + "s_e_resource.gif": "journalArticle", + "book.gif": "book" +}; + +function detectWeb(doc, _url) { + let footer = text(doc, "#footer"); + if (!footer.toUpperCase().includes("TINREAD")) return false; + + // Rather than parsing text in two different languages, we are using the icon + let typeIcons = doc.querySelectorAll(".crs_recordtype_icon"); + if (typeIcons.length == 0) return false; + else if (typeIcons.length > 1) return "multiple"; + let typeIcon = typeIcons[0].src; + let iname; + for (iname in ICON_DETECT_MAPPING) { + if (typeIcon.includes(iname)) { + return ICON_DETECT_MAPPING[iname]; + } + } + return false; +} + +function getSearchResults(doc, checkOnly) { + var items = {}; + var found = false; + var rows = doc.querySelectorAll('li.reslt_item_head > a[name="book_link"]'); + for (let row of rows) { + let href = new URL(row.href).href; + let title = row.title; + if (!href || !title) continue; + if (checkOnly) return true; + found = true; + items[href] = title; + } + 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 url of Object.keys(items)) { + await scrape(await requestDocument(url)); + } + } + else { + await scrape(doc, url); + } +} + +async function scrape(doc, url = doc.location.href) { + let urlParts = new URL(url); + let pathParts = urlParts.pathname.split('/'); + let entryID = pathParts[pathParts.length - 1]; // Last part of path is the ID + let marcUrl = "/marcexport.svc?enc=UTF-8&fmt=xml&items=none&marc=Current&type=bib&id="; + marcUrl = marcUrl.concat(entryID); + let marcText = await requestText(marcUrl); + + var translator = Zotero.loadTranslator("import"); + translator.setTranslator("edd87d07-9194-42f8-b2ad-997c4c7deefd"); // MARCXML + translator.setString(marcText); + await translator.translate(); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://opac.biblioteca.ase.ro/opac/bibliographic_view/144193?pn=opac%2FSearch&q=gheorghe+carstea#level=all&location=0&ob=asc&q=gheorghe+carstea&sb=relevance&start=0&view=CONTENT", + "detectedItemType": "book", + "items": [ + { + "itemType": "book", + "title": "Managementul achizitiilor publice", + "creators": [ + { + "firstName": "Gheorghe", + "lastName": "Carstea", + "creatorType": "author" + }, + { + "firstName": "Monica Viorica", + "lastName": "Nedelcu", + "creatorType": "author" + } + ], + "date": "2002", + "ISBN": "9789735941130", + "callNumber": "352.5", + "libraryCatalog": "Library Catalog (TinREAD)", + "numPages": "165", + "place": "Bucuresti", + "publisher": "Editura ASE", + "attachments": [], + "tags": [ + { + "tag": "achizitii" + }, + { + "tag": "administratie publica" + }, + { + "tag": "cursuri multigrafiate" + }, + { + "tag": "guvern" + }, + { + "tag": "licitatii" + }, + { + "tag": "management" + }, + { + "tag": "sector public" + } + ], + "notes": [ + { + "note": "CZU 35.073.511 ; 65.012.4 ; 075.8" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://tinread.biblioteca.ct.ro/opac/bibliographic_view/238969?pn=opac/Search&q=educatie+fizica#level=all&location=0&ob=asc&q=educatie+fizica&sb=relevance&start=0&view=CONTENT", + "detectedItemType": "book", + "items": [ + { + "itemType": "book", + "title": "Cursus. Educaţie fizică", + "creators": [], + "language": "rum", + "libraryCatalog": "Library Catalog (TinREAD)", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + }, + { + "itemType": "book", + "title": "Metodica predării educaţiei fizice şi sportului", + "creators": [ + { + "firstName": "Elena", + "lastName": "Lupu", + "creatorType": "author" + } + ], + "date": "2006", + "ISBN": "9789736114366", + "callNumber": "796(075.8)", + "language": "rum", + "libraryCatalog": "Library Catalog (TinREAD)", + "place": "Iaşi", + "publisher": "Institutul European", + "series": "Cursus. Educaţie fizică", + "seriesNumber": "18", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://catalog.ucv.ro/opac/bibliographic_view/68938?pn=opac/Search&q=educatie+fizica#level=all&location=0&ob=asc&q=educatie+fizica&sb=relevance&start=0&view=CONTENT", + "detectedItemType": "book", + "items": [ + { + "itemType": "book", + "title": "Lecţia de educaţie fizică", + "creators": [ + { + "firstName": "Emil", + "lastName": "Ghibu", + "creatorType": "author" + } + ], + "date": "1957", + "callNumber": "796:371.3", + "language": "rum", + "libraryCatalog": "Library Catalog (TinREAD)", + "place": "Bucureşti", + "publisher": "Editura Tineretului", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://tinread.upit.ro/opac/bibliographic_view/37902?pn=opac/Search&q=metodica+educatie+fizica#level=all&location=0&ob=asc&q=metodica+educatie+fizica&sb=relevance&start=0&view=CONTENT", + "detectedItemType": "book", + "items": [ + { + "itemType": "book", + "title": "Metodica dezvoltării calităţilor fizice", + "creators": [ + { + "firstName": "Corneliu", + "lastName": "Florescu", + "creatorType": "author" + }, + { + "firstName": "Vasile", + "lastName": "Dumitrescu", + "creatorType": "author" + }, + { + "firstName": "Aurel", + "lastName": "Predescu", + "creatorType": "author" + } + ], + "date": "1969", + "callNumber": "796", + "edition": "Ediţia a II-a revăzută", + "language": "rum", + "libraryCatalog": "Library Catalog (TinREAD)", + "place": "Bucureşti", + "publisher": "Editura Consiliului Naţional pentru Educaţie Fizică şi Sport", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://opac.biblioteca.ase.ro/opac/search?q=wirtschaftstheorie&max=0&view=&sb=relevance&ob=asc&level=all&material_type=all&do_file_type=all&location=0", + "detectedItemType": "multiple", + "items": "multiple" + } +] +/** END TEST CASES **/ From f8bc01e48cd7785417d174719b9fb20e3216cad5 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 1 Aug 2024 10:15:57 -0400 Subject: [PATCH 101/158] TinREAD: Filter out dummy series items https://forums.zotero.org/discussion/comment/469492/#Comment_469492 --- Library Catalog (TinREAD).js | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/Library Catalog (TinREAD).js b/Library Catalog (TinREAD).js index d44175f4978..c7e17417859 100644 --- a/Library Catalog (TinREAD).js +++ b/Library Catalog (TinREAD).js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-07-30 14:56:12" + "lastUpdated": "2024-08-01 14:15:46" } /* @@ -98,7 +98,14 @@ async function scrape(doc, url = doc.location.href) { var translator = Zotero.loadTranslator("import"); translator.setTranslator("edd87d07-9194-42f8-b2ad-997c4c7deefd"); // MARCXML translator.setString(marcText); - await translator.translate(); + + // Sometimes the MARC contains a dummy record for the book's series, + // so just complete the item with the most creators + translator.setHandler("itemDone", () => {}); + let items = await translator.translate(); + if (!items.length) return; + items.sort((i1, i2) => i2.creators.length - i1.creators.length); + items[0].complete(); } /** BEGIN TEST CASES **/ @@ -166,19 +173,7 @@ var testCases = [ { "type": "web", "url": "https://tinread.biblioteca.ct.ro/opac/bibliographic_view/238969?pn=opac/Search&q=educatie+fizica#level=all&location=0&ob=asc&q=educatie+fizica&sb=relevance&start=0&view=CONTENT", - "detectedItemType": "book", "items": [ - { - "itemType": "book", - "title": "Cursus. Educaţie fizică", - "creators": [], - "language": "rum", - "libraryCatalog": "Library Catalog (TinREAD)", - "attachments": [], - "tags": [], - "notes": [], - "seeAlso": [] - }, { "itemType": "book", "title": "Metodica predării educaţiei fizice şi sportului", From 1b7d772db070adb203c38b366560c260ebf48c94 Mon Sep 17 00:00:00 2001 From: yuchen-lea Date: Fri, 9 Aug 2024 02:55:58 +0800 Subject: [PATCH 102/158] Douban: support numeric userID for multiple (#3350) --- Douban.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Douban.js b/Douban.js index c9ab94ea0f6..6c9aeb4992c 100644 --- a/Douban.js +++ b/Douban.js @@ -2,14 +2,14 @@ "translatorID": "fc353b26-8911-4c34-9196-f6f567c93901", "label": "Douban", "creator": "Ace Strong", - "target": "^https?://(www|book)\\.douban\\.com/(subject|doulist|people/[a-zA-Z._]*/(do|wish|collect)|.*?status=(do|wish|collect)|group/[0-9]*?/collection|tag)", + "target": "^https?://(www|book)\\.douban\\.com/(subject|doulist|people/[a-zA-Z0-9._]*/(do|wish|collect)|.*?status=(do|wish|collect)|group/[0-9]*?/collection|tag)", "minVersion": "2.0rc1", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2020-06-04 03:46:18" + "lastUpdated": "2024-08-07 08:46:18" } /* @@ -189,7 +189,7 @@ function scrapeAndParse(doc, url) { // ######################### function detectWeb(doc, url) { - var pattern = /subject_search|doulist|people\/[a-zA-Z._]*?\/(?:do|wish|collect)|.*?status=(?:do|wish|collect)|group\/[0-9]*?\/collection|tag/; + var pattern = /subject_search|doulist|people\/[a-zA-Z0-9._]*?\/(?:do|wish|collect)|.*?status=(?:do|wish|collect)|group\/[0-9]*?\/collection|tag/; if (pattern.test(url)) { return "multiple"; From 1ca9f86eb51c1823cbca810f54fb4f0966e615ae Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 12 Aug 2024 15:43:00 -0600 Subject: [PATCH 103/158] De Gruyter: Book section improvements - Get editors from RIS - Get full book title, not just part before colon --- De Gruyter.js | 92 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 82 insertions(+), 10 deletions(-) diff --git a/De Gruyter.js b/De Gruyter.js index 8489a8ab973..2118472157e 100644 --- a/De Gruyter.js +++ b/De Gruyter.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-05-29 17:10:18" + "lastUpdated": "2024-08-12 21:42:53" } /* @@ -124,18 +124,38 @@ function scrape(doc, url) { delete item.bookTitle; } - if (item.bookTitle && !item.bookTitle.includes(': ')) { + if (item.itemType == 'bookSection') { + delete item.publicationTitle; + delete item.abstractNote; + delete item.rights; // AI training disclaimer! + let risURL = attr(doc, 'a[title="Download in RIS format"]', 'href'); if (!risURL) { risURL = url.replace(/\/html([?#].*)$/, '/machineReadableCitation/RIS'); } ZU.doGet(risURL, function (risText) { - let bookTitle = risText.match(/^\s*T1\s*-\s*(.*)$/m); - if (bookTitle) { - item.bookTitle = bookTitle[1]; + // De Gruyter uses TI for the container title and T2 for the subtitle + // Seems nonstandard! So we'll just handle it here + let titleMatch = risText.match(/^\s*TI\s*-\s*(.+)/m); + let subtitleMatch = risText.match(/^\s*T2\s*-\s*(.+)/m); + if (titleMatch) { + item.bookTitle = titleMatch[1]; + if (subtitleMatch) { + item.bookTitle = item.bookTitle.trim() + ': ' + subtitleMatch[1]; + } } - item.complete(); + + let translator = Zotero.loadTranslator('import'); + translator.setTranslator('32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7'); + translator.setString(risText); + translator.setHandler('itemDone', (_obj, risItem) => { + if (!item.creators.some(c => c.creatorType == 'editor')) { + item.creators.push(...risItem.creators.filter(c => c.creatorType == 'editor')); + } + item.complete(); + }); + translator.translate(); }); } else { @@ -196,7 +216,12 @@ var testCases = [ "shortTitle": "Homosexuelle im modernen Deutschland", "url": "https://www.degruyter.com/document/doi/10.1515/vfzg-2021-0028/html", "volume": "69", - "attachments": [], + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], "tags": [ { "tag": "Emancipation" @@ -313,13 +338,11 @@ var testCases = [ ], "date": "2021-07-30", "ISBN": "9781487518806", - "abstractNote": "5 Serving the Public Good: Reform, Prestige, and the Productive Criminal Body in Amsterdam was published in Picturing Punishment on page 135.", - "bookTitle": "Picturing Punishment", + "bookTitle": "Picturing Punishment: The Spectacle and Material Afterlife of the Criminal Body in the Dutch Republic", "language": "en", "libraryCatalog": "www.degruyter.com", "pages": "135-157", "publisher": "University of Toronto Press", - "rights": "De Gruyter expressly reserves the right to use all content for commercial text and data mining within the meaning of Section 44b of the German Copyright Act.", "shortTitle": "5 Serving the Public Good", "url": "https://www.degruyter.com/document/doi/10.3138/9781487518806-008/html", "attachments": [], @@ -445,6 +468,55 @@ var testCases = [ "type": "web", "url": "https://www.degruyter.com/journal/key/mt/html", "items": "multiple" + }, + { + "type": "web", + "url": "https://www.degruyter.com/document/doi/10.1515/9783110773712-010/html", + "items": [ + { + "itemType": "bookSection", + "title": "10 Skaldic Poetry – Encrypted Communication", + "creators": [ + { + "firstName": "Jon Gunnar", + "lastName": "Jørgensen", + "creatorType": "author" + }, + { + "lastName": "Engh", + "firstName": "Line Cecilie", + "creatorType": "editor" + }, + { + "lastName": "Gullbekk", + "firstName": "Svein Harald", + "creatorType": "editor" + }, + { + "lastName": "Orning", + "firstName": "Hans Jacob", + "creatorType": "editor" + } + ], + "date": "2024-08-19", + "ISBN": "9783110773712", + "bookTitle": "Standardization in the Middle Ages: Volume 1: The North", + "language": "en", + "libraryCatalog": "www.degruyter.com", + "pages": "229-250", + "publisher": "De Gruyter", + "url": "https://www.degruyter.com/document/doi/10.1515/9783110773712-010/html", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 3439b09f9ebab70f522e3f20a26f7023da5376dd Mon Sep 17 00:00:00 2001 From: Adam J Bravo <90470462+atombravo@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:44:07 -0400 Subject: [PATCH 104/158] National Archives: Update API URL, add catalog, external links (#3353) Co-authored-by: Abe Jellinek --- US National Archives Research Catalog.js | 99 +++++++++++++++++++++--- 1 file changed, 90 insertions(+), 9 deletions(-) diff --git a/US National Archives Research Catalog.js b/US National Archives Research Catalog.js index c6de1e239d6..fb94b3cb486 100644 --- a/US National Archives Research Catalog.js +++ b/US National Archives Research Catalog.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-01-17 18:26:20" + "lastUpdated": "2024-08-21 17:42:27" } /* @@ -51,7 +51,7 @@ function detectWeb(doc, url) { async function doWeb(doc, url) { let position = url.indexOf('/id/'); let id = url.substr(position + 4); - let jsonURL = `https://catalog.archives.gov/proxy/advanced-search?naId_is=${id}&allowLegacyOrgNames=true`; + let jsonURL = `https://catalog.archives.gov/proxy/records/search?naId_is=${id}&allowLegacyOrgNames=true`; let json = (await requestJSON(jsonURL)).body.hits.hits[0]._source.record; let item = new Zotero.Item("book"); @@ -69,6 +69,9 @@ async function doWeb(doc, url) { } for (var i = 0; i < creators.length; i++) { creators[i] = creators[i].heading.replace('(Most Recent)', ''); + // TODO: Update and simplify this. We should be able to clean authors like: + // Veterans Administration. (7/21/1930 - 3/15/1989) + // and probably don't need two branches for the cleaning. if (creators[i].includes(", ")) { creators[i] = creators[i].replace(/, \d{4}\s*-\s*(\d{4})?$/, '').replace(/\([^(]+\)/, ''); item.creators.push(ZU.cleanAuthor(creators[i], "author", true)); @@ -78,9 +81,35 @@ async function doWeb(doc, url) { if (creators[i].length > 255) { creators[i] = creators[i].substr(0, 251) + '...'; } - item.creators.push({ lastName: creators[i].trim(), creatorType: 'author', fieldMode: true }); + item.creators.push({ lastName: creators[i].trim(), creatorType: 'author', fieldMode: 1 }); } } + + if (doc.querySelector('#preview.digital-objects')) { + item.url = url; + } + else { + item.attachments.push({ + title: 'Catalog Page', + url, + mimeType: 'text/html' + }); + } + + let resourcesHeading = doc.querySelector('h2#resources'); + if (resourcesHeading) { + for (let resource of resourcesHeading.parentElement.querySelectorAll('a[role="link"]')) { + let href = resource.title.match(/Go to (https:\/\/[^\s]+)/); + if (!href) continue; + item.attachments.push({ + title: resource.textContent, + url: href[1], + mimeType: 'text/html', + snapshot: false + }); + } + } + if (json.coverageStartDate) { item.date = json.coverageStartDate.logicalDate.replace('-01-01', ''); // Use issued if we have a date range @@ -106,7 +135,6 @@ async function doWeb(doc, url) { } item.archiveLocation = json.localIdentifier; item.extra = (item.extra || '') + '\nNational Archives Identifier: ' + json.naId; - item.complete(); } @@ -123,7 +151,7 @@ var testCases = [ { "lastName": "Supreme Commander for the Allied Powers. Economic and Scientific Section. Director for Labor. Labor Division", "creatorType": "author", - "fieldMode": true + "fieldMode": 1 } ], "date": "1945", @@ -131,7 +159,12 @@ var testCases = [ "extra": "issued: 1945/1952\nNational Archives Identifier: 486076", "libraryCatalog": "US National Archives Research Catalog", "series": "Records of Allied Operational and Occupation Headquarters, World War II", - "attachments": [], + "attachments": [ + { + "title": "Catalog Page", + "mimeType": "text/html" + } + ], "tags": [], "notes": [], "seeAlso": [] @@ -149,7 +182,7 @@ var testCases = [ { "lastName": "Department of Justice. Immigration and Naturalization Service", "creatorType": "author", - "fieldMode": true + "fieldMode": 1 } ], "abstractNote": "This file consists of an alien case file for Francisca Torre Vda De Garcia. Date of birth is listed as 10/10/1901. Country is listed as Cuba. Port of Entry is Miami, Florida. Date of entry is 03/08/1973. Father is listed as Zotero. Mother is listed as Candita. Alias name is listed as Francisca Torres.", @@ -158,7 +191,12 @@ var testCases = [ "extra": "National Archives Identifier: 5496901", "libraryCatalog": "US National Archives Research Catalog", "series": "Records of U.S. Citizenship and Immigration Services", - "attachments": [], + "attachments": [ + { + "title": "Catalog Page", + "mimeType": "text/html" + } + ], "tags": [], "notes": [], "seeAlso": [] @@ -184,7 +222,50 @@ var testCases = [ "extra": "National Archives Identifier: 603604", "libraryCatalog": "US National Archives Research Catalog", "series": "Harriet Connor Brown Papers", - "attachments": [], + "attachments": [ + { + "title": "Catalog Page", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://catalog.archives.gov/id/115728212", + "defer": true, + "items": [ + { + "itemType": "book", + "title": "Approved Pension Application File for Lucy Test, Mother of Joseph R Test, Company C, 11th Ohio Infantry Regiment (Application No. WC46539)", + "creators": [ + { + "lastName": "Veterans Administration. (7/21/1930 - 3/15/1989)", + "creatorType": "author", + "fieldMode": 1 + }, + { + "lastName": "Department of the Interior. Bureau of Pensions. 1849-1930", + "creatorType": "author", + "fieldMode": 1 + } + ], + "archive": "National Archives at Washington, DC - Textual Reference", + "extra": "National Archives Identifier: 115728212", + "libraryCatalog": "US National Archives Research Catalog", + "series": "Records of the Department of Veterans Affairs", + "url": "https://catalog.archives.gov/id/115728212", + "attachments": [ + { + "title": "Fold3", + "mimeType": "text/html", + "snapshot": false + } + ], "tags": [], "notes": [], "seeAlso": [] From d515188ec426cb7ce3f09d06e2907cb063bd4827 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 21 Aug 2024 13:47:20 -0400 Subject: [PATCH 105/158] Delete HLAS (historical) --- HLAS (historical).js | 144 ------------------------------------------- deleted.txt | 1 + 2 files changed, 1 insertion(+), 144 deletions(-) delete mode 100644 HLAS (historical).js diff --git a/HLAS (historical).js b/HLAS (historical).js deleted file mode 100644 index de4c71d2bc6..00000000000 --- a/HLAS (historical).js +++ /dev/null @@ -1,144 +0,0 @@ -{ - "translatorID": "9f52911f-e1b5-41f8-be66-b16982269e6a", - "label": "HLAS (historical)", - "creator": "Sebastian Karcher", - "target": "^https?://lcweb2\\.loc\\.gov/cgi-bin/query", - "minVersion": "3.0", - "maxVersion": "", - "priority": 100, - "inRepository": true, - "translatorType": 4, - "browserSupport": "gcsv", - "lastUpdated": "2013-06-01 14:47:30" -} - -/* - ***** BEGIN LICENSE BLOCK ***** - - Copyright © 2011 Sebastian Karcher and the Center for History and New Media - George Mason University, Fairfax, Virginia, USA - http://zotero.org - - 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) { - //Z.debug(doc.title) - if (doc.title.indexOf("Search Results")!=-1 && ZU.xpathText(doc, '//p/table/tbody/tr[td/a[contains(@href, "/cgi-bin/query/D?hlasbib")]]')) return "multiple"; - if (doc.title.indexOf("Bibliographic Display")!=-1) return "book"; -} - - -function doWeb(doc, url){ - - var articles = new Array(); - if (detectWeb(doc, url) == "multiple") { - var items = {}; - var titlerows = doc.evaluate('//p/table/tbody/tr[td/a[contains(@href, "/cgi-bin/query/D?hlasbib")]]', doc, null, XPathResult.ANY_TYPE, null); - while (titlerow = titlerows.iterateNext()) { - var url = ZU.xpathText(titlerow, './td/a[contains(@href, "/cgi-bin/query/D")]/@href'); - var title = ZU.xpathText(titlerow, './td[2]') - items[url] = title; - } - Zotero.selectItems(items, function (items) { - if (!items) { - return true; - } - for (var i in items) { - articles.push(i); - } - Zotero.Utilities.processDocuments(articles, scrape); - }); - } else { - scrape(doc, url); - } -} - - -function scrape(doc, url){ - //scrape the LC control number from the page and get LoC catalog data for it via SRU - var idnumbers = ZU.xpathText(doc, '//body/p[b[contains(text(), "LC Control No")]]'); - if (idnumbers) var LCcontrol = idnumbers.match(/LC Control No\:\s*(\d+)/)[1] - Z.debug(LCcontrol) - ZU.doGet("http://lx2.loc.gov:210/LCDB?operation=searchRetrieve&version=1.1&query=bath.LCCN=" + LCcontrol + "&maximumRecords=1", function (text) { - //Z.debug(text); - var translator = Zotero.loadTranslator("import"); - translator.setTranslator("edd87d07-9194-42f8-b2ad-997c4c7deefd"); - translator.setString(text); - translator.translate(); - }); -}/** BEGIN TEST CASES **/ -var testCases = [ - { - "type": "web", - "url": "http://lcweb2.loc.gov/cgi-bin/query/r?hlas/hlasbib,hlasretro,:@FIELD(FLD001+@od1(bi%2090010102))", - "items": [ - { - "itemType": "book", - "title": "Peronism and the three Perons: a checklist of material on peronism and on Juan Domingo, Eva, and Isabel Peron, and their writings, in the Hoover Institution library and archives and in the Stanford University Libraries", - "creators": [ - { - "firstName": "Laszlo", - "lastName": "Horvath", - "creatorType": "author" - }, - { - "lastName": "Hoover Institution on War, Revolution, and Peace", - "creatorType": "contributor", - "fieldMode": true - }, - { - "lastName": "Stanford University", - "creatorType": "contributor", - "fieldMode": true - } - ], - "date": "1988", - "ISBN": "9780817927127", - "callNumber": "Z1630.3 F2849 .H67 1988", - "libraryCatalog": "HLAS (historical)", - "numPages": "170", - "place": "Stanford, CA", - "publisher": "Hoover Institution, Stanford University", - "series": "Hoover Press bibliography", - "seriesNumber": "71", - "shortTitle": "Peronism and the three Perons", - "attachments": [], - "tags": [ - "1943-", - "Argentina", - "Bibliography Catalogs", - "Catalogs", - "History Bibliography Catalogs", - "Hoover Institution on War, Revolution, and Peace", - "Libraries", - "Manuscripts Catalogs", - "Peronism", - "Perón, Eva", - "Perón, Isabel", - "Perón, Juan Domingo", - "Sources Bibliography Catalogs", - "Stanford University" - ], - "notes": [], - "seeAlso": [] - } - ] - } -] -/** END TEST CASES **/ \ No newline at end of file diff --git a/deleted.txt b/deleted.txt index 2c48cb97b1f..f2796b2b7dd 100644 --- a/deleted.txt +++ b/deleted.txt @@ -127,3 +127,4 @@ fe39e97d-7397-4f3f-a5f3-396a1a79213c # OpenJudis: New site just lists PDFs witho fc410e64-0252-4cd3-acb1-25e584775fa2 # National Library of Australia: Old site defunct as of 2019 c0e6fda6-0ecd-e4f4-39ca-37a4de436e15 # Library Catalog (GEAC): No instances of this catalog system are still online as of 2021 b38a44f4-b8af-4553-9edf-fba4d2598d6a # Springer Books: Site was merged into Springer Link +9f52911f-e1b5-41f8-be66-b16982269e6a # HLAS (historical): Site moved, now uses Voyager 7 From e62d24350af3464d7f4824da358585931d30884f Mon Sep 17 00:00:00 2001 From: Tim Sherratt Date: Thu, 22 Aug 2024 05:41:12 +1000 Subject: [PATCH 106/158] New translator - Queensland State Archives (#3355) Co-authored-by: Abe Jellinek --- Queensland State Archives.js | 246 +++++++++++++++++++++++++++++++++++ 1 file changed, 246 insertions(+) create mode 100644 Queensland State Archives.js diff --git a/Queensland State Archives.js b/Queensland State Archives.js new file mode 100644 index 00000000000..d1875d81b97 --- /dev/null +++ b/Queensland State Archives.js @@ -0,0 +1,246 @@ +{ + "translatorID": "214505fc-fa92-4b35-b323-5f12a4b157cb", + "label": "Queensland State Archives", + "creator": "Tim Sherratt (tim@timsherratt.au)", + "target": "https?://www\\.archivessearch\\.qld\\.gov\\.au/(items|search)", + "minVersion": "5.0", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 4, + "browserSupport": "gcsibv", + "lastUpdated": "2024-08-21 19:39:55" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 Tim Sherratt + + 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 ***** +*/ + +async function detectWeb(doc, url) { + if (/\/search\?/.test(url)) { + if (getSearchResults(doc, true)) { + return "multiple"; + } + else { + Zotero.monitorDOMChanges(doc.body); + return false; + } + } + else if (/items\/ITM[0-9]+/.test(url)) { + return "manuscript"; + } + return false; +} + +function getSearchResults(doc, checkOnly) { + let items = {}; + let found = false; + let rows = doc.querySelectorAll("div.result-left-pane a"); + for (let row of rows) { + let href = row.href; + href = /\/items\//.test(href) ? href : null; + let title = row.innerText; + if (!href || !title) continue; + if (checkOnly) return true; + found = true; + items[href] = title; + } + return found ? items : false; +} + +async function doWeb(doc, url) { + if (await detectWeb(doc, url) == 'multiple') { + let items = await Zotero.selectItems(getSearchResults(doc, false)); + if (items) { + for (let url of Object.keys(items)) { + await scrape(url); + } + } + } + else { + await scrape(url); + } +} + +async function scrape(url) { + let id = url.match(/items\/(ITM[0-9-]+)/)[1]; + let apiURL = "https://www.archivessearch.qld.gov.au/api/fetch?qsa_id=" + id + "&type=archival_object"; + let data = await requestJSON(apiURL); + let item = new Zotero.Item("manuscript"); + item.title = data.title; + if ("record_type" in data.subject_terms) { + item.type = data.subject_terms.record_type.join("; "); + } + item.archive = "Queensland State Archives"; + item.archiveLocation = data.qsa_id_prefixed; + item.url = url; + item.rights = data.copyright_status; + let startDate = data.dates[0].begin.split("-")[0]; + let endDate = data.dates[0].end.split("-")[0]; + // If there's a date range use 'issued', otherwise use 'date' + if (startDate == endDate) { + item.date = startDate; + } + else { + item.extra = (item.extra ? item.extra + "\n" : "") + "Issued: " + startDate + "/" + endDate; + } + // Include a series reference (archive collection) + item.extra = (item.extra ? item.extra + "\n" : "") + "Archive Collection: " + data.resource.qsa_id_prefixed + ", " + data.resource.display_string; + // Add creating agencies + let agencies = data.creating_agency || []; + for (let i = 0; i < agencies.length; i++) { + item.creators.push({ + lastName: agencies[i]._resolved.qsa_id_prefixed + ", " + agencies[i]._resolved.display_string, + creatorType: "contributor", + fieldMode: 1 + }); + } + // Add digital representation + if (data.digital_representations.length > 0) { + let image = data.digital_representations[0]; + let imageID = image.qsa_id_prefixed; + let mimeType, imageTitle; + if (image.file_type == "JPEG") { + mimeType = "image/jpeg"; + imageTitle = "Image " + imageID; + } + else if (image.file_type == "PDF") { + mimeType = "application/pdf"; + imageTitle = "PDF " + imageID; + } + item.attachments = [{ + title: imageTitle, + url: "https://www.archivessearch.qld.gov.au/api/download_file/" + imageID, + mimeType: mimeType, + snapshot: true + }]; + } + item.complete(); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://www.archivessearch.qld.gov.au/items/ITM3872594", + "items": [ + { + "itemType": "manuscript", + "title": "Regina v Thomas Thompson (or Thomas Norman or James Thompson) . Extract from from Briefs, depositions and associated papers in criminal cases heard, No. 15 [WARNING: CONTENT MAY CAUSE DISTRESS]", + "creators": [ + { + "lastName": "A2120, Circuit Court, Rockhampton", + "creatorType": "contributor", + "fieldMode": 1 + } + ], + "date": "1865", + "archive": "Queensland State Archives", + "archiveLocation": "ITM3872594", + "extra": "Archive Collection: S10976, Briefs, Depositions and Associated Papers in Criminal Cases Heard - Supreme Court, Central District, Rockhampton", + "libraryCatalog": "Queensland State Archives", + "rights": "Copyright State of Queensland", + "shortTitle": "Regina v Thomas Thompson (or Thomas Norman or James Thompson) . Extract from from Briefs, depositions and associated papers in criminal cases heard, No. 15 [WARNING", + "url": "https://www.archivessearch.qld.gov.au/items/ITM3872594", + "attachments": [ + { + "title": "PDF DR173618", + "mimeType": "application/pdf", + "snapshot": true + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.archivessearch.qld.gov.au/items/ITM3871900", + "items": [ + { + "itemType": "manuscript", + "title": "GABBERT, MARY CARMELIA", + "creators": [ + { + "lastName": "A191, Supreme Court, Southern District, Brisbane", + "creatorType": "contributor", + "fieldMode": 1 + } + ], + "date": "2018", + "archive": "Queensland State Archives", + "archiveLocation": "ITM3871900", + "extra": "Archive Collection: S6339, Originating Applications - Probate and Letters of Administration (Supreme Court, Brisbane)", + "libraryCatalog": "Queensland State Archives", + "manuscriptType": "Ecclesiastical (will) file", + "rights": "Copyright State of Queensland", + "url": "https://www.archivessearch.qld.gov.au/items/ITM3871900", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.archivessearch.qld.gov.au/items/ITM1523915", + "items": [ + { + "itemType": "manuscript", + "title": "Town map - Cheepie", + "creators": [ + { + "lastName": "A18, Lands Department", + "creatorType": "contributor", + "fieldMode": 1 + } + ], + "date": "1954", + "archive": "Queensland State Archives", + "archiveLocation": "ITM1523915", + "extra": "Archive Collection: S19466, South West Region Maps", + "libraryCatalog": "Queensland State Archives", + "manuscriptType": "Map", + "url": "https://www.archivessearch.qld.gov.au/items/ITM1523915", + "attachments": [ + { + "title": "Image DR173204", + "mimeType": "image/jpeg", + "snapshot": true + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.archivessearch.qld.gov.au/search?f[]=keywords&has_digital=false&op[]=AND&open=false&q[]=wragge&sort=relevance&type[]=archival_object", + "items": "multiple" + } +] +/** END TEST CASES **/ From b39ffb20c4a003c5cef7f914ee3463ea90d4779a Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 21 Aug 2024 15:41:55 -0400 Subject: [PATCH 107/158] QSA: Anchor regex --- Queensland State Archives.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Queensland State Archives.js b/Queensland State Archives.js index d1875d81b97..45a7473991f 100644 --- a/Queensland State Archives.js +++ b/Queensland State Archives.js @@ -2,14 +2,14 @@ "translatorID": "214505fc-fa92-4b35-b323-5f12a4b157cb", "label": "Queensland State Archives", "creator": "Tim Sherratt (tim@timsherratt.au)", - "target": "https?://www\\.archivessearch\\.qld\\.gov\\.au/(items|search)", + "target": "^https?://www\\.archivessearch\\.qld\\.gov\\.au/(items|search)", "minVersion": "5.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-08-21 19:39:55" + "lastUpdated": "2024-08-21 19:41:51" } /* From ca01e23e6530e186676b0cc20262b2fd382d153b Mon Sep 17 00:00:00 2001 From: Tim Sherratt Date: Thu, 22 Aug 2024 05:48:59 +1000 Subject: [PATCH 108/158] Add translator for Public Record Office Victoria (#3233) --- Public Record Office Victoria.js | 252 +++++++++++++++++++++++++++++++ 1 file changed, 252 insertions(+) create mode 100644 Public Record Office Victoria.js diff --git a/Public Record Office Victoria.js b/Public Record Office Victoria.js new file mode 100644 index 00000000000..f9da5142a51 --- /dev/null +++ b/Public Record Office Victoria.js @@ -0,0 +1,252 @@ +{ + "translatorID": "99592877-f698-4e14-b541-b6181f6c577f", + "label": "Public Record Office Victoria", + "creator": "Tim Sherratt (tim@timsherratt.au)", + "target": "^https?://prov\\.vic\\.gov\\.au/(archive|search_journey)/", + "minVersion": "5.0", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 4, + "browserSupport": "gcsibv", + "lastUpdated": "2024-08-21 01:51:41" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 Tim Sherratt + + 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 ***** +*/ + +async function detectWeb(doc, url) { + if (getSearchResults(doc, true)) { + return "multiple"; + } + // Match items but not series, agencies, or functions (VPRS, VA or VF) + else if (/archive\/(?!VPRS|VA|VF)[A-Z0-9-]+/.test(url)) { + return "manuscript"; + } + return false; +} + +function getSearchResults(doc, checkOnly) { + let items = {}; + let found = false; + let rows = doc.querySelectorAll(".sub_heading_search_result"); + for (let row of rows) { + let href = row.href; + href = /archive\/(?!VPRS|VA|VF)[A-Z0-9-]+/.test(href) ? href : null; + let title = row.innerText.replace(/\n/g, " "); + if (!href || !title) continue; + if (checkOnly) return true; + found = true; + items[href] = title; + } + return found ? items : false; +} + +async function doWeb(doc, url) { + if (await detectWeb(doc, url) == 'multiple') { + let items = await Zotero.selectItems(getSearchResults(doc, false)); + if (items) { + for (let url of Object.keys(items)) { + await scrape(url); + } + } + } + else { + await scrape(url); + } +} + +async function scrape(url) { + // Get the API record for this item + let id = url.match(/archive\/([A-Z0-9-]+)/)[1]; + let apiURL = "https://api.prov.vic.gov.au/search/query?wt=json&q=(_id%3A" + id + ")"; + let apiJSON = await requestJSON(apiURL); + let record = apiJSON.response.docs[0]; + + // Create the Zotero item + let item = new Zotero.Item("manuscript"); + item.title = record.title; + item.type = record.category; + item.archive = "Public Record Office Victoria"; + item.archiveLocation = record.citation; + item.url = url; + item.rights = record.rights_status.join(", "); + item.abstractNote = record["description.aggregate"]; + + // Normalise dates and drop default values + let startDate = record.start_dt.replace("T00:00:00Z", ""); + // Discard default + startDate = startDate != "1753-01-01" ? startDate : ""; + let endDate = record.end_dt.replace("T00:00:00Z", ""); + // Discard default + endDate = endDate != "3000-12-31" ? endDate : ""; + + // If there's a date range use 'issued', otherwise use 'date' + if (startDate == endDate) { + item.date = startDate; + } + else { + item.extra = (item.extra ? item.extra + "\n" : "") + "Issued: " + startDate + "/" + endDate; + } + + // Add creating agencies + let agencies = record["agencies.titles"] || []; + for (let i = 0; i < agencies.length; i++) { + item.creators.push({ + lastName: record["agencies.ids"][i] + ", " + agencies[i], + creatorType: "contributor", + fieldMode: 1 + }); + } + + // Location of archive + item.extra = (item.extra ? item.extra + "\n" : "") + "Archive Place: " + record.location.join(", "); + + // Include a series reference (archive collection) + item.extra = (item.extra ? item.extra + "\n" : "") + "Archive Collection: " + record["is_part_of_series.id"][0] + ", " + record["is_part_of_series.title"][0]; + + // Digitised files have IIIF manifests, which can be used to get PDFs and images + if ("iiif-manifest" in record) { + // Link to IIIF manifest + let manifestUrl = record["iiif-manifest"]; + + // Link to generate PDF of complete file + // The behaviour of PDF links changes depending on the size of the file, + // if it's beyond a certain size you're redirected to a page and have to wait for it to be generated. + // Sometimes the PDF generation doesn't work at all. + // That's why I've set `snapshot` to false on the PDF. + let pdfUrl = "https://cart.cp.prov.vic.gov.au/showdigitalcopy.php?manifest=" + manifestUrl; + + // Get full size image of first page + let imageUrl = record["iiif-thumbnail"].replace("!200,200", "full"); + + item.attachments = [{ + url: pdfUrl, + title: "Download file as PDF", + mimeType: "application/pdf", + snapshot: false + }, + { + url: manifestUrl, + title: "IIIF manifest", + mimeType: "application/json", + snapshot: false + }, + { + url: imageUrl, + title: "Page 1 image", + mimeType: "image/jpeg", + snapshot: true + }]; + } + + item.complete(); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://prov.vic.gov.au/search_journey/select?q=series_id:10742%20AND%20text:(*)&start_date=&end_date=&form_origin=MELBOURNE1956OLYMPICS_SEARCH&iud=true", + "items": "multiple" + }, + { + "type": "web", + "url": "https://prov.vic.gov.au/archive/0C7B792B-F7F4-11E9-AE98-39C0B3AF8E48?image=1", + "items": [ + { + "itemType": "manuscript", + "title": "B1324", + "creators": [ + { + "lastName": "VA4153, Organising Committee for the XVIth Olympiad Melbourne [1956]", + "creatorType": "contributor", + "fieldMode": 1 + } + ], + "abstractNote": "[Swimming]; Swimming; [No slip]", + "archive": "Public Record Office Victoria", + "archiveLocation": "VPRS 10742/P0000, B1324", + "extra": "Archive Place: North Melbourne, Online\nArchive Collection: VPRS10742, Photographic Negatives [1956 Melbourne Olympics Photograph Collection]", + "libraryCatalog": "Public Record Office Victoria", + "manuscriptType": "Item", + "rights": "Open", + "url": "https://prov.vic.gov.au/archive/0C7B792B-F7F4-11E9-AE98-39C0B3AF8E48?image=1", + "attachments": [ + { + "title": "Download file as PDF", + "mimeType": "application/pdf", + "snapshot": false + }, + { + "title": "IIIF manifest", + "mimeType": "application/json", + "snapshot": false + }, + { + "title": "Page 1 image", + "mimeType": "image/jpeg", + "snapshot": true + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://prov.vic.gov.au/archive/8B8A4428-F4D0-11E9-AE98-D598FD7FCBF4", + "items": [ + { + "itemType": "manuscript", + "title": "Rabbit Processing", + "creators": [ + { + "lastName": "VA3125, Employee Relations Commission", + "creatorType": "contributor", + "fieldMode": 1 + }, + { + "lastName": "VA1010, Conciliation and Arbitration Boards (formerly known as Wages Boards 1896-1981)", + "creatorType": "contributor", + "fieldMode": 1 + } + ], + "archive": "Public Record Office Victoria", + "archiveLocation": "VPRS 5467/P0002, Rabbit Processing", + "extra": "Issued: 1977-11-07/1982-10-20\nArchive Place: North Melbourne\nArchive Collection: VPRS5467, Minute Books", + "libraryCatalog": "Public Record Office Victoria", + "manuscriptType": "Item", + "rights": "Open", + "url": "https://prov.vic.gov.au/archive/8B8A4428-F4D0-11E9-AE98-D598FD7FCBF4", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + } +] +/** END TEST CASES **/ From 9eb7cabbefa68287d375d18cf7940d2be6f6c873 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 21 Aug 2024 18:09:03 -0400 Subject: [PATCH 109/158] DOI: Recover when one DOI fails to resolve (#3312) --- DOI.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/DOI.js b/DOI.js index 9a8d7a90f9b..bd60cdddf9f 100644 --- a/DOI.js +++ b/DOI.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-03-22 04:01:25" + "lastUpdated": "2024-06-04 14:34:03" } /* @@ -214,7 +214,12 @@ async function retrieveDOIs(doiOrDOIs) { // Don't throw on error translate.setHandler("error", function () {}); - await translate.translate(); + try { + await translate.translate(); + } + catch (e) { + Zotero.debug(`Failed to resolve DOI '${doi}': ${e}`); + } } } From b3dd8cfa6ccf0f42e3ba2820c9e0bc247db32002 Mon Sep 17 00:00:00 2001 From: Adam J Bravo <90470462+atombravo@users.noreply.github.com> Date: Thu, 22 Aug 2024 10:23:45 -0400 Subject: [PATCH 110/158] Adding translator for Library of Congress Digital Collections (#3354) Co-authored-by: Abe Jellinek --- Library of Congress Digital Collections.js | 869 +++++++++++++++++++++ 1 file changed, 869 insertions(+) create mode 100644 Library of Congress Digital Collections.js diff --git a/Library of Congress Digital Collections.js b/Library of Congress Digital Collections.js new file mode 100644 index 00000000000..9f64f2d2d22 --- /dev/null +++ b/Library of Congress Digital Collections.js @@ -0,0 +1,869 @@ +{ + "translatorID": "79c14aee-b91f-46ed-8285-d83fed1f0b32", + "label": "Library of Congress Digital Collections", + "creator": "Abe Jellinek and Adam Bravo", + "target": "^https?://www\\.loc\\.gov/", + "minVersion": "3.0", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 4, + "browserSupport": "gcsibv", + "lastUpdated": "2024-08-22 14:22:18" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 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 ***** +*/ + +let resourceIDRe = /\/(?:resource|item)\/([^/]+)/; + +function detectWeb(doc, url) { + if (!resourceIDRe.test(url)) { + return false; + } + let format = attr(doc, '.format-label[data-format]', 'data-format'); + if (!format && doc.querySelector('#clip-download')) { + format = attr(doc, '.resource-container a', 'href').match(/original_format:([^&]+)/); + format = format && format[1]; + } + if (!format) { + return false; + } + switch (format) { + case 'audio': + return 'audioRecording'; + case 'book': + return 'book'; + case 'manuscript-mixed-material': + return 'manuscript'; + case 'map': + // These are sometimes atlas sections, so might change later + return 'map'; + case 'newspaper': + return 'newspaperArticle'; + case 'photo-print-drawing': + return 'artwork'; + } + // See https://www.loc.gov/apis/json-and-yaml/requests/endpoints/ - "resources" contain information about the segments of a resource + + return false; +} + +async function doWeb(doc, url) { + // Not doing multiples yet. Many search results are links to external sites, + // so we'll need to think about how/whether we want to deal with that. + + let imageURL = null; + if (doc.querySelector('.clip-note-actions a')) { + imageURL = attr(doc, '#clip-download', 'href'); + url = doc.querySelector('.clip-note-actions a').href; + doc = await requestDocument(url); + } + else if (new URL(url).pathname.startsWith('/item/')) { + url = attr(doc, '#resources a.link-resource', 'href'); + if (!url) { + throw new Error('No resource URL'); + } + doc = await requestDocument(url); + } + await scrape(doc, url, imageURL); +} + +async function scrape(doc, url, imageURL = null) { + let jsonURL = new URL(url); + jsonURL.searchParams.set('fo', 'json'); + let json = await requestJSON(jsonURL.toString()); + + let marcxmlURL; + if (json.item.other_formats && json.item.other_formats.some(f => f.label == 'MARCXML Record')) { + marcxmlURL = json.item.other_formats.find(f => f.label == 'MARCXML Record').link; + } + else if (json.item.library_of_congress_control_number) { + marcxmlURL = `https://lccn.loc.gov/${json.item.library_of_congress_control_number}/marcxml`; + } + let marcxml = marcxmlURL && await requestText(marcxmlURL); + + let item; + if (marcxml) { + let translate = Zotero.loadTranslator('import'); + translate.setTranslator('edd87d07-9194-42f8-b2ad-997c4c7deefd'); + translate.setString(marcxml); + translate.setHandler('itemDone', (_, item) => {}); + [item] = await translate.translate(); + item.itemType = detectWeb(doc, url); + if (item.itemType == 'map' && first(json.item.medium).includes('atlas')) { + item.itemType = 'bookSection'; + } + } + else { + // Metadata will be low quality, but nothing we can do + item = new Zotero.Item(detectWeb(doc, url)); + item.title = json.item.title; + } + + item.date = json.item.date || json.item.date_issued; + item.callNumber = first(json.item.number_lccn); + if (ZU.fieldIsValidForType('pages', item.itemType)) { + item.pages = json.pagination.current; + } + item.language = first(json.item.language); + item.rights = ZU.unescapeHTML(ZU.cleanTags(first(json.item.rights))); + if (item.rights.length > 1500) { + // Maybe don't include rights info for every single item in the entire collection + item.rights = item.rights.substring(0, 1500) + '…'; + } + item.url = json.resource.url; + + item.archive = first(json.item.repository); + if (!item.archive) { + let note = json.item.notes.find(note => note.toLowerCase().includes('collection;')); + if (note) { + item.archive = note.split(';')[0]; + } + } + if (item.archive) { + item.archiveLocation = json.item.shelf_id; + // Sometimes the shelf_id contains repeated values for every copy of the work + if (item.archiveLocation && first(json.item.call_number) && item.archiveLocation.startsWith(first(json.item.call_number))) { + item.archiveLocation = first(json.item.call_number); + } + } + + // Just get a PDF if we can - don't bother with the tiny full-page JPEGs + if (json.resource.pdf) { + item.attachments.push({ + title: 'Full Text PDF', + mimeType: 'application/pdf', + url: json.resource.pdf + }); + } + if (imageURL) { + item.attachments.push({ + title: 'Clipping', + mimeType: 'image/jpeg', + url: imageURL + }); + }; + + if (item.itemType == 'book') { + delete item.publicationTitle; + } + else if (item.itemType == 'bookSection') { + item.bookTitle = item.title; + if (json.segments && json.segments.length && json.segments[0].title) { + item.title = json.segments[0].title; + } + else { + item.title = '[Section]'; + } + } + else if (item.itemType == 'newspaperArticle') { + item.publicationTitle = item.title; + item.title = '[Article]'; + } + + if (item.numPages == '1') { + delete item.numPages; + } + + item.libraryCatalog = 'Library of Congress Digital Collections'; + item.complete(); +} + +function first(array) { + if (typeof array == 'string') { + return array; + } + else if (array && array.length) { + return array[0]; + } + else { + return ''; + } +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://www.loc.gov/resource/sn83045462/1902-06-18/ed-1/?sp=14", + "items": [ + { + "itemType": "newspaperArticle", + "title": "[Article]", + "creators": [], + "date": "1902-06-18", + "ISSN": "2331-9968", + "callNumber": "sn83045462", + "extra": "OCLC: ocm02260929", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "pages": 14, + "place": "Washington, D.C", + "publicationTitle": "Evening star", + "rights": "The Library of Congress believes that the newspapers in Chronicling America are in the public domain or have no known copyright restrictions. Newspapers published in the United States more than 95 years ago are in the public domain in their entirety. Any newspapers in Chronicling America that were published less than 95 years ago are also believed to be in the public domain, but may contain some copyrighted third party materials. Researchers using newspapers published less than 95 years ago should be alert for modern content (for example, registered and renewed for copyright and published with notice) that may be copyrighted. Responsibility for making an independent legal assessment of an item and securing any necessary permissions ultimately rests with persons desiring to use the item.\n\n\nThe NEH awardee responsible for producing each digital object is presented in the Chronicling America page display, below the page image – e.g. Image produced by the Library of Congress. For more information on current NDNP awardees, see https://www.loc.gov/ndnp/listawardees.html.\n\n\nFor more information on Library of Congress policies and disclaimers regarding rights and reproductions, see https://www.loc.gov/homepage/legal.html", + "url": "https://www.loc.gov/resource/sn83045462/1902-06-18/ed-1/", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Newspapers" + }, + { + "tag": "Newspapers" + }, + { + "tag": "Washington (D.C.)" + }, + { + "tag": "Washington (D.C.)" + } + ], + "notes": [ + { + "note": "\"From April 25 through May 24, 1861 one sheet issues were published intermittently owing to scarcity of paper.\" Cf. Library of Congress, Photoduplication Service Publisher varies: Noyes, Baker & Co., <1867>; Evening Star Newspaper Co., <1868->" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.loc.gov/resource/sn83016844/1963-10-03/ed-1/?sp=1&q=univac", + "items": [ + { + "itemType": "newspaperArticle", + "title": "[Article]", + "creators": [], + "date": "1963-10-03", + "callNumber": "sn83016844", + "extra": "OCLC: ocm01716569", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "pages": 1, + "place": "Minneapolis, Minn", + "publicationTitle": "Twin City observer", + "rights": "The Library of Congress believes that the newspapers in Chronicling America are in the public domain or have no known copyright restrictions. Newspapers published in the United States more than 95 years ago are in the public domain in their entirety. Any newspapers in Chronicling America that were published less than 95 years ago are also believed to be in the public domain, but may contain some copyrighted third party materials. Researchers using newspapers published less than 95 years ago should be alert for modern content (for example, registered and renewed for copyright and published with notice) that may be copyrighted. Responsibility for making an independent legal assessment of an item and securing any necessary permissions ultimately rests with persons desiring to use the item.\n\n\nThe NEH awardee responsible for producing each digital object is presented in the Chronicling America page display, below the page image – e.g. Image produced by the Library of Congress. For more information on current NDNP awardees, see https://www.loc.gov/ndnp/listawardees.html.\n\n\nFor more information on Library of Congress policies and disclaimers regarding rights and reproductions, see https://www.loc.gov/homepage/legal.html", + "url": "https://www.loc.gov/resource/sn83016844/1963-10-03/ed-1/?q=univac", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "African Americans" + }, + { + "tag": "African Americans" + }, + { + "tag": "Minnesota" + }, + { + "tag": "Minnesota" + }, + { + "tag": "Newspapers" + }, + { + "tag": "Newspapers" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.loc.gov/resource/sn83045462/1902-06-18/ed-1/?sp=14&clip=52,2166,785,159&ciw=217&rot=0", + "items": [ + { + "itemType": "newspaperArticle", + "title": "[Article]", + "creators": [], + "date": "1902-06-18", + "ISSN": "2331-9968", + "callNumber": "sn83045462", + "extra": "OCLC: ocm02260929", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "pages": 14, + "place": "Washington, D.C", + "publicationTitle": "Evening star", + "rights": "The Library of Congress believes that the newspapers in Chronicling America are in the public domain or have no known copyright restrictions. Newspapers published in the United States more than 95 years ago are in the public domain in their entirety. Any newspapers in Chronicling America that were published less than 95 years ago are also believed to be in the public domain, but may contain some copyrighted third party materials. Researchers using newspapers published less than 95 years ago should be alert for modern content (for example, registered and renewed for copyright and published with notice) that may be copyrighted. Responsibility for making an independent legal assessment of an item and securing any necessary permissions ultimately rests with persons desiring to use the item.\n\n\nThe NEH awardee responsible for producing each digital object is presented in the Chronicling America page display, below the page image – e.g. Image produced by the Library of Congress. For more information on current NDNP awardees, see https://www.loc.gov/ndnp/listawardees.html.\n\n\nFor more information on Library of Congress policies and disclaimers regarding rights and reproductions, see https://www.loc.gov/homepage/legal.html", + "url": "https://www.loc.gov/resource/sn83045462/1902-06-18/ed-1/", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + }, + { + "title": "Clipping", + "mimeType": "image/jpeg" + } + ], + "tags": [ + { + "tag": "Newspapers" + }, + { + "tag": "Newspapers" + }, + { + "tag": "Washington (D.C.)" + }, + { + "tag": "Washington (D.C.)" + } + ], + "notes": [ + { + "note": "\"From April 25 through May 24, 1861 one sheet issues were published intermittently owing to scarcity of paper.\" Cf. Library of Congress, Photoduplication Service Publisher varies: Noyes, Baker & Co., <1867>; Evening Star Newspaper Co., <1868->" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.loc.gov/resource/g3701gm.gct00013/?sp=31&st=image", + "detectedItemType": "map", + "items": [ + { + "itemType": "bookSection", + "title": "Southeastern Alaska", + "creators": [ + { + "lastName": "Geological Survey (U.S.)", + "creatorType": "contributor", + "fieldMode": 1 + }, + { + "firstName": "Arch C.", + "lastName": "Gerlach", + "creatorType": "author" + } + ], + "date": "1970-01-01", + "archive": "Library of Congress Geography and Map Division Washington, D.C. 20540-4650 USA dcu", + "archiveLocation": "G1200 .U57 1970", + "bookTitle": "The national atlas of the United States of America", + "callNumber": "79654043", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "pages": 31, + "place": "Washington", + "rights": "The maps in the Map Collections materials were either published prior to \r1922, produced by the United States government, or both (see catalogue \rrecords that accompany each map for information regarding date of \rpublication and source). The Library of Congress is providing access to \rthese materials for educational and research purposes and is not aware of \rany U.S. copyright protection (see Title 17 of the United States Code) or any \rother restrictions in the Map Collection materials.\r\n\n\rNote that the written permission of the copyright owners and/or other rights \rholders (such as publicity and/or privacy rights) is required for distribution, \rreproduction, or other use of protected items beyond that allowed by fair use \ror other statutory exemptions. Responsibility for making an independent \rlegal assessment of an item and securing any necessary permissions \rultimately rests with persons desiring to use the item.\r\n\n\rCredit Line: Library of Congress, Geography and Map Division.", + "url": "https://www.loc.gov/resource/g3701gm.gct00013/", + "attachments": [], + "tags": [ + { + "tag": "Census, 1970" + }, + { + "tag": "Maps" + }, + { + "tag": "Statistics" + }, + { + "tag": "United States" + }, + { + "tag": "United States" + } + ], + "notes": [ + { + "note": "Six transparent overlays in envelope inserted Signed by William T. Pecora, Under Secretary of Interior, W.A. Radlinski, Associate Director, U.S.G.S., Arch C. Gerlach, Chief Geographer, and William B. Overstreet, Chief National Atlas Project and is number 13 of 14 copies" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.loc.gov/resource/g3701gm.gct00013/?sp=31&st=image&clip=606,833,3096,3784&ciw=401&rot=0", + "detectedItemType": "map", + "items": [ + { + "itemType": "bookSection", + "title": "Southeastern Alaska", + "creators": [ + { + "lastName": "Geological Survey (U.S.)", + "creatorType": "contributor", + "fieldMode": 1 + }, + { + "firstName": "Arch C.", + "lastName": "Gerlach", + "creatorType": "author" + } + ], + "date": "1970-01-01", + "archive": "Library of Congress Geography and Map Division Washington, D.C. 20540-4650 USA dcu", + "archiveLocation": "G1200 .U57 1970", + "bookTitle": "The national atlas of the United States of America", + "callNumber": "79654043", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "pages": 31, + "place": "Washington", + "rights": "The maps in the Map Collections materials were either published prior to \r1922, produced by the United States government, or both (see catalogue \rrecords that accompany each map for information regarding date of \rpublication and source). The Library of Congress is providing access to \rthese materials for educational and research purposes and is not aware of \rany U.S. copyright protection (see Title 17 of the United States Code) or any \rother restrictions in the Map Collection materials.\r\n\n\rNote that the written permission of the copyright owners and/or other rights \rholders (such as publicity and/or privacy rights) is required for distribution, \rreproduction, or other use of protected items beyond that allowed by fair use \ror other statutory exemptions. Responsibility for making an independent \rlegal assessment of an item and securing any necessary permissions \rultimately rests with persons desiring to use the item.\r\n\n\rCredit Line: Library of Congress, Geography and Map Division.", + "url": "https://www.loc.gov/resource/g3701gm.gct00013/", + "attachments": [ + { + "title": "Clipping", + "mimeType": "image/jpeg" + } + ], + "tags": [ + { + "tag": "Census, 1970" + }, + { + "tag": "Maps" + }, + { + "tag": "Statistics" + }, + { + "tag": "United States" + }, + { + "tag": "United States" + } + ], + "notes": [ + { + "note": "Six transparent overlays in envelope inserted Signed by William T. Pecora, Under Secretary of Interior, W.A. Radlinski, Associate Director, U.S.G.S., Arch C. Gerlach, Chief Geographer, and William B. Overstreet, Chief National Atlas Project and is number 13 of 14 copies" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.loc.gov/resource/rbpe.24404500/", + "items": [ + { + "itemType": "book", + "title": "Gettysburg address delivered at Gettysburg Pa. Nov. 19th, 1863. [n. p. n. d.].", + "creators": [], + "archive": "Printed Ephemera Collection", + "archiveLocation": "Portfolio 244, Folder 45", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "rights": "The Library of Congress is providing access to these materials for educational and research purposes and makes no warranty with regard to their use for other purposes. Responsibility for making an independent legal assessment of an item and securing any necessary permissions ultimately rests with persons desiring to use the item. The written permission of the copyright owners and/or other rights holders (such as publicity and/or privacy rights) is required for distribution, reproduction, or other use of protected items beyond that allowed by fair use or other statutory exemptions.\n\n\nWith a few exceptions, the Library is not aware of any U.S. copyright protection (see Title 17, U.S.C.) or any other restrictions in the materials in the Printed Ephemera Collection. There may be content that is protected as \"works for hire\" (copyright may be held by the party that commissioned the original work) and/or under the copyright or neighboring-rights laws of other nations. A few items in this online presentation are subject to copyright and are made available here with permission of the copyright owners. Copyright information is provided with these specific items.\n\n\nIn all cases, responsibility for making an independent legal assessment of an item and securing any necessary permissions ultimately rests with persons desiring to use the item.\n\n\nItems included here with the permission of rights holders are listed below, and permission is noted in the catalog record for each item. In some c…", + "url": "https://www.loc.gov/resource/rbpe.24404500/", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.loc.gov/resource/g3701em.gct00002/?sp=7", + "items": [ + { + "itemType": "book", + "title": "Indian land cessions in the United States", + "creators": [ + { + "firstName": "Charles C.", + "lastName": "Royce", + "creatorType": "author" + }, + { + "firstName": "Cyrus", + "lastName": "Thomas", + "creatorType": "author" + } + ], + "date": "1899", + "archive": "Library of Congress Geography and Map Division Washington, D.C. 20540-4650 USA dcu", + "archiveLocation": "KIE610 .R69 1899", + "callNumber": "13023487", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "numPages": "521", + "rights": "The contents of this collection are in the public domain and are free to use and reuse.\n\n\r\nCredit Line: Law Library of Congress\n\n\r\nMore about Copyright and other Restrictions.\n\n\r\nFor guidance about compiling full citations consult Citing Primary Sources.", + "url": "https://www.loc.gov/resource/g3701em.gct00002/", + "attachments": [], + "tags": [ + { + "tag": "Government relations" + }, + { + "tag": "Indian land transfers" + }, + { + "tag": "Indians of North America" + }, + { + "tag": "United States" + } + ], + "notes": [ + { + "note": "United States Serial Set Number 4015 contains the second part of the two-part Eighteenth Annual Report of the Bureau of American Ethnology to the Secretary of the Smithsonian Institution, 1896-1897. (Part one is printed in United States Serial Set Number 4014.) Part two, which was also printed as House Document No. 736 of the U.S. Serial Set, 56th Congress, 1st Session, features sixty-seven maps and two tables compiled by Charles C. Royce, with an introductory essay by Cyrus Thomas. The tables are entitled: Schedule of Treaties and Acts of Congress Authorizing Allotments of Lands in Severalty and Schedule of Indian Land Cessions. The Schedule of Indian Land Cessions subtitle notes that it \"indicates the number and location of each cession by or reservation for the Indian tribes from the organization of the Federal Government to and including 1894, together with descriptions of the tracts so ceded or reserved, the date of the treaty, law or executive order governing the same, the name of the tribe or tribes affected thereby, and historical data and references bearing thereon.\"" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.loc.gov/item/03004902/", + "items": [ + { + "itemType": "book", + "title": "Notes on the state of Virginia", + "creators": [ + { + "firstName": "Thomas", + "lastName": "Jefferson", + "creatorType": "author" + }, + { + "lastName": "Joseph Meredith Toner Collection (Library of Congress)", + "creatorType": "contributor", + "fieldMode": 1 + } + ], + "date": "1832", + "callNumber": "03004902", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "numPages": "2", + "place": "Boston", + "publisher": "Lilly and Wait", + "rights": "The Library of Congress is providing access to these materials for educational and research purposes and makes no warranty with regard to their use for other purposes. Responsibility for making an independent legal assessment of an item and securing any necessary permissions ultimately rests with persons desiring to use the item. The written permission of the copyright owners and/or holders of other rights (such as publicity and/or privacy rights) is required for distribution, reproduction, or other use of protected items beyond that allowed by fair use or other statutory exemptions. See American Memory, Copyright, and Other Restrictions and Privacy and Publicity Rights for additional information. \n\n\nThe Library is not aware of any U.S. copyright protection (see Title 17, U.S.C.) or any other restrictions in the materials in The Capital and the Bay; however there are two items from the publication entitled A Lecture on Our National Capital by Frederick Douglass, Anacostia Neighborhood Museum, Smithsonian Institution, and National Park Service, United States Department of the Interior, published by the Smithsonian Institution Press, Washington, D.C., 1978, for which additional information is provided below: \n\n\n\"'The Freedman's Savings and Trust Company, located on Pennsylvania Avenue at Fifteenth Street, N.W., opposite the Treasury Building.'\" This image is credited to the National Archives in the above publication. The National Archives believes that th…", + "url": "https://www.loc.gov/resource/gdcmassbookdig.notesonstateofvi00jeff_0/", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Description and travel" + }, + { + "tag": "History" + }, + { + "tag": "Logan, James" + }, + { + "tag": "Virginia" + }, + { + "tag": "Virginia" + } + ], + "notes": [ + { + "note": "\"An appendix ... relative to the murder of Logan's family\": p. [238]-274" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.loc.gov/item/96509623/", + "items": [ + { + "itemType": "artwork", + "title": "Is this a republican form of government? Is this protecting life, liberty, or property? Is this the equal protection of the laws?", + "creators": [ + { + "firstName": "Thomas", + "lastName": "Nast", + "creatorType": "author" + } + ], + "date": "1876-01-01", + "abstractNote": "African American man kneeling by bodies of murdered African American people. In background sign reads, \"the White Liners were here.\"", + "artworkMedium": "graphic", + "callNumber": "96509623", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "shortTitle": "Is this a republican form of government?", + "url": "https://www.loc.gov/resource/cph.3c16355/", + "attachments": [], + "tags": [ + { + "tag": "1870-1880" + }, + { + "tag": "1870-1880" + }, + { + "tag": "1870-1880" + }, + { + "tag": "1870-1880" + }, + { + "tag": "African Americans" + }, + { + "tag": "Homicides" + }, + { + "tag": "Periodical illustrations" + }, + { + "tag": "Punishment & torture" + }, + { + "tag": "Wood engravings" + } + ], + "notes": [ + { + "note": "Illus. in: Harper's weekly, 1876 Sept. 2, p. 712" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.loc.gov/resource/ppmsca.51533/", + "items": [ + { + "itemType": "artwork", + "title": "Brünnhilde", + "creators": [ + { + "firstName": "Adolph Edward", + "lastName": "Weidhaas", + "creatorType": "author" + } + ], + "date": "1936", + "abstractNote": "Photograph shows side view of a cat wearing a winged helmet and breastplate armor in the role of the valkyrie Brünnhilde from the opera Der Ring des Niebelungen", + "archive": "Library of Congress Prints and Photographs Division Washington, D.C. 20540 USA http://hdl.loc.gov/loc.pnp/pp.print", + "archiveLocation": "Unprocessed in PR 06 CN 007-A [item] [P&P]", + "artworkMedium": "graphic", + "callNumber": "2017645524", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "url": "https://www.loc.gov/resource/ppmsca.51533/", + "attachments": [], + "tags": [ + { + "tag": "1930-1940" + }, + { + "tag": "1930-1940" + }, + { + "tag": "1930-1940" + }, + { + "tag": "1930-1940" + }, + { + "tag": "1930-1940" + }, + { + "tag": "Animals in human situations" + }, + { + "tag": "Cats" + }, + { + "tag": "Costumes" + }, + { + "tag": "Humorous pictures" + }, + { + "tag": "Photographic prints" + } + ], + "notes": [ + { + "note": "Title from item Copyright by Adolph E. Weidhaas, Old Greenwich, Conn" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.loc.gov/item/2017762891/", + "items": [ + { + "itemType": "artwork", + "title": "Destitute pea pickers in California. Mother of seven children. Age thirty-two. Nipomo, California", + "creators": [ + { + "firstName": "Dorothea", + "lastName": "Lange", + "creatorType": "author" + } + ], + "date": "1936-01-01", + "abstractNote": "Photograph shows Florence Thompson with three of her children in a photograph known as \"Migrant Mother.\" For background information, see \"Dorothea Lange's M̀igrant Mother' photographs ...\"", + "archive": "Library of Congress Prints and Photographs Division Washington, D.C. 20540 USA http://hdl.loc.gov/loc.pnp/pp.print", + "archiveLocation": "LC-USF34- 009058-C [P&P] LC-USF346-009058-C b&w film transparency LC-USF347-009058-C b&w film safety neg. LOT 344 (corresponding photographic print)", + "artworkMedium": "graphic", + "callNumber": "2017762891", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "rights": "The contents of the Library of Congress Farm Security Administration/Office of War Information Black-and-White Negatives are in the public domain and are free to use and reuse.\n\n\n Credit Line: Library of Congress, Prints & Photographs Division, Farm Security Administration/Office of War Information Black-and-White Negatives.\n\n\nFor information about reproducing, publishing, and citing material from this collection, as well as access to the original items, see: U.S. Farm Security Administration/Office of War Information Black & White Photographs - Rights and Restrictions Information\n\n\n\nMore about Copyright and other Restrictions \n\n\nFor guidance about compiling full citations consult Citing Primary Sources.", + "url": "https://www.loc.gov/resource/fsa.8b29516/", + "attachments": [], + "tags": [ + { + "tag": "Group portraits" + }, + { + "tag": "Migrant agricultural laborers" + }, + { + "tag": "Migrants--California" + }, + { + "tag": "Mothers" + }, + { + "tag": "Nitrate negatives" + }, + { + "tag": "Poor persons" + }, + { + "tag": "Portrait photographs" + } + ], + "notes": [ + { + "note": "A copy transparency (LC-USF346-009058-C) and a copy safety negative (LC-USF347-009058-C) are also in the collection Digital file was made from the original nitrate negative for \"Migrant Mother\" (LC-USF34-009058-C). The negative was retouched in the 1930s to erase the thumb holding a tent pole in lower right hand corner. The file print made before the thumb was retouched can be seen at http://hdl.loc.gov/loc.pnp/ppmsca.12883 Title from caption card for negative. Title on print: \"Destitute pea pickers in California. A 32 year old mother of seven children.\" Date from: Dorothea Lange : migrant mother / Sara Hermanson Meister. New York: Museum of Modern Art, 2018" + }, + { + "note": "More information about the FSA/OWI Collection is available at" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.loc.gov/item/mtjbib000156/", + "items": [ + { + "itemType": "manuscript", + "title": "Thomas Jefferson, June 1776, Rough Draft of the Declaration of Independence", + "creators": [], + "date": "1776-06", + "archive": "Manuscript Division", + "archiveLocation": "Microfilm Reel: 001", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "rights": "The Library of Congress is providing access to The Thomas Jefferson Papers at the Library of Congress for noncommercial, educational and research purposes. While the Library is not aware of any copyrights or other rights associated with this Collection, the written permission of any copyright owners and/or other rights holders (such as publicity and/or privacy rights) is required for reproduction, distribution, or other use of any protected items beyond that allowed by fair use or other statutory exemptions. Responsibility for making an independent legal assessment of an item and securing any necessary permissions ultimately rests with the persons desiring to use the item. \n\n\n\tCredit Line: Library of Congress, Manuscript Division. \n\n\n\tThe following items are included in this Collection with permission:\n\n\n\tThe essay \"American Sphinx: The Contradictions of Thomas Jefferson\" by Joseph J. Ellis was originally published in the November-December 1994 issue of Civilization: The Magazine of the Library of Congress and may not be reprinted in any other form or by any other source.\n\n\n\tThe essay \"The Jamestown Records of the Virginia Company of London: A Conservator's Perspective\" by Sylvia R. Albro and Holly H. Krueger was originally published in a slightly different form in Proceedings of the Fourth International Conference of the Institute of Paper Conservation, 6-9 April 1997 and may not be reprinted in any other form or by any other source.\n\n\n\tRembrandt Peale's 1800 Thom…", + "url": "https://www.loc.gov/resource/mtj1.001_0545_0548/", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.loc.gov/item/98688323/", + "items": [ + { + "itemType": "map", + "title": "A new and complete railroad map of the United States compiled from reliable sources", + "creators": [ + { + "firstName": "William", + "lastName": "Perris", + "creatorType": "author" + } + ], + "date": "1857-01-01", + "abstractNote": "Map of the eastern half of the United States showing cities, state boundaries, finished railroads, and railroads in progress", + "archive": "Library of Congress Geography and Map Division Washington, D.C. 20540-4650 USA dcu", + "archiveLocation": "G3701.P3 1857 .P4", + "callNumber": "98688323", + "language": "english", + "libraryCatalog": "Library of Congress Digital Collections", + "place": "New York,", + "rights": "The maps in the Map Collections materials were either published prior to \r1922, produced by the United States government, or both (see catalogue \rrecords that accompany each map for information regarding date of \rpublication and source). The Library of Congress is providing access to \rthese materials for educational and research purposes and is not aware of \rany U.S. copyright protection (see Title 17 of the United States Code) or any \rother restrictions in the Map Collection materials.\r\n\n\rNote that the written permission of the copyright owners and/or other rights \rholders (such as publicity and/or privacy rights) is required for distribution, \rreproduction, or other use of protected items beyond that allowed by fair use \ror other statutory exemptions. Responsibility for making an independent \rlegal assessment of an item and securing any necessary permissions \rultimately rests with persons desiring to use the item.\r\n\n\rCredit Line: Library of Congress, Geography and Map Division.", + "url": "https://www.loc.gov/resource/g3701p.rr000330/", + "attachments": [], + "tags": [ + { + "tag": "Maps" + }, + { + "tag": "Railroads" + }, + { + "tag": "United States" + } + ], + "notes": [ + { + "note": "Description derived from published bibliography Insets: [Boston & vicinity] includes list of \"Boston Depots.\" 14 x 20 cm.--[New York & vicinity] includes \"Rail road depots in the city of New York.\" 13 x 30 cm.--[Philadelphia & vicinity] includes list of \"Philadelphia depots.\" 13 x 23 cm.--Rail road map of Massachusetts, Connecticut and Rhode Island...1857. 23 x 19 cm" + } + ], + "seeAlso": [] + } + ] + } +] +/** END TEST CASES **/ From 6c9d01f6a3af021995c3cf3ad98f35629c4afdf5 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 29 Aug 2024 11:24:32 -0400 Subject: [PATCH 111/158] Emerald Insight: Use new API when possible Closes #3332 --- Emerald Insight.js | 318 ++++++++++++++++++++++++++++----------------- 1 file changed, 196 insertions(+), 122 deletions(-) diff --git a/Emerald Insight.js b/Emerald Insight.js index a2deaebc21b..20f7f86e37b 100644 --- a/Emerald Insight.js +++ b/Emerald Insight.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2019-12-25 15:35:07" + "lastUpdated": "2024-08-29 15:32:04" } /* @@ -35,13 +35,11 @@ ***** END LICENSE BLOCK ***** */ -// attr()/text() v2 -// eslint-disable-next-line -function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null;}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null;} +let doiRe = /\/(10\.[^#?/]+\/[^#?/]+)\//; function detectWeb(doc, url) { // ensure that we only detect where scrape will (most likely) work - if (url.includes('/content/doi/') && (url.search(/\/(10\.[^#?/]+\/[^#?/]+)\//) != -1 || url.includes("/full"))) { + if (url.includes('/content/doi/') && doiRe.test(url)) { if (attr(doc, 'meta[name="dc.Type"]', 'content') == "book-part") { return "bookSection"; } @@ -78,36 +76,47 @@ function getSearchResults(doc, url, checkOnly) { } -function doWeb(doc, url) { +async function doWeb(doc, url) { if (detectWeb(doc, url) == "multiple") { - Zotero.selectItems(getSearchResults(doc, url, false), function (items) { - if (!items) { - return; - } - var articles = []; - for (var i in items) { - articles.push(i); - } - ZU.processDocuments(articles, scrape); - }); + let items = await Zotero.selectItems(getSearchResults(doc, url, false)); + if (!items) return; + for (let url of Object.keys(items)) { + // requestDocument() doesn't yet set doc.cookie, so pass the parent doc's cookie + await scrape(await requestDocument(url), url, doc.cookie); + } } else { - scrape(doc, url); + await scrape(doc, url); } } - -function scrape(doc, url) { - var DOI = url.match(/\/(10\.[^#?/]+\/[^#?/]+)\//); - var risURL; - if (DOI) { - risURL = "/insight/content/doi/" + DOI[1] + "/full/ris"; +async function scrape(doc, url, cookieFallback) { + let response; + let DOI = url.match(doiRe)[1]; + let cookie = doc.cookie || cookieFallback; + let xsrfTokenMatch = cookie && cookie.match(/XSRF-TOKEN=([^;]+)/); + if (xsrfTokenMatch) { + let xsrfToken = xsrfTokenMatch[1]; + Z.debug('Using new API. XSRF token:'); + Z.debug(xsrfToken); + + let risURL = "/insight/api/citations/format/ris?_xsrf=" + xsrfToken; // Already URL-encoded + let body = JSON.stringify({ dois: [DOI] }); + response = await requestText(risURL, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'X-XSRF-TOKEN': decodeURIComponent(xsrfToken) + }, + body + }); } else { - Z.debug("can't find DOI, trying alternative approach for risURL"); - risURL = url.replace(/\/full.*/, "/full/ris"); + Z.debug('Using old API'); + + let risURL = "/insight/content/doi/" + DOI + "/full/ris"; + response = await requestText(risURL); } - // Z.debug(risURL); var pdfURL; // make this works on PDF pages @@ -118,66 +127,63 @@ function scrape(doc, url) { pdfURL = attr(doc, 'a.intent_pdf_link', 'href'); } - // Z.debug("pdfURL: " + pdfURL); - ZU.doGet(risURL, function (response) { - // they number authors in their RIS... - response = response.replace(/A\d+\s+-/g, "AU -"); + // they number authors in their RIS... + response = response.replace(/^A\d+\s+-/gm, "AU -"); - var abstract = doc.getElementById('abstract'); - var translator = Zotero.loadTranslator("import"); - var tags = doc.querySelectorAll('li .intent_text'); - translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); - translator.setString(response); - translator.setHandler("itemDone", function (obj, item) { - if (pdfURL) { - item.attachments.push({ - url: pdfURL, - title: "Full Text PDF", - mimeType: "application/pdf" - }); - } - else { - item.attachments.push({ - title: "Snapshot", - document: doc + var abstract = doc.getElementById('abstract'); + var translator = Zotero.loadTranslator("import"); + var tags = doc.querySelectorAll('li .intent_text'); + translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); + translator.setString(response); + translator.setHandler("itemDone", function (obj, item) { + if (pdfURL) { + item.attachments.push({ + url: pdfURL, + title: "Full Text PDF", + mimeType: "application/pdf" + }); + } + else { + item.attachments.push({ + title: "Snapshot", + document: doc + }); + } + + for (let tag of tags) { + item.tags.push(tag.textContent); + } + + var authorsNodes = doc.querySelectorAll("div > a.contrib-search"); + if (authorsNodes.length > 0) { + // prefer the authors information from the website as it contains the last and first name separately + // where the RIS data does not separate them correctly (it uses a space instead of comma) + // but the editors are only part of the RIS data + var authors = []; + for (let author of authorsNodes) { + authors.push({ + firstName: text(author, "span.given-names"), + lastName: text(author, "span.surname"), + creatorType: "author" }); } - - for (let tag of tags) { - item.tags.push(tag.textContent); - } - - var authorsNodes = doc.querySelectorAll("div > a.contrib-search"); - if (authorsNodes.length > 0) { - // prefer the authors information from the website as it contains the last and first name separately - // where the RIS data does not separate them correctly (it uses a space instead of comma) - // but the editors are only part of the RIS data - var authors = []; - for (let author of authorsNodes) { - authors.push({ - firstName: text(author, "span.given-names"), - lastName: text(author, "span.surname"), - creatorType: "author" - }); - } - var otherContributors = item.creators.filter(creator => creator.creatorType !== "author"); - item.creators = otherContributors.length !== 0 ? authors.concat(separateNames(otherContributors)) : authors; - } - else { - Z.debug("No tags available for authors"); - item.creators = separateNames(item.creators); - } + var otherContributors = item.creators.filter(creator => creator.creatorType !== "author"); + item.creators = otherContributors.length !== 0 ? authors.concat(separateNames(otherContributors)) : authors; + } + else { + Z.debug("No tags available for authors"); + item.creators = separateNames(item.creators); + } - if (item.date) { - item.date = ZU.strToISO(item.date); - } - if (abstract) { - item.abstractNote = ZU.trimInternal(abstract.textContent).replace(/^Abstract\s*/, ""); - } - item.complete(); - }); - translator.translate(); + if (item.date) { + item.date = ZU.strToISO(item.date); + } + if (abstract) { + item.abstractNote = ZU.trimInternal(abstract.textContent).replace(/^Abstract\s*/, ""); + } + item.complete(); }); + await translator.translate(); } function separateNames(creators) { @@ -283,18 +289,18 @@ var testCases = [ "creators": [ { "lastName": "Menk", - "creatorType": "author", - "firstName": "K. Bryan" + "firstName": "K. Bryan", + "creatorType": "author" }, { "lastName": "Malone", - "creatorType": "author", - "firstName": "Stephanie" + "firstName": "Stephanie", + "creatorType": "author" } ], "date": "2015-01-01", "ISBN": "9781784415877 9781784415884", - "abstractNote": "Originality/value This technique creates opportunities for students to have unique assignments encouraging student to student teaching and can be applied to assignments in any accounting course (undergraduate and graduate). This testing method has been used in Intermediate I and II, Individual Taxation, and Corporate Taxation.", + "abstractNote": "Purpose The subject area of the assignment is accounting education and testing techniques. Methodology/approach This paper details an effective method to create individualized assignments and testing materials. Using a spreadsheet (Microsoft Excel), the creation of the unique assignments and answer keys can be semi-automated to reduce the grading difficulties of unique assignments. Findings Because students are using a unique data set for each assignment, the students are able to more effectively engage in student to student teaching. This process of unique assignments allows students to collaborate without fear that a single student would provide the answers. As tax laws (e.g., credit and deduction phase-outs, tax rates, and dependents) change depending on the level of income and other factors, an individualized test is ideal in a taxation course. Practical implications The unique assignments allow instructors to create markedly different scenarios for each student. Using this testing method requires that the student thoroughly understands the conceptual processes as the questions cannot be predicted. A list of supplementary materials is included, covering sample questions, conversion to codes, and sample assignment questions. Originality/value This technique creates opportunities for students to have unique assignments encouraging student to student teaching and can be applied to assignments in any accounting course (undergraduate and graduate). This testing method has been used in Intermediate I and II, Individual Taxation, and Corporate Taxation.", "bookTitle": "Advances in Accounting Education: Teaching and Curriculum Innovations", "extra": "DOI: 10.1108/S1085-462220150000016007", "libraryCatalog": "Emerald Insight", @@ -306,7 +312,8 @@ var testCases = [ "volume": "16", "attachments": [ { - "title": "Snapshot" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [ @@ -339,24 +346,24 @@ var testCases = [ "title": "The influence of context upon consumer sensory evaluation of chicken‐meat quality", "creators": [ { + "firstName": "Orla", "lastName": "Kennedy", - "creatorType": "author", - "firstName": "Orla" + "creatorType": "author" }, { + "firstName": "Barbara", "lastName": "Stewart‐Knox", - "creatorType": "author", - "firstName": "Barbara" + "creatorType": "author" }, { + "firstName": "Peter", "lastName": "Mitchell", - "creatorType": "author", - "firstName": "Peter" + "creatorType": "author" }, { + "firstName": "David", "lastName": "Thurnham", - "creatorType": "author", - "firstName": "David" + "creatorType": "author" } ], "date": "2004-01-01", @@ -371,8 +378,8 @@ var testCases = [ "volume": "106", "attachments": [ { - "title": "Full Text PDF", - "mimeType": "application/pdf" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [ @@ -401,33 +408,33 @@ var testCases = [ "creators": [ { "lastName": "Kutz-Flamenbaum", - "creatorType": "author", - "firstName": "Rachel V." + "firstName": "Rachel V.", + "creatorType": "author" }, { "lastName": "Staggenborg", - "creatorType": "author", - "firstName": "Suzanne" + "firstName": "Suzanne", + "creatorType": "author" }, { "lastName": "Duncan", - "creatorType": "author", - "firstName": "Brittany J." + "firstName": "Brittany J.", + "creatorType": "author" }, { "lastName": "Earl", - "creatorType": "editor", - "firstName": "Jennifer" + "firstName": "Jennifer", + "creatorType": "editor" }, { - "lastName": "A. Rohlinger", - "creatorType": "editor", - "firstName": "Deana" + "lastName": "Rohlinger", + "firstName": "Deana A.", + "creatorType": "editor" } ], "date": "2012-01-01", "ISBN": "9781780528816 9781780528809", - "abstractNote": "Research implications – We argue that events such as the G-20 meetings provide protesters with opportunities to gain temporary “standing” with the media. During such times, activists can use tactics and frames to alter the balance of power in relations with the media and the state and to attract positive media coverage, particularly when activists develop strategies that are not exclusively focused on the media. We argue that a combination of political opportunities and activist media strategies enabled protest organizers to position themselves as central figures in the G-20 news story and leverage that position to build media interest, develop relationships with reporters, and influence newspaper coverage.", + "abstractNote": "Purpose – Movements typically have great difficulty using the mass media to spread their messages to the public, given the media's greater power to impose their frames on movement activities and goals. In this paper, we look at the impact of the political context and media strategies of protesters against the 2009 G-20 meetings in Pittsburgh on media coverage of the protests.Methodology – We employ field observations, interviews with activists and reporters, and a content analysis of print coverage of the demonstrations by the two local daily newspapers, the Pittsburgh Post-Gazette and the Pittsburgh Tribune-Review.Findings – We find that protesters were relatively successful in influencing how they were portrayed in local newspaper stories and in developing a sympathetic image of their groups’ members. Specifically, we find that activist frames were present in newspaper coverage and activists were quoted as frequently as city officials.Research implications – We argue that events such as the G-20 meetings provide protesters with opportunities to gain temporary “standing” with the media. During such times, activists can use tactics and frames to alter the balance of power in relations with the media and the state and to attract positive media coverage, particularly when activists develop strategies that are not exclusively focused on the media. We argue that a combination of political opportunities and activist media strategies enabled protest organizers to position themselves as central figures in the G-20 news story and leverage that position to build media interest, develop relationships with reporters, and influence newspaper coverage.", "bookTitle": "Media, Movements, and Political Change", "extra": "DOI: 10.1108/S0163-786X(2012)0000033008", "libraryCatalog": "Emerald Insight", @@ -438,7 +445,8 @@ var testCases = [ "volume": "33", "attachments": [ { - "title": "Snapshot" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [ @@ -475,29 +483,29 @@ var testCases = [ "title": "Tourism research in Spain: The contribution of geography (1960–1995)", "creators": [ { + "firstName": "Salvador", "lastName": "Antón i Clavé", - "creatorType": "author", - "firstName": "Salvador" + "creatorType": "author" }, { + "firstName": "Francisco", "lastName": "López Palomeque", - "creatorType": "author", - "firstName": "Francisco" + "creatorType": "author" }, { + "firstName": "Manuel J.", "lastName": "Marchena Gómez", - "creatorType": "author", - "firstName": "Manuel J." + "creatorType": "author" }, { + "firstName": "Sevilla", "lastName": "Vera Rebollo", - "creatorType": "author", - "firstName": "Sevilla" + "creatorType": "author" }, { + "firstName": "J.", "lastName": "Fernando Vera Rebollo", - "creatorType": "author", - "firstName": "J." + "creatorType": "author" } ], "date": "1996-01-01", @@ -513,8 +521,8 @@ var testCases = [ "volume": "51", "attachments": [ { - "title": "Full Text PDF", - "mimeType": "application/pdf" + "title": "Snapshot", + "mimeType": "text/html" } ], "tags": [ @@ -547,6 +555,72 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://www.emerald.com/insight/content/doi/10.1108/JACPR-02-2022-0685/full/html", + "items": [ + { + "itemType": "journalArticle", + "title": "A multi-level, time-series network analysis of the impact of youth peacebuilding on quality peace", + "creators": [ + { + "firstName": "Laura K.", + "lastName": "Taylor", + "creatorType": "author" + }, + { + "firstName": "Celia", + "lastName": "Bähr", + "creatorType": "author" + } + ], + "date": "2023-01-01", + "DOI": "10.1108/JACPR-02-2022-0685", + "ISSN": "1759-6599", + "abstractNote": "Purpose Over 60% of armed conflicts re-occur; the seed of future conflict is sown even as a peace agreement is signed. The cyclical nature of war calls for a focus on youth who can disrupt this pattern over time. Addressing this concern, the developmental peace-building model calls for a dynamic, multi-level and longitudinal approach. Using an innovative statistical approach, this study aims to investigate the associations among four youth peace-building dimensions and quality peace. Design/methodology/approach Multi-level time-series network analysis of a data set containing 193 countries and spanning the years between 2011 and 2020 was performed. This statistical approach allows for complex modelling that can reveal new patterns of how different youth peace-building dimensions (i.e. education, engagement, information, inclusion), identified through rapid evidence assessment, promote quality peace over time. Such a methodology not only assesses between-country differences but also within-country change. Findings While the within-country contemporaneous network shows positive links for education, the temporal network shows significant lagged effects for all four dimensions on quality peace. The between-country network indicates significant direct effects of education and information, on average, and indirect effects of inclusion and engagement, on quality peace. Originality/value This approach demonstrates a novel application of multi-level time-series network analysis to explore the dynamic development of quality peace, capturing both stability and change. The analysis illustrates how youth peace-building dimensions impact quality peace in the macro-system globally. This investigation of quality peace thus illustrates that the science of peace does not necessitate violent conflict.", + "issue": "2", + "libraryCatalog": "Emerald Insight", + "pages": "109-123", + "publicationTitle": "Journal of Aggression, Conflict and Peace Research", + "url": "https://doi.org/10.1108/JACPR-02-2022-0685", + "volume": "15", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Developmental peace-building model" + }, + { + "tag": "Education" + }, + { + "tag": "Engagement" + }, + { + "tag": "Inclusion" + }, + { + "tag": "Information" + }, + { + "tag": "Quality peace" + }, + { + "tag": "Time-series network analysis" + }, + { + "tag": "Youth peacebuilding" + } + ], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 3b4ec8298e7b5f389bfb279db981e95d7b918ae8 Mon Sep 17 00:00:00 2001 From: Tim Sherratt Date: Wed, 4 Sep 2024 01:24:13 +1000 Subject: [PATCH 112/158] minor fix for Queensland State Archives (#3356) --- Queensland State Archives.js | 69 ++++++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 6 deletions(-) diff --git a/Queensland State Archives.js b/Queensland State Archives.js index 45a7473991f..2939cbf3b72 100644 --- a/Queensland State Archives.js +++ b/Queensland State Archives.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-08-21 19:41:51" + "lastUpdated": "2024-08-28 06:00:51" } /* @@ -88,7 +88,10 @@ async function scrape(url) { let item = new Zotero.Item("manuscript"); item.title = data.title; if ("record_type" in data.subject_terms) { - item.type = data.subject_terms.record_type.join("; "); + let recordTypes = data.subject_terms.record_type.map( + term => term.term + ); + item.type = recordTypes.join("; "); } item.archive = "Queensland State Archives"; item.archiveLocation = data.qsa_id_prefixed; @@ -115,8 +118,7 @@ async function scrape(url) { }); } // Add digital representation - if (data.digital_representations.length > 0) { - let image = data.digital_representations[0]; + for (let image of data.digital_representations) { let imageID = image.qsa_id_prefixed; let mimeType, imageTitle; if (image.file_type == "JPEG") { @@ -127,12 +129,12 @@ async function scrape(url) { mimeType = "application/pdf"; imageTitle = "PDF " + imageID; } - item.attachments = [{ + item.attachments.push({ title: imageTitle, url: "https://www.archivessearch.qld.gov.au/api/download_file/" + imageID, mimeType: mimeType, snapshot: true - }]; + }); } item.complete(); } @@ -240,7 +242,62 @@ var testCases = [ { "type": "web", "url": "https://www.archivessearch.qld.gov.au/search?f[]=keywords&has_digital=false&op[]=AND&open=false&q[]=wragge&sort=relevance&type[]=archival_object", + "defer": true, "items": "multiple" + }, + { + "type": "web", + "url": "https://www.archivessearch.qld.gov.au/items/ITM276520", + "items": [ + { + "itemType": "manuscript", + "title": "Criminal files - Supreme Court, Northern District, Townsville", + "creators": [ + { + "lastName": "A267, Supreme Court, Northern District, Townsville", + "creatorType": "contributor", + "fieldMode": 1 + } + ], + "archive": "Queensland State Archives", + "archiveLocation": "ITM276520", + "extra": "Issued: 1875/1876\nArchive Collection: S7833, Criminal Files - Supreme Court, Northern District, Townsville", + "libraryCatalog": "Queensland State Archives", + "manuscriptType": "Depositions and indictments", + "rights": "Copyright State of Queensland", + "url": "https://www.archivessearch.qld.gov.au/items/ITM276520", + "attachments": [ + { + "title": "PDF DR87978", + "mimeType": "application/pdf", + "snapshot": true + }, + { + "title": "PDF DR87979", + "mimeType": "application/pdf", + "snapshot": true + }, + { + "title": "PDF DR87980", + "mimeType": "application/pdf", + "snapshot": true + }, + { + "title": "PDF DR87981", + "mimeType": "application/pdf", + "snapshot": true + }, + { + "title": "PDF DR87982", + "mimeType": "application/pdf", + "snapshot": true + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 41673978cf9ec985a25aeb3a6c1b34afc379e79a Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Sat, 14 Sep 2024 22:53:51 +0300 Subject: [PATCH 113/158] Update Crossref REST translator (#3359) --- Crossref REST.js | 1706 ++++++++++++++++++++++++++++++++++++++++++++++ Crossref-REST.js | 332 --------- 2 files changed, 1706 insertions(+), 332 deletions(-) create mode 100644 Crossref REST.js delete mode 100644 Crossref-REST.js diff --git a/Crossref REST.js b/Crossref REST.js new file mode 100644 index 00000000000..3244c8a0d0b --- /dev/null +++ b/Crossref REST.js @@ -0,0 +1,1706 @@ +{ + "translatorID": "0a61e167-de9a-4f93-a68a-628b48855909", + "label": "Crossref REST", + "creator": "Martynas Bagdonas", + "target": "", + "minVersion": "5.0.0", + "maxVersion": "", + "priority": 90, + "inRepository": true, + "translatorType": 8, + "browserSupport": "gcsibv", + "lastUpdated": "2024-09-12 15:10:05" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2018 + + 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 ***** +*/ + +// Based on Crossref Unixref XML translator + +// The translator uses the newer REST API +// https://github.com/Crossref/rest-api-doc +// https://github.com/Crossref/rest-api-doc/blob/master/api_format.md +// http://api.crossref.org/types + +// REST API documentation not always reflect the actual API +// and some fields are undocumented e.g. resource, institution, etc. are missing + +// Some fields are sometimes missing for certain items when compared to the Crossref Unixref XML +// translator e.g. ISBN, pages, editors, contributors, language, etc. + +function removeUnsupportedMarkup(text) { + let markupRE = /<(\/?)(\w+)[^<>]*>/gi; + let supportedMarkup = ['i', 'b', 'sub', 'sup', 'span', 'sc']; + let transformMarkup = { + 'scp': { + open: '', + close: '' + } + }; + // Remove CDATA markup + text = text.replace(//g, '$1'); + text = text.replace(markupRE, function (m, close, name) { + name = name.toLowerCase(); + if (supportedMarkup.includes(name)) { + return (close ? ''; + } + let newMarkup = transformMarkup[name]; + if (newMarkup) { + return close ? newMarkup.close : newMarkup.open; + } + return ''; + }); + return text; +} + +function decodeEntities(n) { + let escaped = { + '&': '&', + '"': '"', + '<': '<', + '>': '>' + }; + return n.replace(/\n/g, '').replace(/("|<|>|&)/g, (str, item) => escaped[item]); +} + +function fixAuthorCapitalization(string) { + // Try to use capitalization function from Zotero Utilities, + // because the current one doesn't support unicode names. + // Can't fix this either because ZU.XRegExp.replace is + // malfunctioning when calling from translators. + if (ZU.capitalizeName) { + return ZU.capitalizeName(string); + } + if (typeof string === 'string' && string.toUpperCase() === string) { + string = string.toLowerCase().replace(/\b[a-z]/g, function (m) { + return m[0].toUpperCase(); + }); + } + return string; +} + +function parseCreators(result, item, typeOverrideMap) { + let types = ['author', 'editor', 'chair', 'translator']; + + for (let type of types) { + if (result[type]) { + let creatorType = typeOverrideMap && typeOverrideMap[type] !== undefined + ? typeOverrideMap[type] + : (type === 'author' || type === 'editor' || type === 'translator' ? type : 'contributor'); + + if (!creatorType) { + continue; + } + + for (let creator of result[type]) { + let newCreator = {}; + newCreator.creatorType = creatorType; + + if (creator.name) { + newCreator.fieldMode = 1; + newCreator.lastName = creator.name; + } + else { + newCreator.firstName = fixAuthorCapitalization(creator.given); + newCreator.lastName = fixAuthorCapitalization(creator.family); + if (!newCreator.firstName) { + newCreator.fieldMode = 1; + } + } + + item.creators.push(newCreator); + } + } + } +} + +function parseDate(dateObj) { + if (dateObj && dateObj['date-parts'] && dateObj['date-parts'][0]) { + let [year, month, day] = dateObj['date-parts'][0]; + if (year) { + if (month) { + if (day) { + return year + '-' + month.toString().padStart(2, '0') + '-' + day.toString().padStart(2, '0'); + } + else { + return month.toString().padStart(2, '0') + '/' + year; + } + } + else { + return year.toString(); + } + } + } + return null; +} + +function processCrossref(json) { + json = JSON.parse(json); + let creatorTypeOverrideMap = {}; + for (let result of json.message.items) { + let item; + if (['journal', 'journal-article', 'journal-volume', 'journal-issue'].includes(result.type)) { + item = new Zotero.Item('journalArticle'); + } + else if (['report', 'report-series', 'report-component'].includes(result.type)) { + item = new Zotero.Item('report'); + } + else if (['book', 'book-series', 'book-set', 'book-track', + 'monograph', 'reference-book', 'edited-book'].includes(result.type)) { + item = new Zotero.Item('book'); + } + else if (['book-chapter', 'book-part', 'book-section', 'reference-entry'].includes(result.type)) { + item = new Zotero.Item('bookSection'); + creatorTypeOverrideMap = { author: 'bookAuthor' }; + } + else if (result.type === 'other' && result.ISBN && result['container-title']) { + item = new Zotero.Item('bookSection'); + if (result['container-title'].length >= 2) { + item.seriesTitle = result['container-title'][0]; + item.bookTitle = result['container-title'][1]; + } + else { + item.bookTitle = result['container-title'][0]; + } + creatorTypeOverrideMap = { author: 'bookAuthor' }; + } + else if (['standard'].includes(result.type)) { + item = new Zotero.Item('standard'); + } + else if (['dataset', 'database'].includes(result.type)) { + item = new Zotero.Item('dataset'); + } + else if (['proceedings', 'proceedings-article', 'proceedings-series'].includes(result.type)) { + item = new Zotero.Item('conferencePaper'); + } + else if (result.type === 'dissertation') { + item = new Zotero.Item('thesis'); + item.date = parseDate(result.approved); + item.thesisType = result.degree && result.degree[0] && result.degree[0].replace(/\(.+\)/, ''); + } + else if (result.type === 'posted-content') { + if (result.subtype === 'preprint') { + item = new Zotero.Item('preprint'); + item.repository = result['group-title']; + } + else { + item = new Zotero.Item('blogPost'); + if (result.institution && result.institution.length) { + item.blogTitle = result.institution[0].name && result.institution[0].name; + } + } + } + else if (result.type === 'peer-review') { + item = new Zotero.Item('manuscript'); + item.type = 'peer review'; + if (!result.author) { + item.creators.push({ lastName: 'Anonymous Reviewer', fieldMode: 1, creatorType: 'author' }); + } + if (result.relation && result.relation['is-review-of'] && result.relation['is-review-of'].length) { + let identifier; + let reviewOf = result.relation['is-review-of'][0]; + let type = reviewOf['id-type']; + let id = reviewOf.id; + if (type === 'doi') { + identifier = 'https://doi.org/' + id + ''; + } + else if (type === 'url') { + identifier = '' + id + ''; + } + else { + identifier = id; + } + item.notes.push('Review of ' + identifier); + } + } + else { + item = new Zotero.Item('document'); + } + + parseCreators(result, item, creatorTypeOverrideMap); + + if (result.description) { + item.notes.push(result.description); + } + + item.abstractNote = result.abstract && removeUnsupportedMarkup(result.abstract); + item.pages = result.page; + item.ISBN = result.ISBN && result.ISBN.join(', '); + item.ISSN = result.ISSN && result.ISSN.join(', '); + item.issue = result.issue; + item.volume = result.volume; + item.language = result.language; + item.edition = result['edition-number']; + item.university = item.institution = item.publisher = result.publisher; + + if (result['container-title'] && result['container-title'][0]) { + if (['journalArticle'].includes(item.itemType)) { + item.publicationTitle = result['container-title'][0]; + } + else if (['conferencePaper'].includes(item.itemType)) { + item.proceedingsTitle = result['container-title'][0]; + } + else if (['book'].includes(item.itemType)) { + item.series = result['container-title'][0]; + } + else if (['bookSection'].includes(item.itemType)) { + item.bookTitle = result['container-title'][0]; + } + else { + item.seriesTitle = result['container-title'][0]; + } + } + + item.conferenceName = result.event && result.event.name; + + // "short-container-title" often has the same value as "container-title", so it can be ignored + if (result['short-container-title'] && result['short-container-title'][0] !== result['container-title'][0]) { + item.journalAbbreviation = result['short-container-title'][0]; + } + + if (result.event && result.event.location) { + item.place = result.event.location; + } + else if (result.institution && result.institution[0] && result.institution[0].place) { + item.place = result.institution[0].place.join(', '); + } + else { + item.place = result['publisher-location']; + } + + item.institution = item.university = result.institution && result.institution[0] && result.institution[0].name; + + // Prefer print to other dates + if (parseDate(result['published-print'])) { + item.date = parseDate(result['published-print']); + } + else if (parseDate(result.issued)) { + item.date = parseDate(result.issued); + } + + // For item types where DOI isn't supported, it will be automatically added to the Extra field. + // However, this won't show up in the translator tests + item.DOI = result.DOI; + + item.url = result.resource && result.resource.primary && result.resource.primary.URL; + + // Using only the first license + item.rights = result.license && result.license[0] && result.license[0].URL; + + if (result.title && result.title[0]) { + item.title = result.title[0]; + if (result.subtitle && result.subtitle[0]) { + // Avoid duplicating the subtitle if it already exists in the title + if (item.title.toLowerCase().indexOf(result.subtitle[0].toLowerCase()) < 0) { + // Sometimes title already has a colon + if (item.title[item.title.length - 1] !== ':') { + item.title += ':'; + } + item.title += ' ' + result.subtitle[0]; + } + } + item.title = removeUnsupportedMarkup(item.title); + } + + if (!item.title) { + item.title = '[No title found]'; + } + + // Check if there are potential issues with character encoding and try to fix them. + // E.g., in 10.1057/9780230391116.0016, the en dash in the title is displayed as â<80><93>, + // which is what you get if you decode a UTF-8 en dash (<80><93>) as Latin-1 and then serve + // as UTF-8 ( <80> <93>) + for (let field in item) { + if (typeof item[field] != 'string') { + continue; + } + // Check for control characters that should never be in strings from Crossref + if (/[\u007F-\u009F]/.test(item[field])) { + // <80><93> -> %E2%80%93 -> en dash + try { + item[field] = decodeURIComponent(escape(item[field])); + } + // If decoding failed, just strip control characters + // https://forums.zotero.org/discussion/102271/lookup-failed-for-doi + catch (e) { + item[field] = item[field].replace(/[\u0000-\u001F\u007F-\u009F]/g, ''); + } + } + item[field] = decodeEntities(item[field]); + } + item.libraryCatalog = 'Crossref'; + item.complete(); + } +} + +function detectSearch(item) { + return false; +} + +function doSearch(item) { + let query = null; + + if (item.DOI) { + if (Array.isArray(item.DOI)) { + query = '?filter=doi:' + item.DOI.map(x => ZU.cleanDOI(x)).filter(x => x).join(',doi:'); + } + else { + query = '?filter=doi:' + ZU.cleanDOI(item.DOI); + } + } + else if (item.query) { + query = '?query.bibliographic=' + encodeURIComponent(item.query); + } + else { + return; + } + + // Note: Cannot speed up the request by selecting only the necessary fields because Crossref + // throws errors for selecting certain fields, e.g. resource, institution, etc. + // TODO: Try to test this again in future + // let selectedFields = [ + // 'type', 'ISBN', 'container-title', 'author', 'editor', 'chair', 'translator', + // 'abstract', 'page', 'ISSN', 'issue', 'volume', 'language', 'edition-number', + // 'publisher', 'short-container-title', 'event', 'institution', 'publisher-location', + // 'published-print', 'issued', 'DOI', 'resource', 'license', 'title', 'subtitle', + // 'approved', 'degree', 'subtype', 'group-title', 'relation' + // ]; + // query += '&select=' + encodeURIComponent(selectedFields.join(',')); + + if (Z.getHiddenPref('CrossrefREST.email')) { + query += '&mailto=' + Z.getHiddenPref('CrossrefREST.email'); + } + + ZU.doGet('https://api.crossref.org/works/' + query, function (responseText) { + processCrossref(responseText); + }); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "search", + "input": { + "DOI": "10.1109/isscc.2017.7870285" + }, + "items": [ + { + "itemType": "conferencePaper", + "title": "6.1 A 56Gb/s PAM-4/NRZ transceiver in 40nm CMOS", + "creators": [ + { + "creatorType": "author", + "firstName": "Pen-Jui", + "lastName": "Peng" + }, + { + "creatorType": "author", + "firstName": "Jeng-Feng", + "lastName": "Li" + }, + { + "creatorType": "author", + "firstName": "Li-Yang", + "lastName": "Chen" + }, + { + "creatorType": "author", + "firstName": "Jri", + "lastName": "Lee" + } + ], + "date": "02/2017", + "DOI": "10.1109/isscc.2017.7870285", + "conferenceName": "2017 IEEE International Solid- State Circuits Conference - (ISSCC)", + "libraryCatalog": "Crossref", + "place": "San Francisco, CA, USA", + "proceedingsTitle": "2017 IEEE International Solid-State Circuits Conference (ISSCC)", + "publisher": "IEEE", + "url": "http://ieeexplore.ieee.org/document/7870285/", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1111/1574-6941.12040" + }, + "items": [ + { + "itemType": "journalArticle", + "title": "Microbial community changes at a terrestrial volcanic CO2vent induced by soil acidification and anaerobic microhabitats within the soil column", + "creators": [ + { + "creatorType": "author", + "firstName": "Janin", + "lastName": "Frerichs" + }, + { + "creatorType": "author", + "firstName": "Birte I.", + "lastName": "Oppermann" + }, + { + "creatorType": "author", + "firstName": "Simone", + "lastName": "Gwosdz" + }, + { + "creatorType": "author", + "firstName": "Ingo", + "lastName": "Möller" + }, + { + "creatorType": "author", + "firstName": "Martina", + "lastName": "Herrmann" + }, + { + "creatorType": "author", + "firstName": "Martin", + "lastName": "Krüger" + } + ], + "date": "04/2013", + "DOI": "10.1111/1574-6941.12040", + "ISSN": "0168-6496", + "issue": "1", + "journalAbbreviation": "FEMS Microbiol Ecol", + "language": "en", + "libraryCatalog": "Crossref", + "pages": "60-74", + "publicationTitle": "FEMS Microbiology Ecology", + "url": "https://academic.oup.com/femsec/article-lookup/doi/10.1111/1574-6941.12040", + "volume": "84", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.2747/1539-7216.50.2.197" + }, + "items": [ + { + "itemType": "journalArticle", + "title": "The ChineseHukouSystem at 50", + "creators": [ + { + "creatorType": "author", + "firstName": "Kam Wing", + "lastName": "Chan" + } + ], + "date": "03/2009", + "DOI": "10.2747/1539-7216.50.2.197", + "ISSN": "1538-7216, 1938-2863", + "issue": "2", + "language": "en", + "libraryCatalog": "Crossref", + "pages": "197-221", + "publicationTitle": "Eurasian Geography and Economics", + "url": "https://www.tandfonline.com/doi/full/10.2747/1539-7216.50.2.197", + "volume": "50", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.17077/etd.xnw0xnau" + }, + "items": [ + { + "itemType": "thesis", + "title": "Contributions to geomagnetic theory", + "creators": [ + { + "creatorType": "author", + "firstName": "Joseph Emil", + "lastName": "Kasper" + } + ], + "date": "1958", + "libraryCatalog": "Crossref", + "place": "Iowa City, IA, United States", + "rights": "http://rightsstatements.org/vocab/InC/1.0/", + "thesisType": "Doctor of Philosophy", + "university": "The University of Iowa", + "url": "https://iro.uiowa.edu/esploro/outputs/doctoral/9983777035702771", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.31219/osf.io/8ag3w" + }, + "items": [ + { + "itemType": "preprint", + "title": "Open Practices in Visualization Research", + "creators": [ + { + "creatorType": "author", + "firstName": "Steve", + "lastName": "Haroz" + } + ], + "date": "2018-07-03", + "DOI": "10.31219/osf.io/8ag3w", + "abstractNote": "Two fundamental tenants of scientific research are that it can be scrutinized and built-upon. Both require that the collected data and supporting materials be shared, so others can examine, reuse, and extend them. Assessing the accessibility of these components and the paper itself can serve as a proxy for the reliability, replicability, and applicability of a field’s research. In this paper, I describe the current state of openness in visualization research and provide suggestions for authors, reviewers, and editors to improve open practices in the field. A free copy of this paper, the collected data, and the source code are available at https://osf.io/qf9na/", + "libraryCatalog": "Open Science Framework", + "repository": "Center for Open Science", + "rights": "https://creativecommons.org/licenses/by/4.0/legalcode", + "url": "https://osf.io/8ag3w", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.21468/SciPost.Report.10" + }, + "items": [ + { + "itemType": "manuscript", + "title": "Report on 1607.01285v1", + "creators": [ + { + "lastName": "Anonymous Reviewer", + "fieldMode": 1, + "creatorType": "author" + } + ], + "date": "2016-09-08", + "libraryCatalog": "Crossref", + "manuscriptType": "peer review", + "url": "https://scipost.org/SciPost.Report.10", + "attachments": [], + "tags": [], + "notes": [ + "Review of https://doi.org/10.21468/SciPostPhys.1.1.010" + ], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.4086/cjtcs.2012.002" + }, + "items": [ + { + "itemType": "journalArticle", + "title": "[No title found]", + "creators": [ + { + "creatorType": "author", + "firstName": "Michael", + "lastName": "Hoffman" + }, + { + "creatorType": "author", + "firstName": "Jiri", + "lastName": "Matousek" + }, + { + "creatorType": "author", + "firstName": "Yoshio", + "lastName": "Okamoto" + }, + { + "creatorType": "author", + "firstName": "Phillipp", + "lastName": "Zumstein" + } + ], + "date": "2012", + "DOI": "10.4086/cjtcs.2012.002", + "ISSN": "1073-0486", + "issue": "1", + "journalAbbreviation": "Chicago J. of Theoretical Comp. Sci.", + "language": "en", + "libraryCatalog": "Crossref", + "pages": "1-10", + "publicationTitle": "Chicago Journal of Theoretical Computer Science", + "url": "http://cjtcs.cs.uchicago.edu/articles/2012/2/contents.html", + "volume": "18", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1002/9781119011071.iemp0172" + }, + "items": [ + { + "itemType": "bookSection", + "title": "Appreciation and Eudaimonic Reactions to Media", + "creators": [ + { + "creatorType": "bookAuthor", + "firstName": "Allison", + "lastName": "Eden" + } + ], + "date": "2020-09-09", + "ISBN": "9781119011071", + "abstractNote": "Entertainment has historically been associated with enjoyment. Yet, many experiences considered under the label of entertainment are not particularly enjoyable for viewers, and may instead evoke feelings of sadness, pensiveness, or mixed affect. Attempting to answer the question of why audiences would select media which do not promote hedonic pleasure, researchers have suggested that appreciation may better describe the experience of liking media which provokes mixed affect. Appreciation of media is thought to promote long‐term goals such as life improvement and self‐betterment, in line with the philosophical concept of eudaimonia. This entry examines appreciation‐based responses to media in terms of short‐ and long‐term outcomes.", + "bookTitle": "The International Encyclopedia of Media Psychology", + "edition": "1", + "language": "en", + "libraryCatalog": "Crossref", + "pages": "1-9", + "publisher": "Wiley", + "rights": "http://doi.wiley.com/10.1002/tdm_license_1.1", + "url": "https://onlinelibrary.wiley.com/doi/10.1002/9781119011071.iemp0172", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1045/may2016-peng" + }, + "items": [ + { + "itemType": "journalArticle", + "title": "Scientific Stewardship in the Open Data and Big Data Era Roles and Responsibilities of Stewards and Other Major Product Stakeholders", + "creators": [ + { + "creatorType": "author", + "firstName": "Ge", + "lastName": "Peng" + }, + { + "creatorType": "author", + "firstName": "Nancy A.", + "lastName": "Ritchey" + }, + { + "creatorType": "author", + "firstName": "Kenneth S.", + "lastName": "Casey" + }, + { + "creatorType": "author", + "firstName": "Edward J.", + "lastName": "Kearns" + }, + { + "creatorType": "author", + "firstName": "Jeffrey L.", + "lastName": "Prevette" + }, + { + "creatorType": "author", + "firstName": "Drew", + "lastName": "Saunders" + }, + { + "creatorType": "author", + "firstName": "Philip", + "lastName": "Jones" + }, + { + "creatorType": "author", + "firstName": "Tom", + "lastName": "Maycock" + }, + { + "creatorType": "author", + "firstName": "Steve", + "lastName": "Ansari" + } + ], + "date": "05/2016", + "DOI": "10.1045/may2016-peng", + "ISSN": "1082-9873", + "issue": "5/6", + "language": "en", + "libraryCatalog": "Crossref", + "publicationTitle": "D-Lib Magazine", + "url": "http://www.dlib.org/dlib/may16/peng/05peng.html", + "volume": "22", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1300/J150v03n04_02" + }, + "items": [ + { + "itemType": "journalArticle", + "title": "Service Value Determination: An Integrative Perspective", + "creators": [ + { + "creatorType": "author", + "firstName": "Rama K.", + "lastName": "Jayanti" + }, + { + "creatorType": "author", + "firstName": "Amit K.", + "lastName": "Ghosh" + } + ], + "date": "1996-05-10", + "DOI": "10.1300/j150v03n04_02", + "ISSN": "1050-7051, 1541-0897", + "issue": "4", + "language": "en", + "libraryCatalog": "Crossref", + "pages": "5-25", + "publicationTitle": "Journal of Hospitality & Leisure Marketing", + "shortTitle": "Service Value Determination", + "url": "https://www.tandfonline.com/doi/full/10.1300/J150v03n04_02", + "volume": "3", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.59350/5znft-x4j11" + }, + "items": [ + { + "itemType": "blogPost", + "title": "QDR Creates New Course on Data Management for CITI", + "creators": [ + { + "creatorType": "author", + "firstName": "Sebastian", + "lastName": "Karcher" + } + ], + "date": "2023-03-31", + "blogTitle": "QDR Blog", + "rights": "https://creativecommons.org/licenses/by/4.0/legalcode", + "url": "https://qdr.syr.edu/qdr-blog/qdr-creates-new-course-data-management-citi", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.26509/frbc-wp-200614" + }, + "items": [ + { + "itemType": "report", + "title": "Co-Movement in Sticky Price Models with Durable Goods", + "creators": [ + { + "creatorType": "author", + "firstName": "Charles T.", + "lastName": "Carlstrom" + }, + { + "creatorType": "author", + "firstName": "Timothy Stephen", + "lastName": "Fuerst" + } + ], + "date": "11/2006", + "institution": "Federal Reserve Bank of Cleveland", + "libraryCatalog": "Crossref", + "place": "Cleveland, OH", + "seriesTitle": "Working paper (Federal Reserve Bank of Cleveland)", + "url": "https://www.clevelandfed.org/publications/working-paper/wp-0614-co-movement-in-sticky-price-models-with-durable-goods", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.3389/978-2-88966-016-2" + }, + "items": [ + { + "itemType": "book", + "title": "Biobanks as Essential Tools for Translational Research: The Belgian Landscape", + "creators": [ + { + "creatorType": "editor", + "firstName": "Sofie J. S", + "lastName": "Bekaert" + }, + { + "creatorType": "editor", + "firstName": "Annelies", + "lastName": "Debucquoy" + }, + { + "creatorType": "editor", + "firstName": "Veronique", + "lastName": "T’Joen" + }, + { + "creatorType": "editor", + "firstName": "Laurent Georges", + "lastName": "Dollé" + }, + { + "creatorType": "editor", + "firstName": "Loes", + "lastName": "Linsen" + } + ], + "date": "2020", + "ISBN": "9782889660162", + "libraryCatalog": "Crossref", + "publisher": "Frontiers Media SA", + "series": "Frontiers Research Topics", + "shortTitle": "Biobanks as Essential Tools for Translational Research", + "url": "https://www.frontiersin.org/research-topics/8144/biobanks-as-essential-tools-for-translational-research-the-belgian-landscape", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.18356/31516bf1-en" + }, + "items": [ + { + "itemType": "book", + "title": "Index to Proceedings of the Economic and Social Council", + "creators": [], + "libraryCatalog": "Crossref", + "publisher": "United Nations", + "url": "https://www.un-ilibrary.org/content/periodicals/24124516", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.7139/2017.978-1-56900-592-7" + }, + "items": [ + { + "itemType": "book", + "title": "Occupational Therapy Manager, 6th Ed", + "creators": [ + { + "creatorType": "editor", + "firstName": "Karen", + "lastName": "Jacobs" + }, + { + "creatorType": "editor", + "firstName": "Judith", + "lastName": "Parker Kent" + }, + { + "creatorType": "editor", + "firstName": "Albert", + "lastName": "Copolillo" + }, + { + "creatorType": "editor", + "firstName": "Roger", + "lastName": "Ideishi" + }, + { + "creatorType": "editor", + "firstName": "Shawn", + "lastName": "Phipps" + }, + { + "creatorType": "editor", + "firstName": "Sarah", + "lastName": "McKinnon" + }, + { + "creatorType": "editor", + "firstName": "Donna", + "lastName": "Costa" + }, + { + "creatorType": "editor", + "firstName": "Nathan", + "lastName": "Herz" + }, + { + "creatorType": "editor", + "firstName": "Guy", + "lastName": "McCormack" + }, + { + "creatorType": "editor", + "firstName": "Lee", + "lastName": "Brandt" + }, + { + "creatorType": "editor", + "firstName": "Karen", + "lastName": "Duddy" + } + ], + "ISBN": "9781569005927", + "edition": "6", + "libraryCatalog": "Crossref", + "publisher": "AOTA Press", + "url": "https://library.aota.org/Occupational-Therapy-Manager-6", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.21428/cbd17b20.594a8acc" + }, + "items": [ + { + "itemType": "bookSection", + "title": "Resumen Ejecutivo y Principales Conclusiones", + "creators": [], + "date": "2022-09-12", + "bookTitle": "2022 Global Deep-Sea Capacity Assessment", + "edition": "1", + "libraryCatalog": "Crossref", + "publisher": "Ocean Discovery League, Saunderstown, USA.", + "url": "https://deepseacapacity.oceandiscoveryleague.org/pub/2022-exec-summary-es", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.11647/obp.0163.08" + }, + "items": [ + { + "itemType": "book", + "title": "Extended dagesh forte: Reading without melody", + "creators": [ + { + "creatorType": "author", + "firstName": "Alex", + "lastName": "Foreman" + } + ], + "date": "01/2020", + "libraryCatalog": "Crossref", + "publisher": "Open Book Publishers", + "rights": "http://creativecommons.org/licenses/by/4.0", + "series": "Semitic Languages and Cultures", + "shortTitle": "Extended dagesh forte", + "url": "https://cdn.openbookpublishers.com/resources/10.11647/obp.0163/OBP.0163.08_Gen_1-13_extended_dagesh_forte.mp3", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1021/bk-2009-1027" + }, + "items": [ + { + "itemType": "book", + "title": "Environmental Applications of Nanoscale and Microscale Reactive Metal Particles", + "creators": [ + { + "creatorType": "editor", + "firstName": "Cherie L.", + "lastName": "Geiger" + }, + { + "creatorType": "editor", + "firstName": "Kathleen M.", + "lastName": "Carvalho-Knighton" + } + ], + "date": "2010-02-01", + "ISBN": "9780841269927 9780841224674", + "libraryCatalog": "Crossref", + "place": "Washington DC", + "publisher": "American Chemical Society", + "series": "ACS Symposium Series", + "url": "https://pubs.acs.org/doi/book/10.1021/bk-2009-1027", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.59317/9789390083503" + }, + "items": [ + { + "itemType": "book", + "title": "Plants for Human Survival and Medicines (Co-Published With Crc Press,Uk)", + "creators": [ + { + "creatorType": "author", + "firstName": "Bikarma", + "lastName": "Singh" + } + ], + "date": "2019-07-05", + "ISBN": "9789390083503", + "abstractNote": "This book reports the potential plants for human survival, explored medicinal aspects of the ongoing research and development for discovering new molecules, new drugs, new leads, ethnic-traditional applications and nutraceutical values of plants. It provides a baseline data and information on plants and their hidden knowledge for human health. This is build upon based on twenty-five excellent research articles and main focused plant species are Boswellia serrata, Butea monosperma, Colebrookea oppositifolia, Cymbopogon khasianus, Dendrophthe falcata, Dysoxylum binectariferum, Echinacea purpurea, Grewia asiatica, Picrorrhiza kurroa, Saussurea costus, Withania somnifera, Zanthoxylum armatum, different species of Aconitum and Panax, Ashtavarga groups (Habenaria intermedia, Habenaria edgeworthii, Malaxis acuminata, Malaxis muscifera, Lilium polyphyllum, Polygonatum verticillatum, Polygonatum cirrhifolium and Roscoea procera), and hundreds of potential life-saving plants used by different ethnic tribes of Himalaya as food, shelter and medicine in their day-to-day life. Various research studies and clinical trials mentioned in the book will add and contribute a lot in discovering quick leads for medicine formulations and products development. In addition to research suggestions and valuation of plants for humans contained within each of the articles, an introduction section emphasizes particular research avenues for attention in the drug development programmes. As the reader will note, these compilations represent a wide collection of views, reflecting the diversity of sciences and interests of thousands of ideas that enabled thoughtful deliberations from a wide range of scientific perspectives.", + "libraryCatalog": "Crossref", + "publisher": "NIPA", + "url": "https://www.nipaers.com/ebook/9789390083503", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.9734/bpi/hmms/v13/2889f" + }, + "items": [ + { + "itemType": "bookSection", + "title": "A Review on MVD for Trigeminal Neuralgia", + "creators": [ + { + "creatorType": "bookAuthor", + "firstName": "Renuka S.", + "lastName": "Melkundi" + }, + { + "creatorType": "bookAuthor", + "firstName": "Sateesh", + "lastName": "Melkundi" + } + ], + "date": "2021-07-30", + "bookTitle": "Highlights on Medicine and Medical Science Vol. 13", + "libraryCatalog": "Crossref", + "pages": "108-114", + "publisher": "Book Publisher International (a part of SCIENCEDOMAIN International)", + "url": "https://stm.bookpi.org/HMMS-V13/article/view/2729", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.7328/bgbl_2010_0000231_h34" + }, + "items": [ + { + "itemType": "bookSection", + "title": "Dritte Verordnung zur Änderung der Anlageverordnung", + "creators": [], + "date": "2010-06-29", + "bookTitle": "Bundesgesetzblatt", + "libraryCatalog": "Crossref", + "pages": "841-845", + "publisher": "Recht Fuer Deutschland GmbH", + "url": "http://openurl.makrolog.de/service?url_ver=Z39.88-2004&rft_val_fmt=&rft.gesetzblatt=bd_bgbl&rft.jahrgang=2010&rft.seite=841&svc_id=info:rfd/vkbl", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.14509/23007" + }, + "items": [ + { + "itemType": "bookSection", + "title": "High-resolution lidar data for infrastructure corridors, Wiseman Quadrangle, Alaska", + "creators": [ + { + "creatorType": "bookAuthor", + "firstName": "T. D.", + "lastName": "Hubbard" + }, + { + "creatorType": "bookAuthor", + "firstName": "M. L.", + "lastName": "Braun" + }, + { + "creatorType": "bookAuthor", + "firstName": "R. E.", + "lastName": "Westbrook" + }, + { + "creatorType": "bookAuthor", + "firstName": "P. E.", + "lastName": "Gallagher" + } + ], + "bookTitle": "High-resolution lidar data for Alaska infrastructure corridors", + "libraryCatalog": "Crossref", + "publisher": "Alaska Division of Geological & Geophysical Surveys", + "url": "http://www.dggs.alaska.gov/pubs/id/23007", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1002/0471238961.0308121519200523.a01.pub2" + }, + "items": [ + { + "itemType": "bookSection", + "title": "Chloroprene", + "creators": [ + { + "creatorType": "bookAuthor", + "firstName": "Clare A.", + "lastName": "Stewart" + }, + { + "creatorType": "bookAuthor", + "firstName": "Updated By", + "lastName": "Staff" + } + ], + "date": "2014-04-28", + "bookTitle": "Kirk-Othmer Encyclopedia of Chemical Technology", + "libraryCatalog": "Crossref", + "pages": "1-9", + "place": "Hoboken, NJ, USA", + "publisher": "John Wiley & Sons, Inc.", + "url": "https://onlinelibrary.wiley.com/doi/10.1002/0471238961.0308121519200523.a01.pub2", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.3403/02199208" + }, + "items": [ + { + "itemType": "standard", + "title": "Non-destructive testing. Acoustic emission. Equipment characterization: Verification of operating characteristic", + "creators": [], + "DOI": "10.3403/02199208", + "libraryCatalog": "Crossref", + "place": "London", + "publisher": "BSI British Standards", + "shortTitle": "Non-destructive testing. Acoustic emission. Equipment characterization", + "url": "https://linkresolver.bsigroup.com/junction/resolve/000000000030034606?restype=standard", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.4159/dlcl.hippocrates_cos-nature_women.2012" + }, + "items": [ + { + "itemType": "dataset", + "title": "Nature of Women", + "creators": [ + { + "creatorType": "author", + "lastName": "Hippocrates Of Cos", + "fieldMode": 1 + }, + { + "creatorType": "translator", + "firstName": "Paul", + "lastName": "Potter" + } + ], + "date": "2012", + "DOI": "10.4159/dlcl.hippocrates_cos-nature_women.2012", + "libraryCatalog": "Crossref", + "repository": "Harvard University Press", + "repositoryLocation": "Cambridge, MA", + "url": "http://www.loebclassics.com/view/hippocrates_cos-nature_women/2012/work.xml", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1036/1097-8542.265870" + }, + "items": [ + { + "itemType": "dataset", + "title": "Food analogs", + "creators": [], + "DOI": "10.1036/1097-8542.265870", + "libraryCatalog": "Crossref", + "repository": "McGraw-Hill Professional", + "url": "https://www.accessscience.com/lookup/doi/10.1036/1097-8542.265870", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.2118/29099-ms" + }, + "items": [ + { + "itemType": "conferencePaper", + "title": "Logically Rectangular Mixed Methods for Darcy Flow on General Geometry", + "creators": [ + { + "creatorType": "author", + "firstName": "Todd", + "lastName": "Arbogast" + }, + { + "creatorType": "author", + "firstName": "Philip T.", + "lastName": "Keenan" + }, + { + "creatorType": "author", + "firstName": "Mary F.", + "lastName": "Wheeler" + } + ], + "date": "1995-02-12", + "DOI": "10.2118/29099-ms", + "abstractNote": "ABSTRACT We consider an expanded mixed finite element formulation (cell centered finite differences) for Darcy flow with a tensor absolute permeability. The reservoir can be geometrically general with internal features, but. the computational domain is rectangular. The method is defined on a curvilinear grid that need not, be orthogonal, obtained by mapping the rectangular, computational grid. The original flow problem becomes a similar problem with a modified permeability on the computational grid. Quadrature rules turn the mixed method into a cell-centered finite difference method with a. 9 point stencil in 2-D and 19 in 3-D. As shown by theory and experiment, if the modified permeability on the computational domain is smooth, then the convergence rate is optimal and both pressure and velocity are superconvergent at certain points. If not, Lagrange multiplier pressures can be introduced on boundaries of elements so that optimal convergence is retained. This modification presents only small changes in the solution process; in fact, the same parallel domain decomposition algorithms can be applied with little or no change to the code if the modified permeability is smooth over the subdomains. This Lagrange multiplier procedure can be. used to extend the difference scheme to multi-block domains, and to give, a coupling with unstructured grids. In all cases, the mixed formulation is locally conservative. Computational results illustrate the advantage and convergence of this method.", + "conferenceName": "SPE Reservoir Simulation Symposium", + "libraryCatalog": "Crossref", + "place": "San Antonio, Texas", + "proceedingsTitle": "All Days", + "publisher": "SPE", + "url": "https://onepetro.org/spersc/proceedings/95RSS/All-95RSS/SPE-29099-MS/61095", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.14264/105901" + }, + "items": [ + { + "itemType": "thesis", + "title": "Synthetic and structural studies towards novel backbone peptidomimetics", + "creators": [ + { + "creatorType": "author", + "firstName": "Michael John.", + "lastName": "Kelso" + } + ], + "date": "2002-02-02", + "libraryCatalog": "Crossref", + "thesisType": "PhD Thesis", + "university": "University of Queensland Library", + "url": "https://espace.library.uq.edu.au/view/UQ:105901", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1101/2020.04.07.20057075" + }, + "items": [ + { + "itemType": "preprint", + "title": "A simple method to quantify country-specific effects of COVID-19 containment measures", + "creators": [ + { + "creatorType": "author", + "firstName": "Morten Gram", + "lastName": "Pedersen" + }, + { + "creatorType": "author", + "firstName": "Matteo", + "lastName": "Meneghini" + } + ], + "date": "2020-04-10", + "DOI": "10.1101/2020.04.07.20057075", + "abstractNote": "AbstractMost of the world is currently fighting to limit the impact of the COVID-19 pandemic. Italy, the Western country with most COVID-19 related deaths, was the first to implement drastic containment measures in early March, 2020. Since then most other European countries, the USA, Canada and Australia, have implemented similar restrictions, ranging from school closures, banning of recreational activities and large events, to complete lockdown. Such limitations, and softer promotion of social distancing, may be more effective in one society than in another due to cultural or political differences. It is therefore important to evaluate the effectiveness of these initiatives by analyzing country-specific COVID-19 data. We propose to model COVID-19 dynamics with a SIQR (susceptible – infectious – quarantined – recovered) model, since confirmed positive cases are isolated and do not transmit the disease. We provide an explicit formula that is easily implemented and permits us to fit official COVID-19 data in a series of Western countries. We found excellent agreement with data-driven estimation of the day-of-change in disease dynamics and the dates when official interventions were introduced. Our analysis predicts that for most countries only the more drastic restrictions have reduced virus spreading. Further, we predict that the number of unidentified COVID-19-positive individuals at the beginning of the epidemic is ∼10 times the number of confirmed cases. Our results provide important insight for future planning of non-pharmacological interventions aiming to contain spreading of COVID-19 and similar diseases.", + "libraryCatalog": "Public and Global Health", + "repository": "Cold Spring Harbor Laboratory", + "url": "http://medrxiv.org/lookup/doi/10.1101/2020.04.07.20057075", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.32388/tqr2ys" + }, + "items": [ + { + "itemType": "manuscript", + "title": "Review of: \"Stakeholders' Perception of Socioecological Factors Influencing Forest Elephant Crop Depredation in Gabon, Central Africa\"", + "creators": [ + { + "creatorType": "author", + "firstName": "Abel", + "lastName": "Mamboleo" + } + ], + "date": "2024-02-21", + "libraryCatalog": "Crossref", + "manuscriptType": "peer review", + "shortTitle": "Review of", + "url": "https://www.qeios.com/read/TQR2YS", + "attachments": [], + "tags": [], + "notes": [ + "Review of https://doi.org/10.32388/XSM9RG" + ], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1039/9781847557766" + }, + "items": [ + { + "itemType": "book", + "title": "Nanotechnology: Consequences for Human Health and the Environment", + "creators": [ + { + "creatorType": "editor", + "firstName": "R E", + "lastName": "Hester" + }, + { + "creatorType": "editor", + "firstName": "R M", + "lastName": "Harrison" + } + ], + "date": "2007", + "ISBN": "9780854042166", + "libraryCatalog": "Crossref", + "place": "Cambridge", + "publisher": "Royal Society of Chemistry", + "series": "Issues in Environmental Science and Technology", + "shortTitle": "Nanotechnology", + "url": "http://ebook.rsc.org/?DOI=10.1039/9781847557766", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.3133/sir20175014" + }, + "items": [ + { + "itemType": "report", + "title": "Effects of changes in pumping on regional groundwater-flow paths, 2005 and 2010, and areas contributing recharge to discharging wells, 1990–2010, in the vicinity of North Penn Area 7 Superfund site, Montgomery County, Pennsylvania", + "creators": [ + { + "creatorType": "author", + "firstName": "Lisa A.", + "lastName": "Senior" + }, + { + "creatorType": "author", + "firstName": "Daniel J.", + "lastName": "Goode" + } + ], + "date": "2017", + "institution": "US Geological Survey", + "libraryCatalog": "Crossref", + "seriesTitle": "Scientific Investigations Report", + "url": "https://pubs.usgs.gov/publication/sir20175014", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.14305/jn.19440413.2023.15" + }, + "items": [ + { + "itemType": "journalArticle", + "title": "[No title found]", + "creators": [], + "DOI": "10.14305/jn.19440413.2023.15", + "ISSN": "1944-0413, 1944-0413", + "language": "en", + "libraryCatalog": "Crossref", + "publicationTitle": "Excelsior: Leadership in Teaching and Learning", + "url": "https://surface.syr.edu/excelsior/vol15", + "volume": "15", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1002/(issn)1099-1751" + }, + "items": [ + { + "itemType": "journalArticle", + "title": "The International Journal of Health Planning and Management", + "creators": [], + "DOI": "10.1002/(issn)1099-1751", + "ISSN": "0749-6753, 1099-1751", + "language": "en", + "libraryCatalog": "Crossref", + "url": "http://doi.wiley.com/10.1002/%28ISSN%291099-1751", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1111/ceo.v49.2" + }, + "items": [ + { + "itemType": "journalArticle", + "title": "[No title found]", + "creators": [], + "date": "03/2021", + "DOI": "10.1111/ceo.v49.2", + "ISSN": "1442-6404, 1442-9071", + "issue": "2", + "journalAbbreviation": "Clinical Exper Ophthalmology", + "language": "en", + "libraryCatalog": "Crossref", + "publicationTitle": "Clinical & Experimental Ophthalmology", + "url": "https://onlinelibrary.wiley.com/toc/14429071/49/2", + "volume": "49", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1021/acsami.3c09983.s001" + }, + "items": [ + { + "itemType": "document", + "title": "Multifunctional Ti3C2Tx MXene/Silver Nanowire Membranes with Excellent Catalytic Antifouling, and Antibacterial Properties for Nitrophenol-Containing Water Purification", + "creators": [], + "libraryCatalog": "Crossref", + "publisher": "American Chemical Society (ACS)", + "url": "https://pubs.acs.org/doi/suppl/10.1021/acsami.3c09983/suppl_file/am3c09983_si_001.pdf", + "attachments": [], + "tags": [], + "notes": [ + "Supplemental Information for 10.1021/acsami.3c09983" + ], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.15405/epsbs(2357-1330).2021.6.1" + }, + "items": [ + { + "itemType": "conferencePaper", + "title": "European Proceedings of Social and Behavioural Sciences", + "creators": [], + "DOI": "10.15405/epsbs(2357-1330).2021.6.1", + "conferenceName": "Psychosocial Risks in Education and Quality Educational Processes", + "libraryCatalog": "Crossref", + "publisher": "European Publisher", + "url": "https://europeanproceedings.com/book-series/EpSBS/books/vol109-cipe-2020", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "search", + "input": { + "DOI": "10.1145/1947940" + }, + "items": [ + { + "itemType": "conferencePaper", + "title": "Proceedings of the 2011 International Conference on Communication, Computing & Security - ICCCS '11", + "creators": [], + "date": "2011", + "DOI": "10.1145/1947940", + "ISBN": "9781450304641", + "conferenceName": "the 2011 International Conference", + "libraryCatalog": "Crossref", + "place": "Rourkela, Odisha, India", + "publisher": "ACM Press", + "url": "http://portal.acm.org/citation.cfm?doid=1947940", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + } +] +/** END TEST CASES **/ diff --git a/Crossref-REST.js b/Crossref-REST.js deleted file mode 100644 index dcc35e6be9c..00000000000 --- a/Crossref-REST.js +++ /dev/null @@ -1,332 +0,0 @@ -{ - "translatorID": "0a61e167-de9a-4f93-a68a-628b48855909", - "translatorType": 8, - "label": "Crossref REST", - "creator": "Martynas Bagdonas", - "target": "", - "minVersion": "5.0.0", - "maxVersion": null, - "priority": 90, - "inRepository": true, - "browserSupport": "gcsibv", - "lastUpdated": "2018-06-16 12:00:00" -} - -/* - ***** BEGIN LICENSE BLOCK ***** - - Copyright © 2018 - - 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 ***** -*/ - -// Based on CrossRef.js (by Simon Kornblith), which uses OpenURL API - -// This translator uses the newer REST API -// https://github.com/Crossref/rest-api-doc -// https://github.com/Crossref/rest-api-doc/blob/master/api_format.md -// REST API documentation not always reflect the actual API -// and some fields are undocumented. -// All Crossref item types can be retrieved at http://api.crossref.org/types - -function removeUnsupportedMarkup(text) { - let markupRE = /<(\/?)(\w+)[^<>]*>/gi; - let supportedMarkup = ['i', 'b', 'sub', 'sup', 'sc']; - let transformMarkup = { - 'scp': { - open: '', - close: '' - } - }; - - return text.replace(//g, '$1') // Remove CDATA markup - .replace(markupRE, function (m, close, name) { - name = name.toLowerCase(); - - if (supportedMarkup.includes(name)) { - return (close ? ''; - } - - let newMarkup = transformMarkup[name.toLowerCase()]; - if (newMarkup) { - return close ? newMarkup.close : newMarkup.open; - } - - return ''; - }); -} - -function fixAuthorCapitalization(string) { - // Try to use capitalization function from Zotero Utilities, - // because the current one doesn't support unicode names. - // Can't fix this either because ZU.XRegExp.replace is - // malfunctioning when calling from translators. - if (ZU.capitalizeName) return ZU.capitalizeName(string); - if (typeof string === "string" && string.toUpperCase() === string) { - string = string.toLowerCase().replace(/\b[a-z]/g, function (m) { - return m[0].toUpperCase(); - }); - } - return string; -} - -function parseCreators(result, item, typeOverrideMap) { - let types = ['author', 'editor', 'chair', 'translator']; - - for (let i = 0; i < types.length; i++) { - let type = types[i]; - - if (result[type]) { - let creatorType = null; - - if (typeOverrideMap && typeOverrideMap[type] !== undefined) { - creatorType = typeOverrideMap[type]; - } - else if (type === "author" || type === "editor" || type === "translator") { - creatorType = type; - } - else { - creatorType = "contributor"; - } - - if (!creatorType) continue; - - for (let j = 0; j < result[type].length; j++) { - let creator = {}; - - creator.creatorType = creatorType; - - if (result[type].name) { // Organization - creator.fieldMode = 1; - creator.lastName = result[type][j].name; - } - else { - creator.firstName = fixAuthorCapitalization(result[type][j].given); - creator.lastName = fixAuthorCapitalization(result[type][j].family); - if (!creator.firstName) creator.fieldMode = 1; - } - - item.creators.push(creator); - } - } - } -} - -function processCrossref(json) { - json = JSON.parse(json); - - for (let i = 0; i < json.message.items.length; i++) { - let result = json.message.items[i]; - - let item = null; - - // Journal article - if (['journal-article'].includes(result.type)) { - item = new Zotero.Item("journalArticle"); - if (result['container-title']) item.publicationTitle = result['container-title'][0]; - if (result['short-container-title'] - && result['short-container-title'][0] !== result['container-title'][0]) { - item.journalAbbreviation = result['short-container-title'][0]; - } - item.volume = result.volume; - item.issue = result.issue; - if (result.ISBN) item.ISBN = result.ISBN[0]; - if (result.ISSN) item.ISSN = result.ISSN[0]; - } - // Book - else if (['book', 'book-series', 'book-set', 'book-track', 'monograph', 'reference-book'] - .includes(result.type)) { - item = new Zotero.Item("book"); - item.publisher = result.publisher; - item.place = result['publisher-location']; - if (result.ISBN) item.ISBN = result.ISBN[0]; - } - // Book section - else if (['book-chapter', 'book-part', 'book-section', 'reference-entry'] - .includes(result.type)) { - item = new Zotero.Item("bookSection"); - item.publisher = result.publisher; - item.place = result['publisher-location']; - if (result.ISBN) item.ISBN = result.ISBN[0]; - } - // Report - else if (['dataset', 'posted-content', 'report', 'report-series', 'standard'] - .includes(result.type)) { - item = new Zotero.Item("report"); - item.institution = result.publisher; - item.place = result['publisher-location']; - item.seriesTitle = result['container-title']; - } - // Conference paper - else if (['proceedings-article'].includes(result.type)) { - item = new Zotero.Item("conferencePaper"); - item.proceedingsTitle = result['container-title']; - item.publisher = result.publisher; - if (result.event) { - item.conferenceName = result.event.name; - item.place = result.event.location; - } - if (result.ISBN) item.ISBN = result.ISBN[0]; - } - // Thesis - else if (['dissertation'].includes(result.type)) { - item = new Zotero.Item("thesis"); - item.university = result.publisher; - item.place = result['publisher-location']; - } - else { - return; - } - - // edited-book, standard-series - ignore, because Crossref has zero results for this type - // component, journal, journal-issue, journal-volume, other, proceedings, - // proceedings-series, peer-review - ignore, because Zotero doesn't have equivalent item types. - - item.abstractNote = result.abstract; - - parseCreators(result, item); - - - // Contains the earliest of: published-online, published-print, content-created - let pubDate = result['issued']; - - if (pubDate && pubDate['date-parts'][0]) { - let year = pubDate['date-parts'][0][0]; - let month = pubDate['date-parts'][0][1]; - let day = pubDate['date-parts'][0][2]; - - if (year) { - if (month) { - if (day) { - item.date = year + "-" + month + "-" + day; - } - else { - item.date = month + "/" + year; - } - } - else { - item.date = year; - } - } - } - - item.pages = result.page; - - if (result.DOI) { - if (ZU.fieldIsValidForType('DOI', item.itemType)) { - item.DOI = result.DOI; - } - // add DOI to extra for unsupprted items - else { - if (item.extra) { - item.extra += '\nDOI: ' + result.DOI; - } - else { - item.extra = 'DOI: ' + result.DOI; - } - } - } - - // result.URL is always http://dx.doi.org/.. - - if (result.link && result.link.URL) item.url = result.link.URL; - - if (result.title && result.title[0]) { - item.title = result.title[0]; - if (result.subtitle && result.subtitle[0]) { - // Don't duplicate subtitle if it already exists in title - if (item.title.toLowerCase().indexOf(result.subtitle[0].toLowerCase()) < 0) { - item.title += ': ' + result.subtitle[0]; - } - } - item.title = removeUnsupportedMarkup(item.title); - } - - // Check if there are potential issues with character encoding and try to fix it - // e.g. 10.1057/9780230391116.0016 (en dash in title is presented as â) - for (let field in item) { - if (typeof item[field] !== 'string') continue; - // Check for control characters that should never be in strings from Crossref - if (/[\u007F-\u009F]/.test(item[field])) { - item[field] = decodeURIComponent(escape(item[field])); - } - item[field] = ZU.unescapeHTML(item[field]); - } - item.libraryCatalog = 'Crossref'; - item.complete(); - } -} - -function detectSearch(item) { - return false; -} - -function doSearch(item) { - // Reduce network traffic by selecting only required fields - let selectedFields = [ - 'type', - 'container-title', - 'short-container-title', - 'volume', - 'issue', - 'ISBN', - 'ISSN', - 'publisher', - 'publisher-location', - 'event', - 'abstract', - 'issued', - 'page', - 'DOI', - 'link', - 'title', - 'subtitle', - 'author', - 'editor', - 'chair', - 'translator' - ]; - - let query = null; - - if (item.DOI) { - if (Array.isArray(item.DOI)) { - query = '?filter=doi:' + item.DOI.map(x => ZU.cleanDOI(x)).filter(x => x).join(',doi:'); - } else { - query = '?filter=doi:' + ZU.cleanDOI(item.DOI); - } - } - else if (item.query) { - query = '?query.bibliographic=' + encodeURIComponent(item.query); - } - else return; - - query += '&select=' + selectedFields.join(','); - - if (Z.getHiddenPref('CrossrefREST.email')) { - query += '&mailto=' + Z.getHiddenPref('CrossrefREST.email'); - } - - ZU.doGet('https://api.crossref.org/works/' + query, function (responseText) { - processCrossref(responseText); - }); -} - -/** BEGIN TEST CASES **/ -var testCases = []; -/** END TEST CASES **/ From 87bb5b2647dbf1549d5496a57f91a39c2e727da3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 14 Sep 2024 22:04:52 +0200 Subject: [PATCH 114/158] DOI Content Negotiation: Handle upcoming Crossref outage Crossref is retrying their maintenance from last month on Sep. 16-17, which means content negotiation for Crossref DOIs will be down for another 24-hour period. (Last time they didn't actually realize it was down -- I told them they were returning 200s with 503 error messages in the body -- and this time they're doing it intentionally...) So during that period, make an extra request to check the registration agency of each DOI, and if it's Crossref, use their REST API, which is remaining up. --- DOI Content Negotiation.js | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/DOI Content Negotiation.js b/DOI Content Negotiation.js index 0679000d6d5..b25b6080db0 100644 --- a/DOI Content Negotiation.js +++ b/DOI Content Negotiation.js @@ -8,7 +8,7 @@ "priority": 100, "inRepository": true, "translatorType": 8, - "lastUpdated": "2024-03-22 04:02:26" + "lastUpdated": "2024-09-14 20:03:55" } /* @@ -64,6 +64,33 @@ async function doSearch(items) { } async function processDOI(doi) { + // TEMP: Use Crossref REST for Crossref DOIs during Crossref 2024-09-16 outage + let currentDate = new Date(); + let startDate = new Date(Date.UTC(2024, 8, 16, 20, 0, 0)); // 16 September 2024, 20:00 UTC (1 hour before outage) + let endDate = new Date(Date.UTC(2024, 8, 17, 23, 0, 0)); // 17 September 2024, 23:00 UTC (2 hours after outage) + if (currentDate >= startDate && currentDate <= endDate) { + try { + let raJSON = await requestJSON( + `https://doi.org/ra/${encodeURIComponent(doi)}` + ); + if (raJSON.length) { + let ra = raJSON[0].RA; + if (ra == 'Crossref') { + let translate = Zotero.loadTranslator('search'); + // Crossref REST + translate.setTranslator("0a61e167-de9a-4f93-a68a-628b48855909"); + let item = { itemType: "journalArticle", DOI: doi }; + translate.setSearch(item); + translate.translate(); + return; + } + } + } + catch (e) { + Z.debug(e); + } + } + 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" } } From 2c553e90a78515ab7f4a36e0b41d813079e2c889 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 26 Sep 2024 09:31:16 -0400 Subject: [PATCH 115/158] IEEE Xplore: Log PDF page contents when regex doesn't match https://forums.zotero.org/discussion/118231/no-import-of-pdfs-from-ieee-explore-via-connector-firefox-possible --- IEEE Xplore.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IEEE Xplore.js b/IEEE Xplore.js index de4f8573e48..c4d819e1afc 100644 --- a/IEEE Xplore.js +++ b/IEEE Xplore.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-07-05 07:19:04" + "lastUpdated": "2024-09-26 13:30:54" } /* @@ -231,6 +231,10 @@ async function scrape(doc, url = doc.location.href) { mimeType: "application/pdf" }); } + else { + Zotero.debug("No PDF URL found on PDF page"); + Zotero.debug(src); + } item.complete(); }, null); } From 263546a74edf47fea841a3eddc2edaf522d58249 Mon Sep 17 00:00:00 2001 From: aldente-hu Date: Thu, 26 Sep 2024 23:24:39 +0900 Subject: [PATCH 116/158] CiNii Articles -> CiNii Research, update for site changes (#3363) Co-authored-by: Abe Jellinek --- CiNii Research.js | 168 ++++++++++++++++++++++++++++++++++++++++++++++ CiNii.js | 136 ------------------------------------- 2 files changed, 168 insertions(+), 136 deletions(-) create mode 100644 CiNii Research.js delete mode 100644 CiNii.js diff --git a/CiNii Research.js b/CiNii Research.js new file mode 100644 index 00000000000..d7321cd2649 --- /dev/null +++ b/CiNii Research.js @@ -0,0 +1,168 @@ +{ + "translatorID": "46291dc3-5cbd-47b7-8af4-d009078186f6", + "label": "CiNii Research", + "creator": "Michael Berkowitz, Mitsuo Yoshida and Satoshi Ando", + "target": "^https?://cir\\.nii\\.ac\\.jp/", + "minVersion": "1.0.0b4.r5", + "maxVersion": "", + "priority": 100, + "inRepository": true, + "translatorType": 4, + "browserSupport": "gcsibv", + "lastUpdated": "2024-09-26 14:22:20" +} + +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 Michael Berkowitz, Mitsuo Yoshida and Satoshi Ando + + 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("/crid/")) { + return "journalArticle"; + } + else if (doc.evaluate('//a[contains(@href, "/crid/")]', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) { + return "multiple"; + } + return false; +} + +function doWeb(doc, url) { + var arts = []; + if (detectWeb(doc, url) == "multiple") { + var items = {}; + var links = doc.evaluate('//a[contains(@href, "/crid/")]', doc, null, XPathResult.ANY_TYPE, null); + var link; + while ((link = links.iterateNext())) { + items[link.href] = Zotero.Utilities.trimInternal(link.textContent); + } + Zotero.selectItems(items, function (items) { + if (!items) { + return; + } + for (var i in items) { + arts.push(i); + } + Zotero.Utilities.processDocuments(arts, scrape); + }); + } + else { + scrape(doc, url); + } +} + +function scrape(doc, _url) { + var newurl = doc.location.href; + var biblink = ZU.xpathText(doc, '//li/div/a[contains(text(), "BibTeX")]/@href'); + //Z.debug(biblink) + var tags = []; + if (doc.evaluate('//a[@rel="tag"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) { + var kws = doc.evaluate('//a[@rel="tag"]', doc, null, XPathResult.ANY_TYPE, null); + var kw; + while ((kw = kws.iterateNext())) { + tags.push(Zotero.Utilities.trimInternal(kw.textContent)); + } + } + //var abstractPath = '//div[@class="abstract"]/p[@class="entry-content"]'; + var abstractPath = '//div[contains(@class, "abstract")]/p[contains(@class, "entry-content")]'; + var abstractNote; + if (doc.evaluate(abstractPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext()) { + abstractNote = doc.evaluate(abstractPath, doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent; + } + Zotero.Utilities.HTTP.doGet(biblink, function (text) { + var trans = Zotero.loadTranslator("import"); + trans.setTranslator("9cb70025-a888-4a29-a210-93ec52da40d4"); + trans.setString(text); + trans.setHandler("itemDone", function (obj, item) { + item.url = newurl; + item.attachments = [{ url: item.url, title: item.title + " Snapshot", mimeType: "text/html" }]; + item.tags = tags; + item.abstractNote = abstractNote; + if (item.ISSN) { + item.ISSN = ZU.cleanISSN(item.ISSN); + } + item.complete(); + }); + trans.translate(); + }); +} + +/** BEGIN TEST CASES **/ +var testCases = [ + { + "type": "web", + "url": "https://cir.nii.ac.jp/all?q=test&range=0&count=20&sortorder=1&type=0", + "items": "multiple" + }, + { + "type": "web", + "url": "https://cir.nii.ac.jp/crid/1390001204062164736", + "items": [ + { + "itemType": "journalArticle", + "title": "観測用既存鉄骨造モデル構造物を用いたオンライン応答実験", + "creators": [ + { + "firstName": "謙一", + "lastName": "大井", + "creatorType": "author" + }, + { + "firstName": "與助", + "lastName": "嶋脇", + "creatorType": "author" + }, + { + "firstName": "拓海", + "lastName": "伊藤", + "creatorType": "author" + }, + { + "firstName": "玉順", + "lastName": "李", + "creatorType": "author" + } + ], + "date": "2002", + "DOI": "10.11188/seisankenkyu.54.384", + "ISSN": "1881-2058", + "abstractNote": "特集 ERS(耐震構造学)", + "issue": "6", + "itemID": "1390001204062164736", + "libraryCatalog": "CiNii Research", + "pages": "384-387", + "publicationTitle": "生産研究", + "url": "https://cir.nii.ac.jp/crid/1390001204062164736", + "volume": "54", + "attachments": [ + { + "title": "観測用既存鉄骨造モデル構造物を用いたオンライン応答実験 Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + } +] +/** END TEST CASES **/ diff --git a/CiNii.js b/CiNii.js deleted file mode 100644 index 4e0ba9eb102..00000000000 --- a/CiNii.js +++ /dev/null @@ -1,136 +0,0 @@ -{ - "translatorID": "46291dc3-5cbd-47b7-8af4-d009078186f6", - "label": "CiNii", - "creator": "Michael Berkowitz and Mitsuo Yoshida", - "target": "^https?://ci\\.nii\\.ac\\.jp/", - "minVersion": "1.0.0b4.r5", - "maxVersion": "", - "priority": 100, - "inRepository": true, - "translatorType": 4, - "browserSupport": "gcsibv", - "lastUpdated": "2012-11-24 13:12:41" -} - -function detectWeb(doc, url) { - if (url.match(/naid/)) { - return "journalArticle"; - } else if (doc.evaluate('//a[contains(@href, "/naid/")]', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) { - return "multiple"; - } -} - -function doWeb(doc, url) { - var arts = new Array(); - if (detectWeb(doc, url) == "multiple") { - var items = new Object(); - var links = doc.evaluate('//a[contains(@href, "/naid/")]', doc, null, XPathResult.ANY_TYPE, null); - var link; - while (link = links.iterateNext()) { - items[link.href] = Zotero.Utilities.trimInternal(link.textContent); - } - Zotero.selectItems(items, function (items) { - if (!items) { - return true; - } - for (var i in items) { - arts.push(i); - } - Zotero.Utilities.processDocuments(arts, scrape, function () { - Zotero.done(); - }); - Zotero.wait(); - }); - } else { - scrape(doc, url) - } -} -function scrape(doc, url){ - var newurl = doc.location.href; - var biblink = ZU.xpathText(doc, '//li/div/a[contains(text(), "BibTeX")]/@href'); - //Z.debug(biblink) - var tags = new Array(); - if (doc.evaluate('//a[@rel="tag"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) { - var kws = doc.evaluate('//a[@rel="tag"]', doc, null, XPathResult.ANY_TYPE, null); - var kw; - while (kw = kws.iterateNext()) { - tags.push(Zotero.Utilities.trimInternal(kw.textContent)); - } - } - var abstractNote; - if (doc.evaluate('//div[@class="abstract"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext()) { - abstractNote = doc.evaluate('//div[@class="abstract"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent; - } - Zotero.Utilities.HTTP.doGet(biblink, function(text) { - var trans = Zotero.loadTranslator("import"); - trans.setTranslator("9cb70025-a888-4a29-a210-93ec52da40d4"); - trans.setString(text); - trans.setHandler("itemDone", function(obj, item) { - item.url = newurl; - item.attachments = [{url:item.url, title:item.title + " Snapshot", mimeType:"text/html"}]; - item.tags = tags; - item.abstractNote = abstractNote; - item.complete(); - }); - trans.translate(); - }); - }/** BEGIN TEST CASES **/ -var testCases = [ - { - "type": "web", - "url": "http://ci.nii.ac.jp/search?q=test&range=0&count=20&sortorder=1&type=0", - "items": "multiple" - }, - { - "type": "web", - "url": "http://ci.nii.ac.jp/naid/110000244188/ja/", - "items": [ - { - "itemType": "journalArticle", - "title": "<研究速報>観測用既存鉄骨造モデル構造物を用いたオンライン応答実験=Pseudo-dynamic tests on existing steel model structure for seismic monitoring", - "creators": [ - { - "firstName": "謙一=Kenichi Ohi", - "lastName": "大井", - "creatorType": "author" - }, - { - "firstName": "輿助=Yosuke Shimawaki", - "lastName": "嶋脇", - "creatorType": "author" - }, - { - "firstName": "拓海=Takumi Ito", - "lastName": "伊藤", - "creatorType": "author" - }, - { - "firstName": "Li", - "lastName": "Yushun", - "creatorType": "author" - } - ], - "date": "November 2002", - "DOI": "10.11188/seisankenkyu.54.384", - "ISSN": "0037105X", - "issue": "6", - "itemID": "110000244188", - "libraryCatalog": "CiNii", - "pages": "384-387", - "publicationTitle": "生産研究", - "url": "http://ci.nii.ac.jp/naid/110000244188/ja/", - "volume": "54", - "attachments": [ - { - "title": "<研究速報>観測用既存鉄骨造モデル構造物を用いたオンライン応答実験=Pseudo-dynamic tests on existing steel model structure for seismic monitoring Snapshot", - "mimeType": "text/html" - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - } -] -/** END TEST CASES **/ \ No newline at end of file From ce30da952456b5becd3f22e3194c7311cd3323e6 Mon Sep 17 00:00:00 2001 From: Sylvain Machefert Date: Thu, 26 Sep 2024 16:26:12 +0200 Subject: [PATCH 117/158] PICA: Fix Sudoc multiples (#3362) --- Library Catalog (PICA).js | 415 ++++---------------------------------- 1 file changed, 40 insertions(+), 375 deletions(-) diff --git a/Library Catalog (PICA).js b/Library Catalog (PICA).js index 58c215a13d9..db8472c30db 100644 --- a/Library Catalog (PICA).js +++ b/Library Catalog (PICA).js @@ -8,8 +8,8 @@ "priority": 248, "inRepository": true, "translatorType": 4, - "browserSupport": "gcsb", - "lastUpdated": "2021-03-03 10:06:49" + "browserSupport": "gcsibv", + "lastUpdated": "2024-09-20 15:05:33" } /* @@ -167,7 +167,7 @@ function scrape(doc, url) { // sudoc has authors on separate lines and with different format - use this var authors; var author; - if (url.search(/sudoc\.(abes\.)?fr/) != -1) { + if (/sudoc\.(abes\.)?fr/.test(url)) { authors = ZU.xpath(tableRow, './td[2]/div'); for (i in authors) { var authorText = authors[i].textContent; @@ -211,7 +211,7 @@ function scrape(doc, url) { else { authors = value.split(/\s*;\s*/); for (i in authors) { - if (role == "author") if (authors[i].search(/[[()]Hrsg\.?[\])]/) != -1) role = "editor"; + if (role == "author") if (/[[()]Hrsg\.?[\])]/.test(authors[i])) role = "editor"; author = authors[i].replace(/[*([].+[)*\]]/, ""); var comma = author.includes(","); newItem.creators.push(Zotero.Utilities.cleanAuthor(author, role, comma)); @@ -427,7 +427,7 @@ function scrape(doc, url) { if (!pub) break; // not sure what this would be or look like without publisher pub = pub.replace(/\[.*?\]/g, '') // drop bracketted info, which looks to be publisher role .split(','); - if (pub[pub.length - 1].search(/\D\d{4}\b/) != -1) { // this is most likely year, we can drop it + if (/\D\d{4}\b/.test(pub[pub.length - 1])) { // this is most likely year, we can drop it pub.pop(); } if (pub.length) newItem.publisher = pub.join(','); // in case publisher contains commas @@ -554,7 +554,7 @@ function scrape(doc, url) { for (i in isbns) { m = isbns[i].match(/[-x\d]{10,}/i); // this is necessary until 3.0.12 if (!m) continue; - if (m[0].replace(/-/g, '').search(/^(?:\d{9}|\d{12})[\dx]$/i) != -1) { + if (/^(?:\d{9}|\d{12})[\dx]$/i.test(m[0].replace(/-/g, ''))) { isbn.push(m[0]); } } @@ -619,7 +619,7 @@ function scrape(doc, url) { // switch institutional authors to single field; for (i = 0; i < newItem.creators.length; i++) { if (!newItem.creators[i].firstName) { - newItem.creators[i].fieldMode = true; + newItem.creators[i].fieldMode = 1; } } if (permalink) { @@ -653,8 +653,10 @@ function doWeb(doc, url) { var type = detectWeb(doc, url); if (type == "multiple") { var newUrl = doc.evaluate('//base/@href', doc, null, XPathResult.ANY_TYPE, null).iterateNext().nodeValue; - // fix for sudoc, see #1529 - newUrl = newUrl.replace(/sudoc\.abes\.fr\/cbs\/\/?DB=/, 'sudoc.abes.fr/cbs/xslt/DB='); + // fix for sudoc, see #1529 and #2022 + if (/sudoc\.(abes\.)?fr/.test(url)) { + newUrl = newUrl.replace(/cbs\/\/?DB=/, 'cbs/xslt/DB='); + } var elmts = getSearchResults(doc); var elmt = elmts.iterateNext(); @@ -861,7 +863,7 @@ var testCases = [ }, { "type": "web", - "url": "http://www.sudoc.abes.fr/cbs/xslt/DB=2.1//SRCH?IKT=12&TRM=127261664", + "url": "https://www.sudoc.abes.fr/cbs/xslt/DB=2.1/SRCH?IKT=12&TRM=127261664", "items": [ { "itemType": "journalArticle", @@ -896,18 +898,18 @@ var testCases = [ ], "tags": [ { - "tag": "Communes rurales -- Et la technique -- Aspect social -- Inde" + "tag": "Communes rurales -- Technique -- Société -- Inde" }, { "tag": "Conditions sociales -- Inde -- 20e siècle" }, { - "tag": "Téléphonie mobile -- Aspect social -- Inde" + "tag": "Téléphonie mobile -- Société -- Inde" } ], "notes": [ { - "note": "
Contient un résumé en anglais et en français. - in Journal of the Royal Anthropological Institute, vol. 14, no. 3 (Septembre 2008)
" + "note": "\n
Contient un résumé en anglais et en français. - in Journal of the Royal Anthropological Institute, vol. 14, no. 3 (Septembre 2008)
\n
 
\n
 
\n" } ], "seeAlso": [] @@ -916,7 +918,7 @@ var testCases = [ }, { "type": "web", - "url": "http://www.sudoc.abes.fr/cbs/xslt/DB=2.1//SRCH?IKT=12&TRM=128661828", + "url": "https://www.sudoc.abes.fr/cbs/xslt/DB=2.1/SRCH?IKT=12&TRM=128661828", "items": [ { "itemType": "film", @@ -1003,7 +1005,7 @@ var testCases = [ ], "notes": [ { - "note": "
Les différents films qui composent ce DVD sont réalisés avec des prises de vue réelles, ou des images microcinématographiques ou des images de synthèse, ou des images fixes tirées de livres. La bande son est essentiellement constituée de commentaires en voix off et d'interviews (les commentaires sont en anglais et les interviews sont en langue originales : anglais, français ou allemand, sous-titrée en anglais). - Discovering the cell : participation de Paul Nurse (Rockefeller university, New York), Claude Debru (ENS : Ecole normale supérieure, Paris) et Werner Franke (DKFZ : Deutsches Krebsforschungszentrum, Heidelberg) ; Membrane : participation de Kai Simons, Soizig Le Lay et Lucas Pelkmans (MPI-CBG : Max Planck institute of molecular cell biology and genetics, Dresden) ; Signals and calcium : participation de Christian Sardet et Alex Mc Dougall (CNRS / UPMC : Centre national de la recherche scientifique / Université Pierre et Marie Curie, Villefrance-sur-Mer) ; Membrane traffic : participation de Thierry Galli et Phillips Alberts (Inserm = Institut national de la santé et de la recherche médicale, Paris) ; Mitochondria : participation de Michael Duchen, Rémi Dumollard et Sean Davidson (UCL : University college of London) ; Microfilaments : participation de Cécile Gauthier Rouvière et Alexandre Philips (CNRS-CRBM : CNRS-Centre de recherche de biochimie macromoléculaire, Montpellier) ; Microtubules : participation de Johanna Höög, Philip Bastiaens et Jonne Helenius (EMBL : European molecular biology laboratory, Heidelberg) ; Centrosome : participation de Michel Bornens et Manuel Théry (CNRS-Institut Curie, Paris) ; Proteins : participation de Dino Moras et Natacha Rochel-Guiberteau (IGBMC : Institut de génétique et biologie moléculaire et cellulaire, Strasbourg) ; Nocleolus and nucleus : participation de Daniele Hernandez-Verdun, Pascal Rousset, Tanguy Lechertier (CNRS-UPMC / IJM : Institut Jacques Monod, Paris) ; The cell cycle : participation de Paul Nurse (Rockefeller university, New York) ; Mitosis and chromosomes : participation de Jan Ellenberg, Felipe Mora-Bermudez et Daniel Gerlich (EMBL, Heidelberg) ; Mitosis and spindle : participation de Eric Karsenti, Maiwen Caudron et François Nedelec (EMBL, Heidelberg) ; Cleavage : participation de Pierre Gönczy, Marie Delattre et Tu Nguyen Ngoc (Isrec : Institut suisse de recherche expérimentale sur le cancer, Lausanne) ; Cellules souches : participation de Göran Hermerén (EGE : European group on ethics in science and new technologies, Brussels) ; Cellules libres : participation de Jean-Jacques Kupiec (ENS, Paris) ; Cellules et évolution : participation de Paule Nurse (Rockefeller university, New York)
" + "note": "\n
Les différents films qui composent ce DVD sont réalisés avec des prises de vue réelles, ou des images microcinématographiques ou des images de synthèse, ou des images fixes tirées de livres. La bande son est essentiellement constituée de commentaires en voix off et d'interviews (les commentaires sont en anglais et les interviews sont en langue originales : anglais, français ou allemand, sous-titrée en anglais). - Discovering the cell : participation de Paul Nurse (Rockefeller university, New York), Claude Debru (ENS : Ecole normale supérieure, Paris) et Werner Franke (DKFZ : Deutsches Krebsforschungszentrum, Heidelberg) ; Membrane : participation de Kai Simons, Soizig Le Lay et Lucas Pelkmans (MPI-CBG : Max Planck institute of molecular cell biology and genetics, Dresden) ; Signals and calcium : participation de Christian Sardet et Alex Mc Dougall (CNRS / UPMC : Centre national de la recherche scientifique / Université Pierre et Marie Curie, Villefrance-sur-Mer) ; Membrane traffic : participation de Thierry Galli et Phillips Alberts (Inserm = Institut national de la santé et de la recherche médicale, Paris) ; Mitochondria : participation de Michael Duchen, Rémi Dumollard et Sean Davidson (UCL : University college of London) ; Microfilaments : participation de Cécile Gauthier Rouvière et Alexandre Philips (CNRS-CRBM : CNRS-Centre de recherche de biochimie macromoléculaire, Montpellier) ; Microtubules : participation de Johanna Höög, Philip Bastiaens et Jonne Helenius (EMBL : European molecular biology laboratory, Heidelberg) ; Centrosome : participation de Michel Bornens et Manuel Théry (CNRS-Institut Curie, Paris) ; Proteins : participation de Dino Moras et Natacha Rochel-Guiberteau (IGBMC : Institut de génétique et biologie moléculaire et cellulaire, Strasbourg) ; Nocleolus and nucleus : participation de Daniele Hernandez-Verdun, Pascal Rousset, Tanguy Lechertier (CNRS-UPMC / IJM : Institut Jacques Monod, Paris) ; The cell cycle : participation de Paul Nurse (Rockefeller university, New York) ; Mitosis and chromosomes : participation de Jan Ellenberg, Felipe Mora-Bermudez et Daniel Gerlich (EMBL, Heidelberg) ; Mitosis and spindle : participation de Eric Karsenti, Maiwen Caudron et François Nedelec (EMBL, Heidelberg) ; Cleavage : participation de Pierre Gönczy, Marie Delattre et Tu Nguyen Ngoc (Isrec : Institut suisse de recherche expérimentale sur le cancer, Lausanne) ; Cellules souches : participation de Göran Hermerén (EGE : European group on ethics in science and new technologies, Brussels) ; Cellules libres : participation de Jean-Jacques Kupiec (ENS, Paris) ; Cellules et évolution : participation de Paule Nurse (Rockefeller university, New York)
\n
 
\n
 
\n" } ], "seeAlso": [] @@ -1064,7 +1066,7 @@ var testCases = [ }, { "type": "web", - "url": "http://www.sudoc.abes.fr/cbs/xslt/DB=2.1//SRCH?IKT=12&TRM=05625248X", + "url": "https://www.sudoc.abes.fr/cbs/xslt/DB=2.1/SRCH?IKT=12&TRM=05625248X", "items": [ { "itemType": "audioRecording", @@ -1118,7 +1120,7 @@ var testCases = [ ], "notes": [ { - "note": "\n
Modern notation. - \"Critical apparatus\": p. 174-243
\n
 
\n" + "note": "\n
Modern notation. - \"Critical apparatus\": p. 174-243
\n
 
\n
 
\n
 
\n
 
\n" } ], "seeAlso": [] @@ -1127,159 +1129,7 @@ var testCases = [ }, { "type": "web", - "url": "http://gso.gbv.de/DB=2.1/PPNSET?PPN=732443563", - "items": [ - { - "itemType": "journalArticle", - "title": "A new method to obtain a consensus ranking of a region's vintages' quality", - "creators": [ - { - "firstName": "José", - "lastName": "Borges", - "creatorType": "author" - }, - { - "firstName": "António C.", - "lastName": "Real", - "creatorType": "author" - }, - { - "firstName": "J. Sarsfield", - "lastName": "Cabral", - "creatorType": "author" - }, - { - "firstName": "Gregory V.", - "lastName": "Jones", - "creatorType": "author" - } - ], - "date": "2012", - "ISSN": "1931-4361", - "issue": "1", - "libraryCatalog": "Library Catalog - kxp.k10plus.de", - "pages": "88-107", - "publicationTitle": "Journal of wine economics / American Association of Wine Economists", - "volume": "7", - "attachments": [ - { - "title": "Link to Library Catalog Entry", - "mimeType": "text/html", - "snapshot": false - }, - { - "title": "Library Catalog Entry Snapshot", - "mimeType": "text/html", - "snapshot": true - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "http://gso.gbv.de/DB=2.1/PPNSET?PPN=731519299", - "items": [ - { - "itemType": "bookSection", - "title": "'The truth against the world': spectrality and the mystic past in late twentieth-century Cornwall", - "creators": [ - { - "firstName": "Carl", - "lastName": "Phillips", - "creatorType": "author" - } - ], - "date": "2013", - "ISBN": "9780415628686 9780415628693 9780203080184", - "bookTitle": "Mysticism, myth and Celtic identity / Gibson, Marion *1970-*", - "libraryCatalog": "Library Catalog - kxp.k10plus.de", - "pages": "70-83", - "shortTitle": "'The truth against the world'", - "attachments": [ - { - "title": "Link to Library Catalog Entry", - "mimeType": "text/html", - "snapshot": false - }, - { - "title": "Library Catalog Entry Snapshot", - "mimeType": "text/html", - "snapshot": true - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "http://gso.gbv.de/DB=2.1/PPNSET?PPN=729937798", - "items": [ - { - "itemType": "bookSection", - "title": "Noise reduction potential of an engine oil pan", - "creators": [ - { - "firstName": "Tommy", - "lastName": "Luft", - "creatorType": "author" - }, - { - "firstName": "Stefan", - "lastName": "Ringwelski", - "creatorType": "author" - }, - { - "firstName": "Ulrich", - "lastName": "Gabbert", - "creatorType": "author" - }, - { - "firstName": "Wilfried", - "lastName": "Henze", - "creatorType": "editor" - }, - { - "firstName": "Helmut", - "lastName": "Tschöke", - "creatorType": "editor" - } - ], - "date": "2013", - "ISBN": "9783642338328", - "bookTitle": "Proceedings of the FISITA 2012 World Automotive Congress ; Vol. 13:Noise, vibration and harshness (NVH) / Zhongguo qi che gong cheng xue hui", - "libraryCatalog": "Library Catalog - kxp.k10plus.de", - "pages": "291-304", - "series": "Lecture notes in electrical engineering", - "seriesNumber": "201", - "url": "http://dx.doi.org/10.1007/978-3-642-33832-8_23", - "attachments": [ - { - "title": "Link to Library Catalog Entry", - "mimeType": "text/html", - "snapshot": false - }, - { - "title": "Library Catalog Entry Snapshot", - "mimeType": "text/html", - "snapshot": true - } - ], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "http://www.sudoc.abes.fr/cbs/xslt/DB=2.1//SRCH?IKT=12&TRM=013979922", + "url": "https://www.sudoc.abes.fr/cbs/xslt/DB=2.1/SRCH?IKT=12&TRM=013979922", "items": [ { "itemType": "journalArticle", @@ -1287,8 +1137,8 @@ var testCases = [ "creators": [ { "lastName": "Organisation mondiale de la santé", - "creatorType": "editor", - "fieldMode": true + "creatorType": "author", + "fieldMode": 1 } ], "date": "1992", @@ -1329,66 +1179,6 @@ var testCases = [ } ] }, - { - "type": "web", - "url": "http://gso.gbv.de/DB=2.1/PPNSET?PPN=600530787", - "items": [ - { - "itemType": "book", - "title": "Lehrbuch der Bodenkunde", - "creators": [ - { - "firstName": "Fritz", - "lastName": "Scheffer", - "creatorType": "author" - }, - { - "firstName": "Paul", - "lastName": "Schachtschabel", - "creatorType": "author" - }, - { - "firstName": "Hans-Peter", - "lastName": "Blume", - "creatorType": "editor" - }, - { - "firstName": "Sören", - "lastName": "Thiele", - "creatorType": "editor" - } - ], - "date": "2010", - "ISBN": "978-3-8274-1444-1", - "edition": "16", - "libraryCatalog": "Library Catalog - gso.gbv.de", - "numPages": "xiv+569", - "place": "Heidelberg", - "publisher": "Spektrum, Akad.-Verl.", - "attachments": [ - { - "title": "Link to Library Catalog Entry", - "mimeType": "text/html", - "snapshot": false - }, - { - "title": "Library Catalog Entry Snapshot", - "mimeType": "text/html", - "snapshot": true - } - ], - "tags": [ - "Bodenkunde / Lehrbuch" - ], - "notes": [ - { - "note": "\n
Literaturangaben
\n
Hier auch später ersch. unveränd. Nachdr.
\n" - } - ], - "seeAlso": [] - } - ] - }, { "type": "web", "url": "http://opac.tib.eu/DB=1/XMLPRS=N/PPN?PPN=620088028", @@ -1398,7 +1188,7 @@ var testCases = [ "title": "Phönix auf Asche: von Wäldern und Wandel in der Dübener Heide und Bitterfeld", "creators": [ { - "firstName": "Caroline", + "firstName": "Caroline Bleymüller", "lastName": "Möhring", "creatorType": "editor" } @@ -1425,7 +1215,10 @@ var testCases = [ ], "tags": [ { - "tag": "Waldsterben / Schadstoffimmission / Dübener Heide / Bitterfeld " + "tag": "*Dübener Heide / Regionalentwicklung / Landschaftsentwicklung / Forstwirtschaft" + }, + { + "tag": "*Waldsterben / Schadstoffimmission / Dübener Heide / Bitterfeld Region" } ], "notes": [ @@ -1453,6 +1246,7 @@ var testCases = [ ], "date": "2008", "ISBN": "9783793095262", + "abstractNote": "Verlagstext: Viele vermuten inzwischen richtig: Das Waldsterben, die schwere Schädigung der südwestdeutschen Wälder um 1983, war nicht von Luftschadstoffen verursacht.Vielmehr hatte ein Zusammentreffen natürlicher Waldkrankheiten zu jenem miserablen Aussehen der Bäume geführt. Das vorliegende Buch beschreibt erstmals diese Zusammenhänge in einfacher, übersichtlicher und für jeden Naturfreund leicht verständlicher Weise. Dabei lernt der Leser, die natürlichen Bedrohungen der Waldbäume mit ihren potentiellen Gefährdungen in den verschiedenen Jahreszeiten zu verstehen. In spannender, teilweise auch sehr persönlicher Darstellung wird er angeleitet, im Wald genauer hinzusehen, unter anderem die damaligen, zum Teil äußerst selten auftretenden, oft auch schwer erkennbaren Phänomene wahrzunehmen.Darüber hinaus wird deutlich, wie sehr der Mensch dazu neigt, natürliche, jedoch noch unverstandene Phänomene zu Angstszenarien zu stilisieren, und wie die öffentliche Meinung daraus politisch hoch wirksame Umweltthemen aufbauen kann. Für Waldbesitzer und Förster ist die Lektüre des Buches nahezu eine Pflicht, für Waldfreunde eine angenehme Kür.Betr. auch Schwarzwald", "callNumber": "48 Kle", "edition": "1", "libraryCatalog": "Library Catalog - opac.sub.uni-goettingen.de", @@ -1478,133 +1272,24 @@ var testCases = [ "tag": "*Baumkrankheit" }, { - "tag": "*Waldsterben" - }, - { - "tag": "*Waldsterben / Geschichte" - } - ], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "http://lhclz.gbv.de/DB=1/XMLPRS=N/PPN?PPN=08727342X", - "items": [ - { - "itemType": "book", - "title": "Geschichten, die die Forschung schreibt: ein Umweltlesebuch des Deutschen Forschungsdienstes", - "creators": [ - { - "firstName": "Bettina", - "lastName": "Reckter", - "creatorType": "editor" - }, - { - "firstName": "Rolf H.", - "lastName": "Simen", - "creatorType": "editor" - }, - { - "firstName": "Karl-Heinz", - "lastName": "Preuß", - "creatorType": "editor" - } - ], - "date": "1990", - "ISBN": "9783923120260", - "abstractNote": "Bettina Reckter, Rolf H. Simen, Karl-Heinz Preuß (Hrsg.): Geschichten, die die Forschung schreibt. Ein Umweltlesebuch des Deutschen Forschungsdienstes. Verlag Deutscher Forschungsdienst, Bonn-Bad Godesberg 1990, 320 Seiten, 29,80 Mark", - "callNumber": "CL 13 : IfW13 40 W 2", - "libraryCatalog": "Library Catalog - lhclz.gbv.de", - "numPages": "319", - "place": "Bonn - Bad Godesberg", - "publisher": "Verlag Deutscher Forschungsdienst", - "shortTitle": "Geschichten, die die Forschung schreibt", - "attachments": [ - { - "title": "Link to Library Catalog Entry", - "mimeType": "text/html", - "snapshot": false - }, - { - "title": "Library Catalog Entry Snapshot", - "mimeType": "text/html", - "snapshot": true - } - ], - "tags": [ - { - "tag": "Algenpest" - }, - { - "tag": "Aufsatzsammlung" - }, - { - "tag": "Aufsatzsammlung / Umweltschutz" - }, - { - "tag": "Bienen" - }, - { - "tag": "Gewässerverschmutzung" - }, - { - "tag": "Gleichgewicht" - }, - { - "tag": "Lebensräume" - }, - { - "tag": "Mülldeponie" - }, - { - "tag": "Perlmuscheln" - }, - { - "tag": "Saurer Regen" - }, - { - "tag": "Schmetterlinge" - }, - { - "tag": "Sonnenenergie" + "tag": "*Waldschaden" }, { - "tag": "Süßwasserfische" - }, - { - "tag": "Tiere" - }, - { - "tag": "Trinkwasser" - }, - { - "tag": "Umweltgifte" - }, - { - "tag": "Umweltschaden" - }, - { - "tag": "Umweltschutz" + "tag": "*Waldsterben" }, { - "tag": "Umweltsignale" + "tag": "*Waldsterben / Geschichte" }, { - "tag": "Vogelarten" + "tag": "Schwarzwald" }, { "tag": "Waldsterben" - }, - { - "tag": "Ökomonie" } ], "notes": [ { - "note": "
Institutsbestand, deshalb nähere Informationen im Inst. f. Wirtschaftswissenschaft (IfW13)
" + "note": "
Archivierung/Langzeitarchivierung gewährleistet 2021 ; Forst (Rechtsgrundlage SLG). Hochschule für Forstwirtschaft
Archivierung prüfen 20240324 ; 1 (Rechtsgrundlage DE-4165
" } ], "seeAlso": [] @@ -1668,18 +1353,11 @@ var testCases = [ { "itemType": "book", "title": "Daten- und Identitätsschutz in Cloud Computing, E-Government und E-Commerce", - "creators": [ - { - "firstName": "Georg", - "lastName": "Borges", - "creatorType": "editor" - } - ], - "ISBN": "978-3-642-30102-5", - "abstractNote": "Fuer neue und kuenftige Gesch ftsfelder von E-Commerce und E-Government stellen der Datenschutz und der Identit tsschutz wichtige Herausforderungen dar. Renommierte Autoren aus Wissenschaft und Praxis widmen sich in dem Band aktuellen Problemen des Daten- und Identit tsschutzes aus rechtlicher und technischer Perspektive. Sie analysieren aktuelle Problemf lle aus der Praxis und bieten Handlungsempfehlungen an. Das Werk richtet sich an Juristen und technisch Verantwortliche in Beh rden und Unternehmen sowie an Rechtsanw lte und Wissenschaftler.", + "creators": [], + "ISBN": "9783642301025", + "edition": "1st ed. 2012", "libraryCatalog": "Library Catalog - cbsopac.rz.uni-frankfurt.de", - "numPages": "x+187", - "series": "SpringerLink: Springer e-Books", + "url": "https://doi.org/10.1007/978-3-642-30102-5", "attachments": [ { "title": "Link to Library Catalog Entry", @@ -1692,28 +1370,15 @@ var testCases = [ "snapshot": true } ], - "tags": [ - "Cloud Computing", - "Datenschutz", - "Deutschland", - "Electronic Commerce", - "Electronic Government", - "Persönlichkeitsrecht", - "f Aufsatzsammlung", - "f Online-Publikation" - ], - "notes": [ - { - "note": "
Description based upon print version of record
" - } - ], + "tags": [], + "notes": [], "seeAlso": [] } ] }, { "type": "web", - "url": "http://stabikat.de/DB=1/XMLPRS=N/PPN?PPN=717966224", + "url": "https://lbssbb.gbv.de/DB=1/XMLPRS=N/PPN?PPN=717966224", "items": [ { "itemType": "book", From 22fa76e1fe92418dcb8af4df9ae650f8317b2031 Mon Sep 17 00:00:00 2001 From: smachefert <156638751+smachefert@users.noreply.github.com> Date: Thu, 26 Sep 2024 16:37:40 +0200 Subject: [PATCH 118/158] Primo: Grab callNumber in , remove failing tests (#3360) --- Primo 2018.js | 98 +---------------------------------------- Primo Normalized XML.js | 84 +++++++++++++++++++++++++++++++++-- 2 files changed, 81 insertions(+), 101 deletions(-) diff --git a/Primo 2018.js b/Primo 2018.js index e91a6a1f5e0..7997f43d1a3 100644 --- a/Primo 2018.js +++ b/Primo 2018.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2022-05-11 21:32:37" + "lastUpdated": "2024-09-18 09:43:45" } /* @@ -110,102 +110,6 @@ function getPnxElems(doc) { /** BEGIN TEST CASES **/ var testCases = [ - { - "type": "web", - "url": "http://virtuose.uqam.ca/primo-explore/fulldisplay?vid=UQAM&docid=UQAM_BIB000969205&context=L", - "defer": true, - "items": [ - { - "itemType": "book", - "title": "War", - "creators": [ - { - "lastName": "Baynes", - "firstName": "Ken", - "creatorType": "author" - }, - { - "firstName": "Ken", - "lastName": "Baynes", - "creatorType": "author" - }, - { - "lastName": "Welsh Arts Council", - "creatorType": "contributor", - "fieldMode": 1 - }, - { - "lastName": "Glynn Vivian Art Gallery", - "creatorType": "contributor", - "fieldMode": 1 - } - ], - "date": "1970", - "callNumber": "NX650G8B38", - "language": "eng", - "libraryCatalog": "virtuose.uqam.ca", - "place": "Boston", - "publisher": "Book and Art Chop", - "series": "Art and society 1", - "attachments": [], - "tags": [ - { - "tag": "ART; GUERRE; WAR" - } - ], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "http://bcujas-catalogue.univ-paris1.fr/primo-explore/fulldisplay?vid=CUJAS_V1&docid=33CUJAS_ALEPH000070200&context=L&search_scope=LSCOP_ALL", - "defer": true, - "items": [ - { - "itemType": "book", - "title": "Test pattern for living", - "creators": [ - { - "firstName": "Nicholas", - "lastName": "Johnson", - "creatorType": "author" - } - ], - "date": "1972", - "callNumber": "203.206", - "language": "eng", - "libraryCatalog": "bcujas-catalogue.univ-paris1.fr", - "numPages": "xx+154", - "place": "Toronto New York", - "publisher": "Bantam Books", - "attachments": [], - "tags": [ - { - "tag": "Mass media" - }, - { - "tag": "Social aspects" - }, - { - "tag": "United States" - }, - { - "tag": "United States" - }, - { - "tag": "Social conditions" - }, - { - "tag": "1960-" - } - ], - "notes": [], - "seeAlso": [] - } - ] - }, { "type": "web", "url": "https://explore.lib.uliege.be/discovery/collectionDiscovery?vid=32ULG_INST:ULIEGE&collectionId=81129164700002321&lang=fr", diff --git a/Primo Normalized XML.js b/Primo Normalized XML.js index 69678903d56..1c2dd1bea4c 100644 --- a/Primo Normalized XML.js +++ b/Primo Normalized XML.js @@ -11,7 +11,7 @@ }, "inRepository": true, "translatorType": 1, - "lastUpdated": "2024-04-04 15:46:05" + "lastUpdated": "2024-09-18 09:58:45" } /* @@ -307,14 +307,19 @@ function doImport() { callArray.push(callNumber[i].textContent.match(/\$\$D(.+?)\$/)[1]); } } + /* 2024-09 : adding a test on p:delivery/p:bestlocation/p:callnumber to get Callnumber from Primo VE pages like https://bcujas-catalogue.univ-paris1.fr/discovery/fulldisplay?context=L&vid=33CUJAS_INST:33CUJAS_INST&search_scope=MyInstitution&tab=LibraryCatalog&docid=alma990004764520107621 for example */ if (!callArray.length) { - callNumber = ZU.xpath(doc, '//p:display/p:availlibrary', ns); + callNumber = ZU.xpath(doc, '//p:display/p:availlibrary|//p:delivery/p:bestlocation/p:callNumber', ns); for (let i = 0; i < callNumber.length; i++) { - if (callNumber[i].textContent.search(/\$\$2.+\$/) != -1) { - callArray.push(callNumber[i].textContent.match(/\$\$2\(?(.+?)(?:\s*\))?\$/)[1]); + let testCallNumberWithSubfields = callNumber[i].textContent.match(/\$\$2\(?(.+?)(?:\s*\))?\$/); + if (testCallNumberWithSubfields) { + callArray.push(testCallNumberWithSubfields[1]); + } else { + callArray.push(callNumber[i].textContent); } } } + if (callArray.length) { // remove duplicate call numbers callArray = dedupeArray(callArray); @@ -791,6 +796,7 @@ var testCases = [ ], "date": "1971", "abstractNote": "Includes bibliographical references.", + "callNumber": "TD174 .D95", "language": "eng", "place": "New York", "publisher": "Chelsea House Publishers", @@ -865,6 +871,76 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "import", + "input": "detailsgetit1true33CUJAS_INSTnullnullthumbnailhttps://proxy-euf.hosted.exlibrisgroup.com/exl_rewrite/books.google.com/books?bibkeys=ISBN:1107199956,OCLC:,LCCN:&jscmd=viewapi&callback=updateGBSCoverthumbnail:_0available_in_libraryfalsefalse852##bMainLocationMAG2null9900047645201076218CUJnullfalsetruenullBIU Cujas567.067ALMA_0133CUJAS_INSTOVPavailable_:0Magasin 2ème sous-sol2262944550007621HoldingResultKey [mid=2262944550007621, libraryId=112237610007621, locationCode=MAG2, callNumber=567.067]nullnull852##bMainLocationMAG2null9900047645201076218CUJnullfalsetruenullBIU Cujas567.067ALMA_0133CUJAS_INSTOVPavailable_:0Magasin 2ème sous-sol2262944550007621HoldingResultKey [mid=2262944550007621, libraryId=112237610007621, locationCode=MAG2, callNumber=567.067]nullnullnullfalsenullfalsenullnullnullnullnullnullnullAlma-Povpnullnullfalsenull33CUJAS_INSTservice_getitALMA_01990004764520107621OVP_:0Alma-PSimone Daniela2019Copyright and collective authorship locating the authors of collaborative workCopyright and collective authorship locating the authors of collaborative work2019Encyclopédies électroniquesDroitContenu généré par les utilisateursQualité d'auteurDroit d'auteurElectronic encyclopediasUser-generated content Law and legislationCopyright ArtAuthorshipCopyrightWikipedia97811071999581107199956La 4e de couverture indique : "As technology makes it easier for people to work together, large-scale collaboration is becoming increasingly prevalent. In this context, the question of how to determine authorship - and hence ownership - of copyright in collaborative works is an important question to which current copyright law fails to provide a coherent or consistent answer. In Copyright and Collective Authorship, Daniela Simone engages with the problem of how to determine the authorship of highly collaborative works. Employing insights from the ways in which collaborators understand and regulate issues of authorship, the book argues that a recalibration of copyright law is necessary, proposing an inclusive and contextual approach to joint authorship that is true to the legal concept of authorship but is also more aligned with creative reality."engCopyright and collective authorship locating the authors of collaborative work2019990 20190827980 BK935 23749051X930 751052119 567.067 b001(PPN)148977332 Cambridge intellectual property and information lawCambridge intellectual property and information lawCambridge University PressALP000476452UKMGB019402122CHBIS011301756CHVBK563491051on1057238619(OCoLC)1119538850(ALP)000476452CUJ01CUJ01(PPN)23749051X(PPN)23749051Xbooks2019001(PPN)148977332 Cambridge intellectual property and information lawCambridge intellectual property and information lawCopyright and collective authorship locating the authors of collaborative workSimone, DanielaSimone Daniela2019$$CISBN$$V978-1-107-19995-8;$$CISBN$$V1-107-19995-6;$$CPPN$$V23749051X;$$CMMSID$$V9900047645201076212019Simone, Daniela$$QSimone Daniela<a href="https://www.sudoc.fr/23749051X" target="_blank">Voir la notice</a>WikipediaCopyrightAuthorshipCopyright -- ArtUser-generated content -- Law and legislationElectronic encyclopediasDroit d'auteurQualité d'auteurContenu généré par les utilisateurs -- DroitEncyclopédies électroniques1 vol. (xxi-300 p.) : couv. ill. en coul. ; 24 cmengAlmabookCopyright and collective authorship : locating the authors of collaborative work1$$Cmain_series$$VCambridge intellectual property and information law$$QCambridge intellectual property and information law 990004764520107621Cambridge intellectual property and information law$$QCambridge intellectual property and information lawCambridge etc. : Cambridge University PressCambridge [etc.]CODE_PAYS_GB23749051X1. Copyright law and collective authorship 2. Authorship and joint authorship 3. Wikipedia 4. Australian indigenous art 5. Scientific collaborations 6. Film 7. Characteristics of collective authorship and the role of copyright law 8. An inclusive, contextual approach to the joint authorship testTYPE_SUPPORT_BKalma990004764520107621alma1.0000476452-CUJ01UNIMARC990004764520107621ILSfalse2019SimoneBibliogr. p. 273-293. Notes bibliogr. IndexCambridge [etc978-1-107-19995-81-107-19995-6bookBOOK(ocolc)1119538850La 4e de couverture indique : "As technology makes it easier for people to work together, large-scale collaboration is becoming increasingly prevalent. In this context, the question of how to determine authorship - and hence ownership - of copyright in collaborative works is an important question to which current copyright law fails to provide a coherent or consistent answer. In Copyright and Collective Authorship, Daniela Simone engages with the problem of how to determine the authorship of highly collaborative works. Employing insights from the ways in which collaborators understand and regulate issues of authorship, the book argues that a recalibration of copyright law is necessary, proposing an inclusive and contextual approach to joint authorship that is true to the legal concept of authorship but is also more aligned with creative reality."Copyright and collective authorship : locating the authors of collaborative workDanielaCambridge intellectual property and information lawSimone DanielaSimone,DanielabookCopyright and collective authorship : locating the authors of collaborative workCambridge University Press2019Simone DanielaCopyright and collective authorship locating the authors of collaborative work", + "items": [ + { + "itemType": "book", + "title": "Copyright and collective authorship: locating the authors of collaborative work", + "creators": [ + { + "lastName": "Simone Daniela", + "creatorType": "author", + "fieldMode": 1 + } + ], + "date": "2019", + "ISBN": "9781107199958", + "abstractNote": "La 4e de couverture indique : \"As technology makes it easier for people to work together, large-scale collaboration is becoming increasingly prevalent. In this context, the question of how to determine authorship - and hence ownership - of copyright in collaborative works is an important question to which current copyright law fails to provide a coherent or consistent answer. In Copyright and Collective Authorship, Daniela Simone engages with the problem of how to determine the authorship of highly collaborative works. Employing insights from the ways in which collaborators understand and regulate issues of authorship, the book argues that a recalibration of copyright law is necessary, proposing an inclusive and contextual approach to joint authorship that is true to the legal concept of authorship but is also more aligned with creative reality.\"", + "callNumber": "567.067", + "language": "eng", + "numPages": "xxi+300", + "place": "Cambridge [etc", + "publisher": "Cambridge University Press", + "series": "Cambridge intellectual property and information law", + "attachments": [], + "tags": [ + { + "tag": "Art" + }, + { + "tag": "Authorship" + }, + { + "tag": "Contenu généré par les utilisateurs" + }, + { + "tag": "Copyright" + }, + { + "tag": "Copyright" + }, + { + "tag": "Droit" + }, + { + "tag": "Droit d'auteur" + }, + { + "tag": "Electronic encyclopedias" + }, + { + "tag": "Encyclopédies électroniques" + }, + { + "tag": "Law and legislation" + }, + { + "tag": "Qualité d'auteur" + }, + { + "tag": "User-generated content" + }, + { + "tag": "Wikipedia" + } + ], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From f784fff615a5275e64202d1e4ba51f8aaabf899f Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 27 Sep 2024 10:36:04 -0400 Subject: [PATCH 119/158] DOI Content Negotiation: Remove CrossRef outage workaround Outage is over. Reverts 87bb5b2647dbf1549d5496a57f91a39c2e727da3 --- DOI Content Negotiation.js | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/DOI Content Negotiation.js b/DOI Content Negotiation.js index b25b6080db0..0ab57c7e634 100644 --- a/DOI Content Negotiation.js +++ b/DOI Content Negotiation.js @@ -8,7 +8,7 @@ "priority": 100, "inRepository": true, "translatorType": 8, - "lastUpdated": "2024-09-14 20:03:55" + "lastUpdated": "2024-09-27 14:35:38" } /* @@ -64,33 +64,6 @@ async function doSearch(items) { } async function processDOI(doi) { - // TEMP: Use Crossref REST for Crossref DOIs during Crossref 2024-09-16 outage - let currentDate = new Date(); - let startDate = new Date(Date.UTC(2024, 8, 16, 20, 0, 0)); // 16 September 2024, 20:00 UTC (1 hour before outage) - let endDate = new Date(Date.UTC(2024, 8, 17, 23, 0, 0)); // 17 September 2024, 23:00 UTC (2 hours after outage) - if (currentDate >= startDate && currentDate <= endDate) { - try { - let raJSON = await requestJSON( - `https://doi.org/ra/${encodeURIComponent(doi)}` - ); - if (raJSON.length) { - let ra = raJSON[0].RA; - if (ra == 'Crossref') { - let translate = Zotero.loadTranslator('search'); - // Crossref REST - translate.setTranslator("0a61e167-de9a-4f93-a68a-628b48855909"); - let item = { itemType: "journalArticle", DOI: doi }; - translate.setSearch(item); - translate.translate(); - return; - } - } - } - catch (e) { - Z.debug(e); - } - } - 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" } } From 60ab0690924ff56c44fd7fa54a43c5e541dd3da9 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 27 Sep 2024 10:37:09 -0400 Subject: [PATCH 120/158] DOI Content Negotiation: Update tests --- DOI Content Negotiation.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DOI Content Negotiation.js b/DOI Content Negotiation.js index 0ab57c7e634..edaee7e013f 100644 --- a/DOI Content Negotiation.js +++ b/DOI Content Negotiation.js @@ -196,6 +196,7 @@ var testCases = [ "libraryCatalog": "DOI.org (Crossref)", "pages": "69-78", "publicationTitle": "Academicus International Scientific Journal", + "rights": "https://creativecommons.org/licenses/by-nc-nd/4.0/", "url": "https://www.medra.org/servlet/MREngine?hdl=10.7336/academicus.2014.09.05", "volume": "9", "attachments": [], @@ -275,6 +276,7 @@ var testCases = [ "libraryCatalog": "DOI.org (Crossref)", "pages": "394-410", "publicationTitle": "IEEE Transactions on Plasma Science", + "rights": "https://ieeexplore.ieee.org/Xplorehelp/downloads/license-information/IEEE.html", "url": "http://ieeexplore.ieee.org/document/4316723/", "volume": "15", "attachments": [], From 518493acb947e0cc181f0fe74941e5e15f202046 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 30 Sep 2024 09:42:02 -0400 Subject: [PATCH 121/158] IEEE Xplore: Use direct PDF URL as fallback May address https://forums.zotero.org/discussion/118231/no-import-of-pdfs-from-ieee-explore-via-connector-firefox-possible --- IEEE Xplore.js | 58 ++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/IEEE Xplore.js b/IEEE Xplore.js index c4d819e1afc..52d8b8a41fd 100644 --- a/IEEE Xplore.js +++ b/IEEE Xplore.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-09-26 13:30:54" + "lastUpdated": "2024-09-30 13:40:38" } /* @@ -133,7 +133,6 @@ async function doWeb(doc, url) { async function scrape(doc, url = doc.location.href) { var arnumber = (url.match(/arnumber=(\d+)/) || url.match(/\/document\/(\d+)/))[1]; - var pdf = "/stamp/stamp.jsp?tp=&arnumber=" + arnumber; // Z.debug("arNumber = " + arnumber); var script = ZU.xpathText(doc, '//script[@type="text/javascript" and contains(., "global.document.metadata")]'); @@ -163,6 +162,27 @@ async function scrape(doc, url = doc.location.href) { earlyaccess = true; bibtex = text.replace(/^@null/, "@article"); } + + let pdfGatewayURL = "/stamp/stamp.jsp?tp=&arnumber=" + arnumber; + let pdfURL; + try { + let src = await requestDocument(pdfGatewayURL); + // Either the PDF is embedded in the page, or (e.g. for iOS) + // the page has a redirect to the full-page PDF + // + // As of 3/2020, embedded PDFs via a web-based proxy are + // being served as getPDF.jsp, so support that in addition + // to direct .pdf URLs. + let m = / Date: Mon, 30 Sep 2024 09:50:25 -0400 Subject: [PATCH 122/158] ACS Publications: Don't use Object.hasOwn() Not supported on older browsers. --- ACS Publications.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ACS Publications.js b/ACS Publications.js index a6782e72481..a8578e17c1b 100644 --- a/ACS Publications.js +++ b/ACS Publications.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-09-16 00:07:05" + "lastUpdated": "2024-09-30 13:50:18" } /* @@ -155,7 +155,7 @@ function detectWeb(doc, url) { } function cleanNumberField(item, field) { - if (Object.hasOwn(item, field)) { + if (item[field]) { let n = parseInt(item[field]); if (n <= 0 || isNaN(n)) { delete item[field]; From 56c3b87d7de989cd9b492ea655687b34efeca29f Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 3 Oct 2024 10:30:37 -0400 Subject: [PATCH 123/158] ScienceDirect: Don't add `isDTMRedir` URL param (#3368) --- ScienceDirect.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ScienceDirect.js b/ScienceDirect.js index 9e1e6173055..c98b54f17e1 100644 --- a/ScienceDirect.js +++ b/ScienceDirect.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-06-13 19:43:00" + "lastUpdated": "2024-10-03 14:17:12" } function detectWeb(doc, url) { @@ -134,7 +134,7 @@ async function getPDFLink(doc) { let md5 = urlMetadata.queryParams.md5; let pid = urlMetadata.queryParams.pid; if (path && pdfExtension && pii && md5 && pid){ - pdfURL = `/${path}/${pii}${pdfExtension}?md5=${md5}&pid=${pid}&isDTMRedir=Y`; + pdfURL = `/${path}/${pii}${pdfExtension}?md5=${md5}&pid=${pid}`; Zotero.debug("Created PDF URL from JSON data: " + pdfURL); return pdfURL; } @@ -153,7 +153,7 @@ async function getPDFLink(doc) { // enough to get us through even without those parameters. pdfURL = attr(doc, 'link[rel="canonical"]', 'href'); if (pdfURL) { - pdfURL = pdfURL + '/pdfft?isDTMRedir=true&download=true'; + pdfURL = pdfURL + '/pdfft?download=true'; Zotero.debug("Trying to construct PDF URL from canonical link: " + pdfURL); return pdfURL; } From e6f65ba72c3650fda767f9994ea5b72a3cbcb751 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 8 Oct 2024 14:21:30 -0400 Subject: [PATCH 124/158] clinicaltrials.gov: Use new API - Old API removed - Classic site is no longer available https://forums.zotero.org/discussion/118562/persistent-issues-pulling-from-clinicaltrials-gov --- clinicaltrials.gov.js | 124 +++++++++++++++--------------------------- 1 file changed, 43 insertions(+), 81 deletions(-) diff --git a/clinicaltrials.gov.js b/clinicaltrials.gov.js index 2bb88eb79c6..bb9e961151f 100644 --- a/clinicaltrials.gov.js +++ b/clinicaltrials.gov.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-09-17 06:35:36" + "lastUpdated": "2024-10-08 18:20:57" } /* @@ -36,57 +36,33 @@ */ -function isClassic(url) { - return url.startsWith("https://classic.clinicaltrials.gov"); -} - function detectWeb(doc, url) { let urlObject = new URL(url); - if (!isClassic(url)) { // new UI and default since July 2023 - if (urlObject.pathname === "/search") { - // Watch for disappearance/appearance of results due to filtering - let resultsNode = doc.querySelector(".results-content-area"); - if (resultsNode) { - // after the node has been generated by ajax, watch it - Zotero.monitorDOMChanges(resultsNode); - } - - if (getSearchResults(doc, true/* checkOnly */)) { - return "multiple"; - } - } - else if (urlObject.pathname.startsWith("/study/")) { - return "report"; + if (urlObject.pathname === "/search") { + // Watch for disappearance/appearance of results due to filtering + let resultsNode = doc.querySelector(".results-content-area"); + if (resultsNode) { + // after the node has been generated by ajax, watch it + Zotero.monitorDOMChanges(resultsNode); } - return false; - } - // for "classic" UI - if (urlObject.pathname === "/ct2/results") { - // The following node being watched is present on the intial page. - Zotero.monitorDOMChanges(doc.querySelector("#docListBlock")); if (getSearchResults(doc, true/* checkOnly */)) { return "multiple"; } } - else if (urlObject.pathname.startsWith("/ct2/show/")) { + else if (urlObject.pathname.startsWith("/study/")) { return "report"; } - return false; } // The keys in the returned item will be the NCTId, which is enough for // identifying a report function getSearchResults(doc, checkOnly) { - let resultSelector - = isClassic(doc.location.href) - ? '#theDataTable a[href^="/ct2/show/"]' - : "ctg-search-hit-card header > a[href^='/study/']"; var items = {}; var found = false; - var rows = doc.querySelectorAll(resultSelector); + var rows = doc.querySelectorAll("ctg-search-hit-card header > a[href^='/study/']"); for (let row of rows) { let id = getClinicalTrialID(row.href); let title = ZU.trimInternal(row.textContent); @@ -112,8 +88,8 @@ async function doWeb(doc, url) { } async function scrape(clinicalTrialID) { - let jsonRequestURL = `https://classic.clinicaltrials.gov/api/query/full_studies?expr=${clinicalTrialID}&fmt=JSON`; - classicJSONToItem(await requestJSON(jsonRequestURL)); + let jsonRequestURL = `https://clinicaltrials.gov/api/int/studies/${clinicalTrialID}`; + studiesJSONToItem(await requestJSON(jsonRequestURL)); } function getClinicalTrialID(url) { @@ -121,46 +97,40 @@ function getClinicalTrialID(url) { return pathComponents[pathComponents.length - 1]; // last component in pathname } -// Convert the data object from the JSON response of "classic" API into item -// TODO: -// - Add support for new API -// - This can be the basis for a search and import translator -function classicJSONToItem(data) { +function studiesJSONToItem(data) { let item = new Zotero.Item("report"); - let study = data.FullStudiesResponse.FullStudies[0].Study; + let study = data.study; // Start get the creator info let creators = []; - let authorModule = study.ProtocolSection.SponsorCollaboratorsModule; - let firstAuthor = authorModule.ResponsibleParty; - let leadSponsor = authorModule.LeadSponsor; + let authorModule = study.protocolSection.sponsorCollaboratorsModule; + let firstAuthor = authorModule.responsibleParty; + let leadSponsor = authorModule.leadSponsor; let investigatorName; - if (firstAuthor - && firstAuthor.ResponsiblePartyType !== "Sponsor") { // a person + if (firstAuthor && firstAuthor.type !== "SPONSOR") { // a person // Clean up the comma trailing titles such as "First Last, MD, PhD" - investigatorName = firstAuthor.ResponsiblePartyInvestigatorFullName; + investigatorName = firstAuthor.investigatorFullName; let cleanName = investigatorName.split(", ")[0]; creators.push(ZU.cleanAuthor(cleanName, "author")); } - if (leadSponsor && leadSponsor.LeadSponsorName !== investigatorName) { + if (leadSponsor && leadSponsor.name !== investigatorName) { // lead sponsor is not a duplicate of the PI creators.push({ - lastName: leadSponsor.LeadSponsorName, + lastName: leadSponsor.name, creatorType: (creators.length ? "contributor" : "author"), fieldMode: 1 }); } - if (authorModule.CollaboratorList) { - let collabArray = authorModule.CollaboratorList.Collaborator || []; - for (let entity of collabArray) { - if (entity && entity.CollaboratorName) { + if (authorModule.collaborators) { + for (let entity of authorModule.collaborators) { + if (entity && entity.name) { creators.push({ - lastName: entity.CollaboratorName, + lastName: entity.name, creatorType: "contributor", fieldMode: 1 }); @@ -170,23 +140,21 @@ function classicJSONToItem(data) { item.creators = creators; - let idModule = study.ProtocolSection.IdentificationModule; - let statusModule = study.ProtocolSection.StatusModule; + let idModule = study.protocolSection.identificationModule; + let statusModule = study.protocolSection.statusModule; - item.title = idModule.OfficialTitle; - item.date = statusModule.LastUpdateSubmitDate; - item.accessDate = ZU.strToISO(data.FullStudiesResponse.DataVrs); + item.title = idModule.officialTitle; + item.date = statusModule.lastUpdateSubmitDate; item.institution = "clinicaltrials.gov"; // publisher - item.reportNumber = idModule.NCTId; - item.shortTitle = idModule.BriefTitle; - item.abstractNote = study.ProtocolSection.DescriptionModule.BriefSummary; - item.url = "https://clinicaltrials.gov/study/" + idModule.NCTId; + item.reportNumber = idModule.nctId; + item.shortTitle = idModule.briefTitle; + item.abstractNote = ZU.cleanTags(study.protocolSection.descriptionModule.briefSummary); + item.url = "https://clinicaltrials.gov/study/" + idModule.nctId; item.reportType = "Clinical trial registration"; - item.extra = `submitted: ${statusModule.StudyFirstSubmitDate}`; + item.extra = `submitted: ${statusModule.studyFirstSubmitDate}`; item.complete(); } - /** BEGIN TEST CASES **/ var testCases = [ { @@ -203,9 +171,9 @@ var testCases = [ "fieldMode": 1 } ], - "date": "December 15, 2020", + "date": "2020-12-15", "abstractNote": "The primary objective of this study is to evaluate the efficacy of 2 remdesivir (RDV) regimens with respect to clinical status assessed by a 7-point ordinal scale on Day 14.", - "extra": "submitted: February 28, 2020", + "extra": "submitted: 2020-02-28", "institution": "clinicaltrials.gov", "libraryCatalog": "clinicaltrials.gov", "reportNumber": "NCT04292899", @@ -238,9 +206,9 @@ var testCases = [ "fieldMode": 1 } ], - "date": "April 25, 2007", - "abstractNote": "This study will investigate Gastroesophageal Reflux Disease (GERD)as a cause of sleep disturbance. Patients with GERD may experience all or some of the following symptoms: stomach acid or partially digested food re-entering the esophagus (which is sometimes referred to as heartburn or regurgitation) and belching. Even very small, unnoticeable amounts of rising stomach acid may cause patients to wake up during the night.\n\nThis study will also investigate the effect of Rabeprazole, (brand name Aciphex) on patients with known insomnia. Rabeprazole is an FDA approved medication already marketed for the treatment of GERD.", - "extra": "submitted: February 3, 2006", + "date": "2007-04-25", + "abstractNote": "This study will investigate Gastroesophageal Reflux Disease (GERD)as a cause of sleep disturbance.\nPatients with GERD may experience all or some of the following symptoms: stomach acid or partially digested food re-entering the esophagus (which is sometimes referred to as heartburn or regurgitation) and belching.\nEven very small, unnoticeable amounts of rising stomach acid may cause patients to wake up during the night.\n\nThis study will also investigate the effect of Rabeprazole, (brand name Aciphex) on patients with known insomnia.\nRabeprazole is an FDA approved medication already marketed for the treatment of GERD.", + "extra": "submitted: 2006-02-03", "institution": "clinicaltrials.gov", "libraryCatalog": "clinicaltrials.gov", "reportNumber": "NCT00287391", @@ -273,9 +241,9 @@ var testCases = [ "fieldMode": 1 } ], - "date": "April 9, 2020", + "date": "2020-04-09", "abstractNote": "The study aims to evaluate the efficacy and safety of hydroxychloroquine in the treatment of COVID-19 pneumonia.", - "extra": "submitted: February 6, 2020", + "extra": "submitted: 2020-02-06", "institution": "clinicaltrials.gov", "libraryCatalog": "clinicaltrials.gov", "reportNumber": "NCT04261517", @@ -290,7 +258,7 @@ var testCases = [ }, { "type": "web", - "url": "https://classic.clinicaltrials.gov/ct2/show/NCT04292899", + "url": "https://clinicaltrials.gov/study/NCT04292899", "items": [ { "itemType": "report", @@ -302,9 +270,9 @@ var testCases = [ "fieldMode": 1 } ], - "date": "December 15, 2020", + "date": "2020-12-15", "abstractNote": "The primary objective of this study is to evaluate the efficacy of 2 remdesivir (RDV) regimens with respect to clinical status assessed by a 7-point ordinal scale on Day 14.", - "extra": "submitted: February 28, 2020", + "extra": "submitted: 2020-02-28", "institution": "clinicaltrials.gov", "libraryCatalog": "clinicaltrials.gov", "reportNumber": "NCT04292899", @@ -323,12 +291,6 @@ var testCases = [ "url": "https://www.clinicaltrials.gov/search?term=transgender%20care", "defer": true, "items": "multiple" - }, - { - "type": "web", - "url": "https://classic.clinicaltrials.gov/ct2/results?cond=Coronavirus+Disease+2019&term=&cntry=&state=&city=&dist=&Search=Search", - "defer": true, - "items": "multiple" } ] /** END TEST CASES **/ From 30664cea8f9670a81b27c3208369842b49bb2c08 Mon Sep 17 00:00:00 2001 From: Jonas Zaugg Date: Wed, 9 Oct 2024 15:57:09 +0200 Subject: [PATCH 125/158] arXiv: Use Atom API instead of OAI (#3366) Co-authored-by: zoe-translates <116055375+zoe-translates@users.noreply.github.com> Co-authored-by: Abe Jellinek --- .../lib/rules/test-cases.js | 12 +- arXiv.org.js | 642 ++++++++++++------ 2 files changed, 446 insertions(+), 208 deletions(-) diff --git a/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js b/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js index 424c514ac34..5a12be2b7fe 100644 --- a/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js +++ b/.ci/eslint-plugin-zotero-translator/lib/rules/test-cases.js @@ -113,9 +113,15 @@ module.exports = { }); } else if (testCase.type === 'search') { - const expected = ['DOI', 'ISBN', 'PMID', 'identifiers', 'contextObject', 'adsBibcode', 'ericNumber', 'openAlex']; - const keys = Array.isArray(testCase.input) ? testCase.input.flatMap(Object.keys) : Object.keys(testCase.input); - + // console.log(JSON.stringify(testCase.input)) + const expected = ['DOI', 'ISBN', 'PMID', 'arXiv', 'identifiers', 'contextObject', 'adsBibcode', 'ericNumber', 'openAlex']; + let keys; + if (Array.isArray(testCase.input)) { + keys = testCase.input.flatMap(Object.keys); + } + else { + keys = Object.keys(testCase.input); + } if (!keys.every(key => expected.includes(key))) { const invalidKey = keys.find(key => !expected.includes(key)); context.report({ diff --git a/arXiv.org.js b/arXiv.org.js index aaa63fd5a78..30eefa09bc0 100644 --- a/arXiv.org.js +++ b/arXiv.org.js @@ -2,14 +2,14 @@ "translatorID": "ecddda2e-4fc6-4aea-9f17-ef3b56d7377a", "label": "arXiv.org", "creator": "Sean Takats and Michael Berkowitz", - "target": "^https?://([^\\.]+\\.)?(arxiv\\.org|xxx\\.lanl\\.gov)/(find|catchup|list/\\w|abs/|pdf/)", - "minVersion": "3.0", + "target": "^https?://([^\\.]+\\.)?(arxiv\\.org|xxx\\.lanl\\.gov)/(search|find|catchup|list/\\w|abs/|pdf/)", + "minVersion": "6.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 12, "browserSupport": "gcsibv", - "lastUpdated": "2024-01-05 12:21:40" + "lastUpdated": "2024-10-09 13:54:06" } /* @@ -35,217 +35,396 @@ ***** END LICENSE BLOCK ***** */ -function detectSearch(item) { - return !!item.arXiv; -} - -function doSearch(item) { - var url = 'https://export.arxiv.org/oai2?verb=GetRecord&metadataPrefix=oai_dc' - + '&identifier=oai%3AarXiv.org%3A' + encodeURIComponent(item.arXiv); - ZU.doGet(url, parseXML); -} +const arXivCategories = { + // Technically not categories, but added here to allow tags with "Archive - Sub-Field" structure + cs: "Computer Science", + econ: "Economics", + eess: "Electrical Engineering and Systems Science", + math: "Mathematics", + nlin: "Nonlinear Sciences", + physics: "Physics", + "q-fin": "Quantitative Finance", + stat: "Statistics", + "acc-phys": "Accelerator Physics", + "adap-org": "Adaptation, Noise, and Self-Organizing Systems", + "alg-geom": "Algebraic Geometry", + "ao-sci": "Atmospheric-Oceanic Sciences", + "astro-ph": "Astrophysics", + "astro-ph.CO": "Cosmology and Nongalactic Astrophysics", + "astro-ph.EP": "Earth and Planetary Astrophysics", + "astro-ph.GA": "Astrophysics of Galaxies", + "astro-ph.HE": "High Energy Astrophysical Phenomena", + "astro-ph.IM": "Instrumentation and Methods for Astrophysics", + "astro-ph.SR": "Solar and Stellar Astrophysics", + "atom-ph": "Atomic, Molecular and Optical Physics", + "bayes-an": "Bayesian Analysis", + "chao-dyn": "Chaotic Dynamics", + "chem-ph": "Chemical Physics", + "cmp-lg": "Computation and Language", + "comp-gas": "Cellular Automata and Lattice Gases", + "cond-mat": "Condensed Matter", + "cond-mat.dis-nn": "Disordered Systems and Neural Networks", + "cond-mat.mes-hall": "Mesoscale and Nanoscale Physics", + "cond-mat.mtrl-sci": "Materials Science", + "cond-mat.other": "Other Condensed Matter", + "cond-mat.quant-gas": "Quantum Gases", + "cond-mat.soft": "Soft Condensed Matter", + "cond-mat.stat-mech": "Statistical Mechanics", + "cond-mat.str-el": "Strongly Correlated Electrons", + "cond-mat.supr-con": "Superconductivity", + "cs.AI": "Artificial Intelligence", + "cs.AR": "Hardware Architecture", + "cs.CC": "Computational Complexity", + "cs.CE": "Computational Engineering, Finance, and Science", + "cs.CG": "Computational Geometry", + "cs.CL": "Computation and Language", + "cs.CR": "Cryptography and Security", + "cs.CV": "Computer Vision and Pattern Recognition", + "cs.CY": "Computers and Society", + "cs.DB": "Databases", + "cs.DC": "Distributed, Parallel, and Cluster Computing", + "cs.DL": "Digital Libraries", + "cs.DM": "Discrete Mathematics", + "cs.DS": "Data Structures and Algorithms", + "cs.ET": "Emerging Technologies", + "cs.FL": "Formal Languages and Automata Theory", + "cs.GL": "General Literature", + "cs.GR": "Graphics", + "cs.GT": "Computer Science and Game Theory", + "cs.HC": "Human-Computer Interaction", + "cs.IR": "Information Retrieval", + "cs.IT": "Information Theory", + "cs.LG": "Machine Learning", + "cs.LO": "Logic in Computer Science", + "cs.MA": "Multiagent Systems", + "cs.MM": "Multimedia", + "cs.MS": "Mathematical Software", + "cs.NA": "Numerical Analysis", + "cs.NE": "Neural and Evolutionary Computing", + "cs.NI": "Networking and Internet Architecture", + "cs.OH": "Other Computer Science", + "cs.OS": "Operating Systems", + "cs.PF": "Performance", + "cs.PL": "Programming Languages", + "cs.RO": "Robotics", + "cs.SC": "Symbolic Computation", + "cs.SD": "Sound", + "cs.SE": "Software Engineering", + "cs.SI": "Social and Information Networks", + "cs.SY": "Systems and Control", + "dg-ga": "Differential Geometry", + "econ.EM": "Econometrics", + "econ.GN": "General Economics", + "econ.TH": "Theoretical Economics", + "eess.AS": "Audio and Speech Processing", + "eess.IV": "Image and Video Processing", + "eess.SP": "Signal Processing", + "eess.SY": "Systems and Control", + "funct-an": "Functional Analysis", + "gr-qc": "General Relativity and Quantum Cosmology", + "hep-ex": "High Energy Physics - Experiment", + "hep-lat": "High Energy Physics - Lattice", + "hep-ph": "High Energy Physics - Phenomenology", + "hep-th": "High Energy Physics - Theory", + "math-ph": "Mathematical Physics", + "math.AC": "Commutative Algebra", + "math.AG": "Algebraic Geometry", + "math.AP": "Analysis of PDEs", + "math.AT": "Algebraic Topology", + "math.CA": "Classical Analysis and ODEs", + "math.CO": "Combinatorics", + "math.CT": "Category Theory", + "math.CV": "Complex Variables", + "math.DG": "Differential Geometry", + "math.DS": "Dynamical Systems", + "math.FA": "Functional Analysis", + "math.GM": "General Mathematics", + "math.GN": "General Topology", + "math.GR": "Group Theory", + "math.GT": "Geometric Topology", + "math.HO": "History and Overview", + "math.IT": "Information Theory", + "math.KT": "K-Theory and Homology", + "math.LO": "Logic", + "math.MG": "Metric Geometry", + "math.MP": "Mathematical Physics", + "math.NA": "Numerical Analysis", + "math.NT": "Number Theory", + "math.OA": "Operator Algebras", + "math.OC": "Optimization and Control", + "math.PR": "Probability", + "math.QA": "Quantum Algebra", + "math.RA": "Rings and Algebras", + "math.RT": "Representation Theory", + "math.SG": "Symplectic Geometry", + "math.SP": "Spectral Theory", + "math.ST": "Statistics Theory", + "mtrl-th": "Materials Theory", + "nlin.AO": "Adaptation and Self-Organizing Systems", + "nlin.CD": "Chaotic Dynamics", + "nlin.CG": "Cellular Automata and Lattice Gases", + "nlin.PS": "Pattern Formation and Solitons", + "nlin.SI": "Exactly Solvable and Integrable Systems", + "nucl-ex": "Nuclear Experiment", + "nucl-th": "Nuclear Theory", + "patt-sol": "Pattern Formation and Solitons", + "physics.acc-ph": "Accelerator Physics", + "physics.ao-ph": "Atmospheric and Oceanic Physics", + "physics.app-ph": "Applied Physics", + "physics.atm-clus": "Atomic and Molecular Clusters", + "physics.atom-ph": "Atomic Physics", + "physics.bio-ph": "Biological Physics", + "physics.chem-ph": "Chemical Physics", + "physics.class-ph": "Classical Physics", + "physics.comp-ph": "Computational Physics", + "physics.data-an": "Data Analysis, Statistics and Probability", + "physics.ed-ph": "Physics Education", + "physics.flu-dyn": "Fluid Dynamics", + "physics.gen-ph": "General Physics", + "physics.geo-ph": "Geophysics", + "physics.hist-ph": "History and Philosophy of Physics", + "physics.ins-det": "Instrumentation and Detectors", + "physics.med-ph": "Medical Physics", + "physics.optics": "Optics", + "physics.plasm-ph": "Plasma Physics", + "physics.pop-ph": "Popular Physics", + "physics.soc-ph": "Physics and Society", + "physics.space-ph": "Space Physics", + "plasm-ph": "Plasma Physics", + "q-alg": "Quantum Algebra and Topology", + "q-bio": "Quantitative Biology", + "q-bio.BM": "Biomolecules", + "q-bio.CB": "Cell Behavior", + "q-bio.GN": "Genomics", + "q-bio.MN": "Molecular Networks", + "q-bio.NC": "Neurons and Cognition", + "q-bio.OT": "Other Quantitative Biology", + "q-bio.PE": "Populations and Evolution", + "q-bio.QM": "Quantitative Methods", + "q-bio.SC": "Subcellular Processes", + "q-bio.TO": "Tissues and Organs", + "q-fin.CP": "Computational Finance", + "q-fin.EC": "Economics", + "q-fin.GN": "General Finance", + "q-fin.MF": "Mathematical Finance", + "q-fin.PM": "Portfolio Management", + "q-fin.PR": "Pricing of Securities", + "q-fin.RM": "Risk Management", + "q-fin.ST": "Statistical Finance", + "q-fin.TR": "Trading and Market Microstructure", + "quant-ph": "Quantum Physics", + "solv-int": "Exactly Solvable and Integrable Systems", + "stat.AP": "Applications", + "stat.CO": "Computation", + "stat.ME": "Methodology", + "stat.ML": "Machine Learning", + "stat.OT": "Other Statistics", + "stat.TH": "Statistics Theory", + "supr-con": "Superconductivity", + test: "Test", + "test.dis-nn": "Test Disruptive Networks", + "test.mes-hall": "Test Hall", + "test.mtrl-sci": "Test Mtrl-Sci", + "test.soft": "Test Soft", + "test.stat-mech": "Test Mechanics", + "test.str-el": "Test Electrons", + "test.supr-con": "Test Superconductivity", + "bad-arch.bad-cat": "Invalid Category" +}; var version; var arxivDOI; // these variables will be set in doWeb and // can be used then afterwards in the parseXML +function detectSearch(item) { + return !!item.arXiv; +} + +async function doSearch(item) { + let url = `https://export.arxiv.org/api/query?id_list=${encodeURIComponent(item.arXiv)}&max_results=1`; + let doc = await requestDocument(url); + parseAtom(doc); +} function detectWeb(doc, url) { - var searchRe = /^https?:\/\/(?:([^.]+\.))?(?:arxiv\.org|xxx\.lanl\.gov)\/(?:find|list|catchup)/; - var relatedDOI = text(doc, '.doi>a'); + var searchRe = /^https?:\/\/(?:([^.]+\.))?(?:arxiv\.org|xxx\.lanl\.gov)\/(?:search|find|list|catchup)\b/; + var relatedDOI = text(doc, '.doi > a'); if (searchRe.test(url)) { - return "multiple"; + return getSearchResults(doc, true/* checkOnly */) && "multiple"; } else if (relatedDOI) { return "journalArticle"; } - else if (ZU.fieldIsValidForType('title', 'preprint')) { + else { return "preprint"; } +} + +function getSearchResults(doc, checkOnly = false) { + if (doc.location.pathname.startsWith('/search/')) { + return getSearchResultsNew(doc, checkOnly); + } else { - return "report"; + return getSearchResultsLegacy(doc, checkOnly); } } -function doWeb(doc, url) { +// New search results at https://arxiv.org/search/[advanced] +function getSearchResultsNew(doc, checkOnly = false) { + let items = {}; + let found = false; + let rows = doc.querySelectorAll(".arxiv-result"); + for (let row of rows) { + let id = text(row, ".list-title a").trim().replace(/^arXiv:/, ""); + let title = ZU.trimInternal(text(row, "p.title")); + if (!id || !title) continue; + if (checkOnly) return true; + found = true; + items[id] = title; + } + return found && items; +} + +// Listings, catchup, and legacy search results (at https://arxiv.org/find/) +function getSearchResultsLegacy(doc, checkOnly = false) { + let items = {}; + let found = false; + let root = doc.querySelector("#dlpage"); + if (!root) return false; + // Alternating rows of
and
elements + // NOTE: For listing and legacy search, there's one
per page and the + //
/
elements are direct children. For catchup, there is a
for + // each item with a pair of
/
children. + let dts = root.querySelectorAll("dl > dt"); + let dds = root.querySelectorAll("dl > dd"); + if (dts.length !== dds.length) { + Z.debug(`Warning: unexpected number of
and
elements: ${dts.length} !== ${dds.length}`); + } + let length = Math.min(dts.length, dds.length); + for (let i = 0; i < length; i++) { + let id = text(dts[i], "a[title='Abstract']") + .trim() + .replace(/^arXiv:/, ""); + let title = ZU.trimInternal(text(dds[i], ".list-title")) + .replace(/^Title:\s*/, ""); + if (!id || !title) continue; + if (checkOnly) return true; + found = true; + items[id] = title; + } + return found && items; +} + +async function doWeb(doc, url) { if (detectWeb(doc, url) == 'multiple') { - var rows = ZU.xpath(doc, '//div[@id="dlpage"]/dl/dt'); - var getTitleId; - if (rows.length) { - // arXiv.org format - getTitleId = function (row) { - var id = ZU.xpathText(row, './/a[@title="Abstract"]').trim().substr(6); // Trim off arXiv: - var title = ZU.trimInternal( - ZU.xpathText(row, './following-sibling::dd[1]//div[contains(@class, "list-title")]/text()[last()]')); - return { - title: title, - id: id - }; - }; - } - else if ((rows = ZU.xpath(doc, '//table/tbody/tr[./td[@class="lti"]]')).length) { - // eprintweb.org format - getTitleId = function (row) { - var title = ZU.trimInternal(ZU.xpathText(row, './td')); - var id = ZU.xpathText(row, './following-sibling::tr[.//a][1]/td/b').trim().substr(6); - return { - title: title, - id: id - }; - }; - } - else { - throw new Error("Unrecognized multiples format"); - } + var items = getSearchResults(doc); - var items = {}; - for (let i = 0; i < rows.length; i++) { - var row = getTitleId(rows[i]); - items[row.id] = row.title; + let selectedItems = await Z.selectItems(items); + if (selectedItems) { + let apiURL = `https://export.arxiv.org/api/query?id_list=${encodeURIComponent(Object.keys(selectedItems).join(','))}`; + let document = await requestDocument(apiURL); + parseAtom(document); } - - Z.selectItems(items, function (items) { - if (!items) return; - - var urls = []; - for (var id in items) { - urls.push('https://export.arxiv.org/oai2' - + '?verb=GetRecord&metadataPrefix=oai_dc' - + '&identifier=oai%3AarXiv.org%3A' + encodeURIComponent(id) - ); - } - - ZU.doGet(urls, parseXML); - }); } else { - var id; - var versionMatch = url.match(/v(\d+)(\.pdf)?([?#].+)?$/); + let id = url.match(/(?:pdf|abs)\/(.+)(?:\.pdf)?/)[1]; + let versionMatch = url.match(/v(\d+)(\.pdf)?([?#].+)?$/); if (versionMatch) { version = versionMatch[1]; } - arxivDOI = text(doc, '.arxivdoi>a'); - var p = url.indexOf("/pdf/"); - if (p > -1) { - id = url.substring(p + 5, url.length - 4); - } - else { - id = ZU.xpathText(doc, '(//span[@class="arxivid"]/a)[1]') - || ZU.xpathText(doc, '//b[starts-with(normalize-space(text()),"arXiv:")]'); + arxivDOI = text(doc, '.arxivdoi > a'); + + if (!id) { // Honestly not sure where this might still be needed + id = text(doc, 'span.arxivid > a'); } + if (!id) throw new Error('Could not find arXiv ID on page.'); - id = id.trim().replace(/^arxiv:\s*|v\d+|\s+.*$/ig, ''); - var apiurl = 'https://export.arxiv.org/oai2?verb=GetRecord&metadataPrefix=oai_dc' - + '&identifier=oai%3AarXiv.org%3A' + encodeURIComponent(id); - ZU.doGet(apiurl, parseXML); + // Do not trim version + //id = id.trim().replace(/^arxiv:\s*|v\d+|\s+.*$/ig, ''); + id = id.trim().replace(/^arxiv:\s*|\s+.*$/ig, ''); + let apiURL = `https://export.arxiv.org/api/query?id_list=${encodeURIComponent(id)}&max_results=1`; + await requestDocument(apiURL).then(parseAtom); } } +function parseAtom(doc) { + let entries = doc.querySelectorAll("feed > entry"); + entries.forEach(parseSingleEntry); +} -function parseXML(text) { - // Z.debug(text); - /* eslint camelcase: ["error", { allow: ["oai_dc"] }] */ - var ns = { - oai_dc: 'http://www.openarchives.org/OAI/2.0/oai_dc/', - dc: 'http://purl.org/dc/elements/1.1/', - xsi: 'http://www.w3.org/2001/XMLSchema-instance', - n: 'http://www.openarchives.org/OAI/2.0/' // Default - }; - var hasPreprint; - if (ZU.fieldIsValidForType('title', 'preprint')) { - hasPreprint = true; - } - var newItem; - if (hasPreprint) { - newItem = new Zotero.Item("preprint"); - } - else { - newItem = new Zotero.Item("report"); - } - var xml = (new DOMParser()).parseFromString(text, "text/xml"); - var dcMeta = ZU.xpath(xml, '//n:GetRecord/n:record/n:metadata/oai_dc:dc', ns)[0]; - - newItem.title = getXPathNodeTrimmed(dcMeta, "dc:title", ns); - getCreatorNodes(dcMeta, "dc:creator", newItem, "author", ns); - var dates = ZU.xpath(dcMeta, './dc:date', ns) - .map(element => element.textContent) - .sort(); - if (dates.length > 0) { - if (version && version < dates.length) { - newItem.date = dates[version - 1]; - } - else { - // take the latest date - newItem.date = dates[dates.length - 1]; - } - } - - - var descriptions = ZU.xpath(dcMeta, "./dc:description", ns); - - // Put the first description into abstract, all other into notes. - if (descriptions.length > 0) { - newItem.abstractNote = ZU.trimInternal(descriptions[0].textContent); - for (let j = 1; j < descriptions.length; j++) { - var noteStr = ZU.trimInternal(descriptions[j].textContent); - newItem.notes.push({ note: noteStr }); - } - } - var subjects = ZU.xpath(dcMeta, "./dc:subject", ns); - for (let j = 0; j < subjects.length; j++) { - var subject = ZU.trimInternal(subjects[j].textContent); - newItem.tags.push(subject); +function parseSingleEntry(entry) { + let newItem = new Zotero.Item("preprint"); + + newItem.title = ZU.trimInternal(text(entry, "title")); + newItem.date = ZU.strToISO(text(entry, "updated")); + entry.querySelectorAll(`author > name`).forEach(node => newItem.creators.push(ZU.cleanAuthor(node.textContent, 'author', false))); + + newItem.abstractNote = ZU.trimInternal(text(entry, "summary")); + + let comments = entry.querySelectorAll("comment"); + + for (let comment of comments) { + let noteStr = ZU.trimInternal(comment.textContent); + newItem.notes.push({ note: `Comment: ${noteStr}` }); } - - var identifiers = ZU.xpath(dcMeta, "./dc:identifier", ns); - for (let j = 0; j < identifiers.length; j++) { - var identifier = ZU.trimInternal(identifiers[j].textContent); - if (identifier.substr(0, 4) == "doi:") { - newItem.DOI = identifier.substr(4); - } - else if (identifier.substr(0, 7) == "http://") { - newItem.url = identifier; - } + + let categories = Array.from(entry.querySelectorAll("category")) + .map(el => el.getAttribute("term")) + .map((sub) => { + let mainCat = sub.split('.')[0]; + if (mainCat !== sub && arXivCategories[mainCat]) { + return arXivCategories[mainCat] + " - " + arXivCategories[sub]; + } + else { + return arXivCategories[sub]; + } + }) + .filter(Boolean); + newItem.tags.push(...categories); + + let arxivURL = text(entry, "id").replace(/v\d+/, ''); + let doi = text(entry, "doi"); + if (doi) { + newItem.DOI = doi; } + newItem.url = arxivURL; + + let articleID = arxivURL.replace(/https?:\/\/arxiv.org\/abs\//, ''); // Trim off http://arxiv.org/abs/ + + let articleField = attr(entry, "primary_category", "term").replace(/^.+?:/, "").replace(/\..+?$/, ""); + if (articleField) articleField = "[" + articleField + "]"; - var articleID = ZU.xpath(xml, "//n:GetRecord/n:record/n:header/n:identifier", ns)[0]; - if (articleID) articleID = ZU.trimInternal(articleID.textContent).substr(14); // Trim off oai:arXiv.org: - - var articleField = ZU.xpathText(xml, '//n:GetRecord/n:record/n:header/n:setSpec', ns); - if (articleField) articleField = "[" + articleField.replace(/^.+?:/, "") + "]"; - if (articleID && articleID.includes("/")) { newItem.extra = "arXiv:" + articleID; } else { newItem.extra = "arXiv:" + articleID + " " + articleField; } - - var pdfUrl = "https://arxiv.org/pdf/" + articleID + (version ? "v" + version : "") + ".pdf"; + let pdfURL = attr(entry, "link[title='pdf']", "href"); + newItem.attachments.push({ - title: "arXiv Fulltext PDF", - url: pdfUrl, + title: "Preprint PDF", + url: pdfURL, mimeType: "application/pdf" }); newItem.attachments.push({ - title: "arXiv.org Snapshot", + title: "Snapshot", url: newItem.url, mimeType: "text/html" }); - + // retrieve and supplement publication data for published articles via DOI if (newItem.DOI) { var translate = Zotero.loadTranslator("search"); // CrossRef translate.setTranslator("b28d0d42-8549-4c6d-83fc-8382874a5cb9"); - + var item = { itemType: "journalArticle", DOI: newItem.DOI }; translate.setSearch(item); translate.setHandler("itemDone", function (obj, item) { - // Z.debug(item) newItem.itemType = item.itemType; newItem.volume = item.volume; newItem.issue = item.issue; @@ -261,7 +440,7 @@ function parseXML(text) { translate.setHandler("done", function () { newItem.complete(); }); - translate.setHandler("error", function () {}); + translate.setHandler("error", function () { }); translate.translate(); } else { @@ -271,32 +450,12 @@ function parseXML(text) { newItem.extra += '\nversion: ' + version; } if (arxivDOI) newItem.DOI = ZU.cleanDOI(arxivDOI); - // only for Zotero versions without preprint - if (!hasPreprint) { - newItem.extra += '\ntype: article'; - } - else newItem.archiveID = "arXiv:" + articleID; + newItem.archiveID = "arXiv:" + articleID; newItem.complete(); } } - -function getXPathNodeTrimmed(dcMeta, name, ns) { - var node = ZU.xpath(dcMeta, './' + name, ns); - if (node.length) { - return ZU.trimInternal(node[0].textContent); - } - return ''; -} - -function getCreatorNodes(dcMeta, name, newItem, creatorType, ns) { - var nodes = ZU.xpath(dcMeta, './' + name, ns); - for (var i = 0; i < nodes.length; i++) { - newItem.creators.push( - ZU.cleanAuthor(nodes[i].textContent, creatorType, true) - ); - } -}/** BEGIN TEST CASES **/ +/** BEGIN TEST CASES **/ var testCases = [ { "type": "web", @@ -345,11 +504,11 @@ var testCases = [ "volume": "419", "attachments": [ { - "title": "arXiv Fulltext PDF", + "title": "Preprint PDF", "mimeType": "application/pdf" }, { - "title": "arXiv.org Snapshot", + "title": "Snapshot", "mimeType": "text/html" } ], @@ -376,7 +535,7 @@ var testCases = [ "items": [ { "itemType": "journalArticle", - "title": "Properties of the $\\delta$ Scorpii Circumstellar Disk from Continuum Modeling", + "title": "Properties of the $δ$ Scorpii Circumstellar Disk from Continuum Modeling", "creators": [ { "firstName": "A. C.", @@ -448,11 +607,11 @@ var testCases = [ "volume": "652", "attachments": [ { - "title": "arXiv Fulltext PDF", + "title": "Preprint PDF", "mimeType": "application/pdf" }, { - "title": "arXiv.org Snapshot", + "title": "Snapshot", "mimeType": "text/html" } ], @@ -508,11 +667,11 @@ var testCases = [ "volume": "125", "attachments": [ { - "title": "arXiv Fulltext PDF", + "title": "Preprint PDF", "mimeType": "application/pdf" }, { - "title": "arXiv.org Snapshot", + "title": "Snapshot", "mimeType": "text/html" } ], @@ -540,10 +699,10 @@ var testCases = [ }, { "type": "web", - "url": "https://arxiv.org/pdf/1402.1516.pdf", + "url": "https://arxiv.org/pdf/1402.1516", "items": [ { - "itemType": "journalArticle", + "itemType": "preprint", "title": "A dual pair for free boundary fluids", "creators": [ { @@ -559,23 +718,31 @@ var testCases = [ ], "date": "2014-02-06", "abstractNote": "We construct a dual pair associated to the Hamiltonian geometric formulation of perfect fluids with free boundaries. This dual pair is defined on the cotangent bundle of the space of volume preserving embeddings of a manifold with boundary into a boundaryless manifold of the same dimension. The dual pair properties are rigorously verified in the infinite dimensional Fr\\'echet manifold setting. It provides an example of a dual pair associated to actions that are not completely mutually orthogonal.", - "extra": "arXiv: 1402.1516", + "archiveID": "arXiv:1402.1516", + "extra": "arXiv:1402.1516 [math]", "libraryCatalog": "arXiv.org", - "publicationTitle": "arXiv:1402.1516 [math-ph]", + "repository": "arXiv", "url": "http://arxiv.org/abs/1402.1516", "attachments": [ { - "title": "arXiv:1402.1516 PDF", + "title": "Preprint PDF", "mimeType": "application/pdf" }, { - "title": "arXiv.org Snapshot", + "title": "Snapshot", "mimeType": "text/html" } ], "tags": [ - "Mathematical Physics", - "Mathematics - Symplectic Geometry" + { + "tag": "Mathematical Physics" + }, + { + "tag": "Mathematics - Mathematical Physics" + }, + { + "tag": "Mathematics - Symplectic Geometry" + } ], "notes": [ { @@ -615,8 +782,9 @@ var testCases = [ "creatorType": "author" } ], - "date": "2018-10-10", - "abstractNote": "We introduce a new language representation model called BERT, which stands for Bidirectional Encoder Representations from Transformers. Unlike recent language representation models, BERT is designed to pre-train deep bidirectional representations from unlabeled text by jointly conditioning on both left and right context in all layers. As a result, the pre-trained BERT model can be fine-tuned with just one additional output layer to create state-of-the-art models for a wide range of tasks, such as question answering and language inference, without substantial task-specific architecture modifications. BERT is conceptually simple and empirically powerful. It obtains new state-of-the-art results on eleven natural language processing tasks, including pushing the GLUE score to 80.5% (7.7% point absolute improvement), MultiNLI accuracy to 86.7% (4.6% absolute improvement), SQuAD v1.1 question answering Test F1 to 93.2 (1.5 point absolute improvement) and SQuAD v2.0 Test F1 to 83.1 (5.1 point absolute improvement).", + "date": "2018-10-11", + "DOI": "10.48550/arXiv.1810.04805", + "abstractNote": "We introduce a new language representation model called BERT, which stands for Bidirectional Encoder Representations from Transformers. Unlike recent language representation models, BERT is designed to pre-train deep bidirectional representations by jointly conditioning on both left and right context in all layers. As a result, the pre-trained BERT representations can be fine-tuned with just one additional output layer to create state-of-the-art models for a wide range of tasks, such as question answering and language inference, without substantial task-specific architecture modifications. BERT is conceptually simple and empirically powerful. It obtains new state-of-the-art results on eleven natural language processing tasks, including pushing the GLUE benchmark to 80.4% (7.6% absolute improvement), MultiNLI accuracy to 86.7 (5.6% absolute improvement) and the SQuAD v1.1 question answering Test F1 to 93.2 (1.5% absolute improvement), outperforming human performance by 2.0%.", "archiveID": "arXiv:1810.04805", "extra": "arXiv:1810.04805 [cs]\nversion: 1", "libraryCatalog": "arXiv.org", @@ -625,11 +793,11 @@ var testCases = [ "url": "http://arxiv.org/abs/1810.04805", "attachments": [ { - "title": "arXiv Fulltext PDF", + "title": "Preprint PDF", "mimeType": "application/pdf" }, { - "title": "arXiv.org Snapshot", + "title": "Snapshot", "mimeType": "text/html" } ], @@ -638,7 +806,11 @@ var testCases = [ "tag": "Computer Science - Computation and Language" } ], - "notes": [], + "notes": [ + { + "note": "Comment: 13 pages" + } + ], "seeAlso": [] } ] @@ -673,6 +845,7 @@ var testCases = [ } ], "date": "2019-05-24", + "DOI": "10.48550/arXiv.1810.04805", "abstractNote": "We introduce a new language representation model called BERT, which stands for Bidirectional Encoder Representations from Transformers. Unlike recent language representation models, BERT is designed to pre-train deep bidirectional representations from unlabeled text by jointly conditioning on both left and right context in all layers. As a result, the pre-trained BERT model can be fine-tuned with just one additional output layer to create state-of-the-art models for a wide range of tasks, such as question answering and language inference, without substantial task-specific architecture modifications. BERT is conceptually simple and empirically powerful. It obtains new state-of-the-art results on eleven natural language processing tasks, including pushing the GLUE score to 80.5% (7.7% point absolute improvement), MultiNLI accuracy to 86.7% (4.6% absolute improvement), SQuAD v1.1 question answering Test F1 to 93.2 (1.5 point absolute improvement) and SQuAD v2.0 Test F1 to 83.1 (5.1 point absolute improvement).", "archiveID": "arXiv:1810.04805", "extra": "arXiv:1810.04805 [cs]\nversion: 2", @@ -682,11 +855,11 @@ var testCases = [ "url": "http://arxiv.org/abs/1810.04805", "attachments": [ { - "title": "arXiv Fulltext PDF", + "title": "Preprint PDF", "mimeType": "application/pdf" }, { - "title": "arXiv.org Snapshot", + "title": "Snapshot", "mimeType": "text/html" } ], @@ -744,21 +917,21 @@ var testCases = [ "creatorType": "author" } ], - "date": "2022-01-07", + "date": "2023-02-07", "DOI": "10.48550/arXiv.2201.00738", "abstractNote": "Dark matter is five times more abundant than ordinary visible matter in our Universe. While laboratory searches hunting for dark matter have traditionally focused on the electroweak scale, theories of low mass hidden sectors motivate new detection techniques. Extending these searches to lower mass ranges, well below 1 GeV/c$^2$, poses new challenges as rare interactions with standard model matter transfer progressively less energy to electrons and nuclei in detectors. Here, we propose an approach based on phonon-assisted quantum evaporation combined with quantum sensors for detection of desorption events via tracking of spin coherence. The intent of our proposed dark matter sensors is to extend the parameter space to energy transfers in rare interactions to as low as a few meV for detection of dark matter particles in the keV/c$^2$ mass range.", "archiveID": "arXiv:2201.00738", - "extra": "arXiv:2201.00738 [cond-mat, physics:hep-ex, physics:quant-ph]", + "extra": "arXiv:2201.00738 [hep-ex]", "libraryCatalog": "arXiv.org", "repository": "arXiv", "url": "http://arxiv.org/abs/2201.00738", "attachments": [ { - "title": "arXiv Fulltext PDF", + "title": "Preprint PDF", "mimeType": "application/pdf" }, { - "title": "arXiv.org Snapshot", + "title": "Snapshot", "mimeType": "text/html" } ], @@ -775,7 +948,66 @@ var testCases = [ ], "notes": [ { - "note": "Comment: 7 pages, 4 figures. Fixed typos in address" + "note": "Comment: 8 pages, 3 figures. Updated various parts" + } + ], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://arxiv.org/search/advanced?advanced=&terms-0-operator=AND&terms-0-term=%22desire+production%22&terms-0-field=all&classification-physics_archives=all&classification-include_cross_list=exclude&date-year=&date-filter_by=date_range&date-from_date=2005-01-01&date-to_date=2008-12-31&date-date_type=submitted_date&abstracts=show&size=50&order=-announced_date_first", + "defer": true, + "items": "multiple" + }, + { + "type": "web", + "url": "https://arxiv.org/search/?query=australopithecus&searchtype=title&abstracts=show&order=-announced_date_first&size=25", + "defer": true, + "items": "multiple" + }, + { + "type": "search", + "input": { + "arXiv": "math/0211159" + }, + "items": [ + { + "itemType": "preprint", + "title": "The entropy formula for the Ricci flow and its geometric applications", + "creators": [ + { + "firstName": "Grisha", + "lastName": "Perelman", + "creatorType": "author" + } + ], + "date": "2002-11-11", + "abstractNote": "We present a monotonic expression for the Ricci flow, valid in all dimensions and without curvature assumptions. It is interpreted as an entropy for a certain canonical ensemble. Several geometric applications are given. In particular, (1) Ricci flow, considered on the space of riemannian metrics modulo diffeomorphism and scaling, has no nontrivial periodic orbits (that is, other than fixed points); (2) In a region, where singularity is forming in finite time, the injectivity radius is controlled by the curvature; (3) Ricci flow can not quickly turn an almost euclidean region into a very curved one, no matter what happens far away. We also verify several assertions related to Richard Hamilton's program for the proof of Thurston geometrization conjecture for closed three-manifolds, and give a sketch of an eclectic proof of this conjecture, making use of earlier results on collapsing with local lower curvature bound.", + "archiveID": "arXiv:math/0211159", + "extra": "arXiv:math/0211159", + "libraryCatalog": "arXiv.org", + "repository": "arXiv", + "url": "http://arxiv.org/abs/math/0211159", + "attachments": [ + { + "title": "Preprint PDF", + "mimeType": "application/pdf" + }, + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "Mathematics - Differential Geometry" + } + ], + "notes": [ + { + "note": "Comment: 39 pages" } ], "seeAlso": [] From 115162d2eb64398844cc7802c0c9474ea6604f0a Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 9 Oct 2024 10:21:02 -0400 Subject: [PATCH 126/158] K10plus ISBN: Remove 'pica.mat' filter Seems to be excluding valid results. https://forums.zotero.org/discussion/comment/467454/#Comment_467454 --- K10plus ISBN.js | 51 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/K10plus ISBN.js b/K10plus ISBN.js index c738c3f05fb..044dfafa8e4 100644 --- a/K10plus ISBN.js +++ b/K10plus ISBN.js @@ -8,7 +8,7 @@ "priority": 99, "inRepository": true, "translatorType": 8, - "lastUpdated": "2023-04-17 10:53:59" + "lastUpdated": "2024-10-09 14:20:54" } /* @@ -46,7 +46,7 @@ function doSearch(item) { let url; if (item.ISBN) { var queryISBN = ZU.cleanISBN(item.ISBN); - url = "https://sru.k10plus.de/opac-de-627?version=1.1&operation=searchRetrieve&query=pica.isb=" + queryISBN + " AND pica.mat%3DB&maximumRecords=1"; + url = "https://sru.k10plus.de/opac-de-627?version=1.1&operation=searchRetrieve&query=pica.isb=" + queryISBN + "&maximumRecords=1"; } else if (item.query) { url = "https://sru.k10plus.de/opac-de-627?version=1.1&operation=searchRetrieve&query=" + encodeURIComponent(item.query) + "&maximumRecords=50"; @@ -334,6 +334,53 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "search", + "input": { + "ISBN": "9780231545853" + }, + "items": [ + { + "itemType": "book", + "title": "Design Thinking for the Greater Good: Innovation in the Social Sector", + "creators": [ + { + "firstName": "Jeanne", + "lastName": "Liedtka", + "creatorType": "author" + }, + { + "firstName": "Daisy", + "lastName": "Azer", + "creatorType": "author" + }, + { + "firstName": "Randy", + "lastName": "Salzman", + "creatorType": "author" + } + ], + "date": "2018", + "ISBN": "9780231545853", + "abstractNote": "Facing especially wicked problems, social sector organizations are searching for powerful new methods to understand and address them. Design Thinking for the Greater Good goes in depth on both the how of using new tools and the why. As a way to reframe problems, ideate solutions, and iterate toward better answers, design thinking is already well established in the commercial world. Through ten stories of struggles and successes in fields such as health care, education, agriculture, transportation, social services, and security, the authors show how collaborative creativity can shake up even the most entrenched bureaucracies—and provide a practical roadmap for readers to implement these tools.The design thinkers Jeanne Liedtka, Randy Salzman, and Daisy Azer explore how major agencies like the Department of Health and Human Services and the Transportation and Security Administration in the United States, as well as organizations in Canada, Australia, and the United Kingdom, have instituted principles of design thinking. In each case, these groups have used the tools of design thinking to reduce risk, manage change, use resources more effectively, bridge the communication gap between parties, and manage the competing demands of diverse stakeholders. Along the way, they have improved the quality of their products and enhanced the experiences of those they serve. These strategies are accessible to analytical and creative types alike, and their benefits extend throughout an organization. This book will help today's leaders and thinkers implement these practices in their own pursuit of creative solutions that are both innovative and achievable", + "language": "eng", + "libraryCatalog": "K10plus ISBN", + "numPages": "1", + "place": "New York Chichester", + "publisher": "Columbia University Press", + "series": "Columbia Business School Publishing", + "shortTitle": "Design Thinking for the Greater Good", + "attachments": [], + "tags": [], + "notes": [ + { + "note": "Frontmatter -- -- CONTENTS -- -- Acknowledgments -- -- Part I. Why Design Thinking? -- -- 1. Catalyzing a Conversation for Change -- -- 2. How Do We Get There from Here? A Tale of Two Managers -- -- Part II. The Stories -- -- 3. Igniting Creative Confidence at US Health and Human Services -- -- 4. Including New Voices at the Kingwood Trust -- -- 5. Scaling Design Thinking at Monash Medical Centre -- -- 6. Turning Debate into Dialogue at the US Food and Drug Administration -- -- 7. Fostering Community Conversations in Iveragh, Ireland -- -- 8. Connecting—and Disconnecting—the Pieces at United Cerebral Palsy -- -- 9. The Power of Local at the Community Transportation Association of America -- -- 10. Bridging Technology and the Human Experience at the Transportation Security Administration -- -- 11. Making Innovation Safe at MasAgro -- -- 12. Integrating Design and Strategy at Children’s Health System of Texas -- -- Part III. Moving into Action: Bringing Design Thinking to Your Organization -- -- 13. The Four-Question Methodology in Action: Laying the Foundation -- -- 14. The Four-Question Methodology in Action: Ideas to Experiments -- -- 15. Building Organizational Capabilities -- -- Notes -- -- Index" + } + ], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 017fdf0f44b59cfe329622dbc48276976d7e288c Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 9 Oct 2024 10:34:56 -0400 Subject: [PATCH 127/158] Delete arXiv Vanity --- arXiv Vanity.js | 235 ------------------------------------------------ deleted.txt | 1 + 2 files changed, 1 insertion(+), 235 deletions(-) delete mode 100644 arXiv Vanity.js diff --git a/arXiv Vanity.js b/arXiv Vanity.js deleted file mode 100644 index 0c0c5272063..00000000000 --- a/arXiv Vanity.js +++ /dev/null @@ -1,235 +0,0 @@ -{ - "translatorID": "3aedd2ab-113b-4bb0-8c74-ccb47b3b9deb", - "label": "arXiv Vanity", - "creator": "Abe Jellinek", - "target": "^https?://www\\.arxiv-vanity\\.com/papers/", - "minVersion": "3.0", - "maxVersion": "", - "priority": 100, - "inRepository": true, - "translatorType": 4, - "browserSupport": "gcsibv", - "lastUpdated": "2021-08-17 23:58:17" -} - -/* - ***** BEGIN LICENSE BLOCK ***** - - Copyright © 2021 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 detectWeb(doc, _url) { - if (doc.querySelector('nav a.btn[href*="arxiv.org"]')) { - return "journalArticle"; - } - else if (getSearchResults(doc, true)) { - return "multiple"; - } - return false; -} - -function getSearchResults(doc, checkOnly) { - var items = {}; - var found = false; - var rows = doc.querySelectorAll('.paper-list-item h3 > a'); - for (let row of rows) { - let href = row.href; - let title = ZU.trimInternal(row.textContent); - if (!href || !title) continue; - if (checkOnly) return true; - found = true; - items[href] = title; - } - return found ? items : false; -} - -function doWeb(doc, url) { - if (detectWeb(doc, url) == "multiple") { - Zotero.selectItems(getSearchResults(doc, false), function (items) { - if (items) ZU.processDocuments(Object.keys(items), scrape); - }); - } - else { - scrape(doc, url); - } -} - -function scrape(doc, _url) { - let arxivURL = attr(doc, 'nav a.btn[href*="arxiv.org"]', 'href'); - ZU.processDocuments(arxivURL, function (arxivDoc) { - var translator = Zotero.loadTranslator('web'); - // arXiv - translator.setTranslator('ecddda2e-4fc6-4aea-9f17-ef3b56d7377a'); - translator.setDocument(arxivDoc); - - translator.setHandler('itemDone', function (obj, item) { - item.libraryCatalog = 'arXiv'; - item.complete(); - }); - - translator.getTranslatorObject(function (trans) { - trans.doWeb(arxivDoc, arxivURL); - }); - }); -} - -/** BEGIN TEST CASES **/ -var testCases = [ - { - "type": "web", - "url": "https://www.arxiv-vanity.com/papers/1708.05866/", - "items": [ - { - "itemType": "journalArticle", - "title": "A Brief Survey of Deep Reinforcement Learning", - "creators": [ - { - "firstName": "Kai", - "lastName": "Arulkumaran", - "creatorType": "author" - }, - { - "firstName": "Marc Peter", - "lastName": "Deisenroth", - "creatorType": "author" - }, - { - "firstName": "Miles", - "lastName": "Brundage", - "creatorType": "author" - }, - { - "firstName": "Anil Anthony", - "lastName": "Bharath", - "creatorType": "author" - } - ], - "date": "11/2017", - "DOI": "10.1109/MSP.2017.2743240", - "ISSN": "1053-5888", - "abstractNote": "Deep reinforcement learning is poised to revolutionise the field of AI and represents a step towards building autonomous systems with a higher level understanding of the visual world. Currently, deep learning is enabling reinforcement learning to scale to problems that were previously intractable, such as learning to play video games directly from pixels. Deep reinforcement learning algorithms are also applied to robotics, allowing control policies for robots to be learned directly from camera inputs in the real world. In this survey, we begin with an introduction to the general field of reinforcement learning, then progress to the main streams of value-based and policy-based methods. Our survey will cover central algorithms in deep reinforcement learning, including the deep $Q$-network, trust region policy optimisation, and asynchronous advantage actor-critic. In parallel, we highlight the unique advantages of deep neural networks, focusing on visual understanding via reinforcement learning. To conclude, we describe several current areas of research within the field.", - "extra": "arXiv: 1708.05866", - "issue": "6", - "journalAbbreviation": "IEEE Signal Process. Mag.", - "libraryCatalog": "arXiv", - "pages": "26-38", - "publicationTitle": "IEEE Signal Processing Magazine", - "url": "http://arxiv.org/abs/1708.05866", - "volume": "34", - "attachments": [ - { - "title": "arXiv Fulltext PDF", - "mimeType": "application/pdf" - }, - { - "title": "arXiv.org Snapshot", - "mimeType": "text/html" - } - ], - "tags": [ - { - "tag": "Computer Science - Artificial Intelligence" - }, - { - "tag": "Computer Science - Computer Vision and Pattern Recognition" - }, - { - "tag": "Computer Science - Machine Learning" - }, - { - "tag": "Statistics - Machine Learning" - } - ], - "notes": [ - { - "note": "Comment: IEEE Signal Processing Magazine, Special Issue on Deep Learning for Image Understanding (arXiv extended version)" - } - ], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.arxiv-vanity.com/papers/2108.06338/", - "items": [ - { - "itemType": "journalArticle", - "title": "Graph2MDA: a multi-modal variational graph embedding model for predicting microbe-drug associations", - "creators": [ - { - "firstName": "Lei", - "lastName": "Deng", - "creatorType": "author" - }, - { - "firstName": "Yibiao", - "lastName": "Huang", - "creatorType": "author" - }, - { - "firstName": "Xuejun", - "lastName": "Liu", - "creatorType": "author" - }, - { - "firstName": "Hui", - "lastName": "Liu", - "creatorType": "author" - } - ], - "date": "2021-08-14", - "abstractNote": "Accumulated clinical studies show that microbes living in humans interact closely with human hosts, and get involved in modulating drug efficacy and drug toxicity. Microbes have become novel targets for the development of antibacterial agents. Therefore, screening of microbe-drug associations can benefit greatly drug research and development. With the increase of microbial genomic and pharmacological datasets, we are greatly motivated to develop an effective computational method to identify new microbe-drug associations. In this paper, we proposed a novel method, Graph2MDA, to predict microbe-drug associations by using variational graph autoencoder (VGAE). We constructed multi-modal attributed graphs based on multiple features of microbes and drugs, such as molecular structures, microbe genetic sequences, and function annotations. Taking as input the multi-modal attribute graphs, VGAE was trained to learn the informative and interpretable latent representations of each node and the whole graph, and then a deep neural network classifier was used to predict microbe-drug associations. The hyperparameter analysis and model ablation studies showed the sensitivity and robustness of our model. We evaluated our method on three independent datasets and the experimental results showed that our proposed method outperformed six existing state-of-the-art methods. We also explored the meaningness of the learned latent representations of drugs and found that the drugs show obvious clustering patterns that are significantly consistent with drug ATC classification. Moreover, we conducted case studies on two microbes and two drugs and found 75\\%-95\\% predicted associations have been reported in PubMed literature. Our extensive performance evaluations validated the effectiveness of our proposed method.\\", - "extra": "arXiv: 2108.06338", - "libraryCatalog": "arXiv", - "publicationTitle": "arXiv:2108.06338 [cs, q-bio]", - "shortTitle": "Graph2MDA", - "url": "http://arxiv.org/abs/2108.06338", - "attachments": [ - { - "title": "arXiv Fulltext PDF", - "mimeType": "application/pdf" - }, - { - "title": "arXiv.org Snapshot", - "mimeType": "text/html" - } - ], - "tags": [ - { - "tag": "Computer Science - Machine Learning" - }, - { - "tag": "Quantitative Biology - Quantitative Methods" - } - ], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.arxiv-vanity.com/papers/", - "items": "multiple" - } -] -/** END TEST CASES **/ diff --git a/deleted.txt b/deleted.txt index f2796b2b7dd..a899757ff3f 100644 --- a/deleted.txt +++ b/deleted.txt @@ -128,3 +128,4 @@ fc410e64-0252-4cd3-acb1-25e584775fa2 # National Library of Australia: Old site d c0e6fda6-0ecd-e4f4-39ca-37a4de436e15 # Library Catalog (GEAC): No instances of this catalog system are still online as of 2021 b38a44f4-b8af-4553-9edf-fba4d2598d6a # Springer Books: Site was merged into Springer Link 9f52911f-e1b5-41f8-be66-b16982269e6a # HLAS (historical): Site moved, now uses Voyager 7 +3aedd2ab-113b-4bb0-8c74-ccb47b3b9deb # arXiv Vanity is defunct From 448baccad0061aa3f25bf34a073f67cf3fa587ed Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 22 Oct 2024 12:07:06 -0400 Subject: [PATCH 128/158] ProQuest: Update for site changes - Support "Full Citation" view (inline metadata on viewer page) - Parse "Degree date" - Fix publicationTitle being set to place for some newspapers - Pull Historical Newspapers dates and pages - Remove session IDs from URLs - Update tests where possible https://forums.zotero.org/discussion/comment/477153/#Comment_477153 --- ProQuest.js | 61 +++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/ProQuest.js b/ProQuest.js index 8c01e8c7c58..5982c1f6206 100644 --- a/ProQuest.js +++ b/ProQuest.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-07-16 17:42:05" + "lastUpdated": "2024-10-22 16:06:36" } /* @@ -242,6 +242,10 @@ function doWeb(doc, url, noFollow) { Zotero.debug("new Abstract view"); scrape(doc, url, type); } + else if (doc.querySelector('.docViewFullCitation .display_record_indexing_row')) { + Zotero.debug("Full citation view"); + scrape(doc, url, type); + } else if (noFollow) { Z.debug('Not following link again. Attempting to scrape'); scrape(doc, url, type); @@ -431,6 +435,7 @@ function scrape(doc, url, type) { // more complete dates are preferred case 'Date': case 'Publication date': + case 'Degree date': dates[2] = value; break; case 'Publication year': @@ -460,7 +465,11 @@ function scrape(doc, url, type) { } } - item.url = url.replace(/\baccountid=[^&#]*&?/, '').replace(/\?(?:#|$)/, ''); + if (!item.title) { + item.title = text(doc, '#documentTitle'); + } + + item.url = url.replace(/&?(accountid|parentSessionId)=[^&#]*/g, '').replace(/\?(?:#|$)/, '').replace('?&', '?'); if (item.itemType == "thesis" && place.schoolLocation) { item.place = place.schoolLocation; } @@ -505,7 +514,8 @@ function scrape(doc, url, type) { && ZU.fieldIsValidForType('publicationTitle', item.itemType)) { var pubTitle = ZU.xpathText(byline, './/a[@id="lateralSearch"]'); if (!pubTitle) { - pubTitle = text(doc, '#authordiv .newspaperArticle strong'); + pubTitle = text(doc, '#authordiv .newspaperArticle .pub-tooltip-trigger') + || text(doc, '#authordiv .newspaperArticle strong'); } // remove date range if (pubTitle) item.publicationTitle = pubTitle.replace(/\s*\(.+/, ''); @@ -522,6 +532,16 @@ function scrape(doc, url, type) { item.date = date; } + // Historical Newspapers: date and page are in title + if (item.itemType == 'newspaperArticle') { + let matches = item.title.match(/^(\w+ \d{1,2}, \d{4}) \(Page (\d+)/); + if (matches) { + let [, date, pageNumber] = matches; + item.date = ZU.strToISO(date); + item.pages = pageNumber; + } + } + item.abstractNote = ZU.xpath(doc, '//div[contains(@id, "abstractSummary_")]//p') .map(function (p) { return ZU.trimInternal(p.textContent); @@ -1467,7 +1487,7 @@ var testCases = [ }, { "type": "web", - "url": "https://search.proquest.com/hnpnewyorktimes/docview/122485317/abstract/1357D8A4FC136DF28E3/11", + "url": "https://www.proquest.com/hnpnewyorktimes/docview/122485317/abstract/1357D8A4FC136DF28E3/11?sourcetype=Newspapers", "items": [ { "itemType": "newspaperArticle", @@ -1484,7 +1504,7 @@ var testCases = [ "creatorType": "author" } ], - "date": "1984", + "date": "Aug 22, 1984", "ISSN": "03624331", "abstractNote": "For some months now, a gradual thaw has been in the making between East Germany and West Germany. So far, the United States has paid scant attention -- an attitude very much in keeping with our neglect of East Germany throughout the postwar period. We should reconsider this policy before things much further -- and should in particular begin to look more closely at what is going on in East Germany.", "libraryCatalog": "ProQuest", @@ -1492,7 +1512,7 @@ var testCases = [ "place": "New York, N.Y., United States", "publicationTitle": "New York Times", "rights": "Copyright New York Times Company Aug 22, 1984", - "url": "https://search.proquest.com/hnpnewyorktimes/docview/122485317/abstract/1357D8A4FC136DF28E3/11", + "url": "https://www.proquest.com/hnpnewyorktimes/docview/122485317/abstract/1357D8A4FC136DF28E3/11?sourcetype=Newspapers", "attachments": [ { "title": "Full Text PDF", @@ -2091,6 +2111,35 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://www.proquest.com/docview/1857162562/1CFAA6FD31BB4E64PQ/5?sourcetype=Historical%20Newspapers&parentSessionId=abcxyz", + "items": [ + { + "itemType": "newspaperArticle", + "title": "March 25, 1958 (Page 17 of 30)", + "creators": [], + "date": "1958-03-25", + "language": "English", + "libraryCatalog": "ProQuest", + "pages": "17", + "place": "Pittsburgh, United States", + "publicationTitle": "Pittsburgh Post-Gazette", + "rights": "Copyright Pittsburgh Post Gazette Mar 25, 1958", + "url": "https://www.proquest.com/docview/1857162562/1CFAA6FD31BB4E64PQ/5?sourcetype=Historical%20Newspapers", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf", + "proxy": false + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 76fab728fafbd95fefc392a07360671e80b30e43 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 22 Oct 2024 12:12:38 -0400 Subject: [PATCH 129/158] arXiv: Fix ID extraction when URL has hash https://forums.zotero.org/discussion/118985/zotero-connector-bug-failed-to-save-arxiv-page --- arXiv.org.js | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 2 deletions(-) diff --git a/arXiv.org.js b/arXiv.org.js index 30eefa09bc0..89d5b5fa4b7 100644 --- a/arXiv.org.js +++ b/arXiv.org.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 12, "browserSupport": "gcsibv", - "lastUpdated": "2024-10-09 13:54:06" + "lastUpdated": "2024-10-22 16:12:31" } /* @@ -329,7 +329,7 @@ async function doWeb(doc, url) { } } else { - let id = url.match(/(?:pdf|abs)\/(.+)(?:\.pdf)?/)[1]; + let id = url.match(/(?:pdf|abs)\/([^?#]+)(?:\.pdf)?/)[1]; let versionMatch = url.match(/v(\d+)(\.pdf)?([?#].+)?$/); if (versionMatch) { version = versionMatch[1]; @@ -1013,6 +1013,80 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://arxiv.org/abs/2305.16311#", + "detectedItemType": "journalArticle", + "items": [ + { + "itemType": "conferencePaper", + "title": "Break-A-Scene: Extracting Multiple Concepts from a Single Image", + "creators": [ + { + "firstName": "Omri", + "lastName": "Avrahami", + "creatorType": "author" + }, + { + "firstName": "Kfir", + "lastName": "Aberman", + "creatorType": "author" + }, + { + "firstName": "Ohad", + "lastName": "Fried", + "creatorType": "author" + }, + { + "firstName": "Daniel", + "lastName": "Cohen-Or", + "creatorType": "author" + }, + { + "firstName": "Dani", + "lastName": "Lischinski", + "creatorType": "author" + } + ], + "date": "2023-12-10", + "DOI": "10.1145/3610548.3618154", + "abstractNote": "Text-to-image model personalization aims to introduce a user-provided concept to the model, allowing its synthesis in diverse contexts. However, current methods primarily focus on the case of learning a single concept from multiple images with variations in backgrounds and poses, and struggle when adapted to a different scenario. In this work, we introduce the task of textual scene decomposition: given a single image of a scene that may contain several concepts, we aim to extract a distinct text token for each concept, enabling fine-grained control over the generated scenes. To this end, we propose augmenting the input image with masks that indicate the presence of target concepts. These masks can be provided by the user or generated automatically by a pre-trained segmentation model. We then present a novel two-phase customization process that optimizes a set of dedicated textual embeddings (handles), as well as the model weights, striking a delicate balance between accurately capturing the concepts and avoiding overfitting. We employ a masked diffusion loss to enable handles to generate their assigned concepts, complemented by a novel loss on cross-attention maps to prevent entanglement. We also introduce union-sampling, a training strategy aimed to improve the ability of combining multiple concepts in generated images. We use several automatic metrics to quantitatively compare our method against several baselines, and further affirm the results using a user study. Finally, we showcase several applications of our method. Project page is available at: https://omriavrahami.com/break-a-scene/", + "extra": "arXiv:2305.16311 [cs]", + "libraryCatalog": "arXiv.org", + "pages": "1-12", + "proceedingsTitle": "SIGGRAPH Asia 2023 Conference Papers", + "shortTitle": "Break-A-Scene", + "url": "http://arxiv.org/abs/2305.16311", + "attachments": [ + { + "title": "Preprint PDF", + "mimeType": "application/pdf" + }, + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [ + { + "tag": "Computer Science - Computer Vision and Pattern Recognition" + }, + { + "tag": "Computer Science - Graphics" + }, + { + "tag": "Computer Science - Machine Learning" + } + ], + "notes": [ + { + "note": "Comment: SIGGRAPH Asia 2023. Project page: at: https://omriavrahami.com/break-a-scene/ Video: https://www.youtube.com/watch?v=-9EA-BhizgM" + } + ], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From a90a241126180c4e95b804d34dfcffcbe8b21626 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 24 Oct 2024 00:00:53 -0400 Subject: [PATCH 130/158] Lulu: Fix `unreachable code after return statement` warnings And fix inconsistent return --- Lulu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lulu.js b/Lulu.js index cb9752c3765..b08bc675bc4 100644 --- a/Lulu.js +++ b/Lulu.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 12, "browserSupport": "gcsibv", - "lastUpdated": "2023-04-27 09:24:18" + "lastUpdated": "2024-10-24 04:02:00" } function getSearchResults(doc) { @@ -102,11 +102,11 @@ function makeItem(doc, url) { function detectSearch(items) { // Disabled -- no longer working - return false; + if (false) return false; if (items.ISBN) return true; - if (!items.length) return; + if (!items.length) return false; for (var i=0, n=items.length; i Date: Thu, 24 Oct 2024 10:54:58 -0400 Subject: [PATCH 131/158] Newspapers.com: Update for site changes - Unify clipping and article scraper code - Update target https://forums.zotero.org/discussion/119049/newspapers-com-metadata --- newspapers.com.js | 135 ++++++++++++++++++++++------------------------ 1 file changed, 65 insertions(+), 70 deletions(-) diff --git a/newspapers.com.js b/newspapers.com.js index abfa0f20ae1..94aee795471 100644 --- a/newspapers.com.js +++ b/newspapers.com.js @@ -2,14 +2,14 @@ "translatorID": "22dd8e35-02da-4968-b306-6efe0779a48d", "label": "newspapers.com", "creator": "Peter Binkley", - "target": "^https?://[^/]+\\.newspapers\\.com/(clip|article)/", + "target": "^https?://[^/]+\\.newspapers\\.com/article/", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-04-05 15:26:20" + "lastUpdated": "2024-10-24 14:54:45" } /* @@ -40,74 +40,41 @@ function detectWeb(_doc, _url) { } function doWeb(doc, url) { - if (url.includes('/clip/')) { - scrapeClip(doc, url); - } - else { - scrapeArticle(doc, url); - } + scrape(doc, url); } -function scrapeClip(doc, url) { - var newItem = new Zotero.Item("newspaperArticle"); +function scrape(doc, url) { + let item = new Zotero.Item('newspaperArticle'); + let json = JSON.parse(text(doc, 'script[type="application/ld+json"]')); + + item.publicationTitle = json.publisher && ZU.unescapeHTML(json.publisher.legalName); + item.title = ZU.trimInternal(ZU.unescapeHTML(json.about || '')); + item.abstractNote = ZU.unescapeHTML(json.articleBody || json.text || ''); + item.place = ZU.unescapeHTML(json.locationCreated); + item.date = json.datePublished; + item.pages = json.pageStart && ZU.unescapeHTML(json.pageStart.replace('Page', '')); + item.url = attr(doc, 'link[rel="canonical"]', 'href'); + item.attachments.push(makeImageAttachment(url)); + item.attachments.push(makePDFAttachment(url)); - var metaArr = {}; - var metaTags = doc.getElementsByTagName("meta"); - for (let metaTag of metaTags) { - if (metaTag.getAttribute("property")) { - metaArr[metaTag.getAttribute("property")] = metaTag.getAttribute("content"); - } - } - newItem.title = text(doc, '#mainContent h1') || text(doc, '[itemprop="about"]'); - // remove the unnecessary xid param - newItem.url = attr(doc, 'link[rel="canonical"]', 'href'); - /* The user can append the author to the title with a forward slash e.g. "My Day / Eleanor Roosevelt" */ - if (newItem.title.includes('/')) { - var tokens = newItem.title.split("/"); + if (doc.querySelector('div[class^="ClippingOwner_"]') && item.title.includes('/')) { + var tokens = item.title.split("/"); var authorString = tokens[1]; - newItem.title = tokens[0].trim(); + item.title = tokens[0].trim(); // multiple authors are separated with semicolons - var authors = authorString.split("; "); + var authors = authorString.split('; '); for (let author of authors) { - newItem.creators.push(Zotero.Utilities.cleanAuthor(author, "author")); + item.creators.push(Zotero.Utilities.cleanAuthor(author, 'author')); } } - - newItem.publicationTitle = text(doc, '[itemprop="name"]'); - // details["source"]["title"] gives a string like - // "Newspapers.com - The Akron Beacon Journal - 1939-10-30 - Page Page 15" - newItem.pages = text(doc, '[itemprop="position"]').replace(/Page/g, ''); - newItem.date = ZU.strToISO(text(doc, '[itemprop="dateCreated"]')); - newItem.place = text(doc, '[itemprop="locationCreated"]'); - newItem.attachments.push(makeImageAttachment(url)); - newItem.attachments.push(makePDFAttachment(url)); - - // handle empty title - if (newItem.title === "") { - newItem.title = "Article clipped from " + newItem.publicationTitle + ""; + if (!item.title) { + item.title = 'Article clipped from ' + item.publicationTitle + ''; } - newItem.complete(); -} - -function scrapeArticle(doc, url) { - let item = new Zotero.Item('newspaperArticle'); - let json = JSON.parse(text(doc, 'script[type="application/ld+json"]')); - - item.publicationTitle = json.publisher && ZU.unescapeHTML(json.publisher.legalName); - item.title = ZU.trimInternal(ZU.unescapeHTML(json.about)) - || 'Article clipped from ' + item.publicationTitle + ''; - item.abstractNote = ZU.unescapeHTML(json.text); - item.place = ZU.unescapeHTML(json.locationCreated); - item.date = json.datePublished; - item.pages = json.pageStart && ZU.unescapeHTML(json.pageStart.replace('Page', '')); - item.url = attr(doc, 'link[rel="canonical"]', 'href'); - item.attachments.push(makeImageAttachment(url)); - item.attachments.push(makePDFAttachment(url)); item.complete(); } @@ -132,13 +99,11 @@ function makeImageAttachment(url) { }; } - /** BEGIN TEST CASES **/ var testCases = [ { "type": "web", - "url": "https://www.newspapers.com/clip/7960447/my-day-eleanor-roosevelt/", - "detectedItemType": "newspaperArticle", + "url": "https://www.newspapers.com/article/the-akron-beacon-journal-my-day-eleano/7960447/", "items": [ { "itemType": "newspaperArticle", @@ -151,11 +116,12 @@ var testCases = [ } ], "date": "1939-10-30", + "abstractNote": "My Day -\"1 T - i! Mrs. Roosevelt BIRMINGHAM, Ala., Sunday Limited space prevented my telling you about several interest-lnc things which I did-in Youngstown, O., last jpnaay. loaay a sn&u try to tell you a little more about this city, which seems to exist primarily for the production of steel. There is a certain majesty to this Industry which catches one's imagination. We came out from a street to find ourselves looking down over what seemed to be an almost limitless array of factory buildings and chimneys. The driver of our car said: \"That is the U. S. Steel Co. and it covers six miles. Think of. an investment renresented and of the stake which the people working here have in the success or failure of that business, not to mention the innumerable people who own a part of the invested capital. It takes your breath away Just to think that any human beings are responsible for anything so vast and far reaching. Visits Newspaper Indexing Project . , I saw two WPA projects during the morning. One. a visual education project in a school, was turning out extremely good material such a posters, pictures of birds, v samples of grass, trees, bugs, etc, for use in schools throughout the district. The other, an Ohio state project being carried on in several big cities, I have never happened to come across anywhere else, though .it is doubtless being done in many places. Newspapers in the various cities are being indexed and microfilms of the pages are being made. These films can be stored and lent with ease, and the Indexing material will make available information on ths news for the By Eleanor Roosevelt years which these projects cover. It takes several weeks to train a man for work on these projects which requires Intelligence and accuracy. I was interested to see that men and women of various ages and nationalities, including two colored men, were working on it. After lunch at one of the clubs in the city. I had an opportunity to talk with a number of WPA and NYA groups. In Industrial centers there is a pick-up in employment which is felt on both WPA and NYA projects, but this is not, the case as yet in small towns or rural areas. Beys Start Symphony Youngstown has a symphony orchestra which is entirely self-supporting and which was started by two young Italian boys. Many workers in the steel mill play in it, for among our American citizens of foreign nationalities we are more apt to find artistic ability one of their contributions for which we should be grateful. I visited a slum clearance project in the after noon which covers a large area and which they tell me replaces some long condemned buildings, which had been a blot on the city and a danger to the health of the people. I also had a glimpse of the park, which la one of the most .beautiful natural parKs I nave ever seen. We left Youngstown immediately after my lec- ture, spent a few hours in cohimous, u yesterday and found ourselves engulfed in a football crowd. We were tempted to stay over to see the Cornell-Ohio State game so as to be able to cheer our own state college. : . Now, after part of a day and another night on the train, we are in Birmingham, Ala. This country Is a big country when you start to criss-cross Itl", "libraryCatalog": "newspapers.com", "pages": "15", "place": "Akron, Ohio", "publicationTitle": "The Akron Beacon Journal", - "url": "https://www.newspapers.com/clip/7960447/my-day-eleanor-roosevelt/", + "url": "https://www.newspapers.com/article/the-akron-beacon-journal-my-day-eleano/7960447/", "attachments": [ { "title": "Image", @@ -174,19 +140,19 @@ var testCases = [ }, { "type": "web", - "url": "https://www.newspapers.com/clip/18535448/the-sunday-leader/", - "detectedItemType": "newspaperArticle", + "url": "https://www.newspapers.com/article/the-sunday-leader/18535448/", "items": [ { "itemType": "newspaperArticle", "title": "Article clipped from The Sunday Leader", "creators": [], "date": "1887-07-17", + "abstractNote": "breakfast, enjoying illustrated resident of this city. A BOLD BURGLARY. Peter McManus's Saloon Robbed This Morning, One of the most daring burglaries and robberies that has been committed in this city for many years was perpetrated between the hours of one and three o'clock Thursday morning. in the very midst of the business centre, at a point rendered as bright day by surrounding electric lights, and on a street that is supposed to be constantly patroled at all times by vigilant policemen. Between the hours named the saloon and restaurant of Peter McManus, next door to Lohmann's on East Market street, was entered by burglars, and robbed of all its most valuable contents, Mr. McManus did not close his place until nearly midnight, and then going to the Exchange Hotel, chatted pleasantly on the porch with some friends before retiring. He securely locked and bolted the doors both front and rear, before leaving, and found them this morning in the same condition aS he had left them. What Was his surprise, however, on going behind his bar, to find the money drawer turned bottom upward on the floor, and further investigation showed that all of the most valuable goods in the store had been stolen, including about $300 worth of ten cent cigars, his entire supply of that grade, $150 worth of five cent cigars, 8 quantity of the best whisky, and everything that the robbers could conveniently carry. The drawer had been prled open with an ice pick which they had taken from the refrigerator, having previously broken both blades of a large pair of shears in the attempt. Mr. McManus does not know the exact amount of money he had left in the drawer, but thinks there were about seventeen dollars, mostly in silver. His entire loss will reach very close to $500, and Mr. McManus being by no means a rich man will no doubt feel it severely. The only possible way that the burglars could affect an entrance was through the transom over the front door, which had been left partly open. To reach this a ladder must have been brought into requisition, and the goods must have been handed out through the same aperture. How it was possible that all this could be accomplished without detection is one of mysterious features of the affair. Surely the policemen must have been elsewhere at that time. There is no positive clue to the burglars as yet. Though certain parties are suspected and are being shadowed, no evidence that would warrant an arrest has thus far been obtained. QUINN COMMITTED. He is Held in Default $700 Bail to Answer the Charge of Robbery. Thomas Quinn was arrested at Kingston last night for the robbery of Peter McManus's restaurant in this city, the particulars of which were given in Thursday's LEADER. Quinn has a record, and it is not altogether an enviable one. He has been in a number of scrapes. He was once arrested for threatening to kill his father, and then he was one of the fellows who robbed Bock & Glover's jewelry store at Hazleton last winter. He turned state's evidence, it will be remembered and received a sentence to the county jail, while his companion in the crime, Shepherd, was sent to the penitentiary. When he left here for Philadelphia Shepherd said he would not be surprised to see Quinn at the penitentiary before he got out. He is very likely to see him there. Quinn had a hearing before the Mayor this morning and was committed to jail in default of $700 tail. When arraigned he pleaded not guilty, but the evidence seemed dead against him. McManus testified that he was in his place three times on the day before the robbery -the last time between 11 and 12 o'clock at night- and had stood him off for drinks. He also identified a 25 cent shinplaster, found in Quinn's possession when arrested, as one which had been in his money drawer for nine or ten months or possibly a year. A pair of scissors, which belonged to McManus, were found under the bar in his restaurant on the morning after the robbery, broken, and the piece that was broken off was found in Quinn's pocket after his arrest. The scissors had been used to pry open the money drawer. The finding of these things in Quinn's possession was evidence that he either committed the robbery himself or knew who did it, and he had no explanation to make as to how the articles came in his possession, When asked by the Mayor how long he had been out of jail he answered, \"'That's my business.\" He was quite impudent and denied having been in McManus's restaurant on Wednesday evening, as McManus said he was. He was released from jail, after serving his sentence for the Hazleton robbery, on June 30th.", "libraryCatalog": "newspapers.com", "pages": "5", "place": "Wilkes-Barre, Pennsylvania", "publicationTitle": "The Sunday Leader", - "url": "https://www.newspapers.com/clip/18535448/the-sunday-leader/", + "url": "https://www.newspapers.com/article/the-sunday-leader/18535448/", "attachments": [ { "title": "Image", @@ -205,19 +171,19 @@ var testCases = [ }, { "type": "web", - "url": "https://www.newspapers.com/clip/31333699/driven-from-governors-office-ohio/", - "detectedItemType": "newspaperArticle", + "url": "https://www.newspapers.com/article/rushville-republican-driven-from-governo/31333699/", "items": [ { "itemType": "newspaperArticle", "title": "Driven from Governor's Office, Ohio Relief Seekers Occupy a Church Today; Remain Defiant", "creators": [], "date": "1937-04-10", + "abstractNote": "DRIVEN FROM GOVERNOR'S OFFICE, OHIO RELIEF SEEKERS OCCUPY A CHURCH TODAY: REMAIN DEFIANT G. M. C. Plant Will Reopen; Police Ready # Trouble Is Expected at StrikeBound General Motors Factory Near Toronto, Canada. Oshawa, Ont., April 10 (AP) Canadian Press - Sixty men and women workers of the strikeclosed General Motors of Canada plant walked out without melestation through a picket line today and went back to work in the parts department. Thus : a situation which the CIO-Affiliated Automobile Workunion the company and government officials all had feared might break into open trouble passed peacefully - with no more incident that the prolonged jeers of the 160 pickets. The main plant, from which 3,700 union workers have struck, remained closed. The parts department was reopened for motor car and truck repair purposes and not for actual production. Oshawa, Ont., April 10 (Canad- ian Press) -Provincial authorities massed police reserves in nearby Toronto, ready for instant action, today as General Motors of Canada prepared to resume partial operation of its strike-bound Oshawa plant. Premier Mitchell Hepburn of Ontario Province, opponent of the committee for industrial organization in its Oshawa activity, declared government protection would be provided if necessary when the factory's parts department reopens. The extra police will not be sent, however, unless \"trouble develops and gets beyond the control of the municipality,\" he said. Representatives of the 3,700 strikers, called out by the United Automobile Workers of America, said any worker who wishes may enter the Oshawa plant but any worker who does \"is a strike breaker whether he thinks so or not.\" Hugh Thompson, CIO organizer, withdrew a statement he made at the same time saying the union \"will not be responsible for any accident that happens\" after such workers leave the plant, stating: \"I wish to retract the suggestion regarding the possibility •of accident to strikebreakers Force Is Used to Eject Group from State House at' Columbus, Ohio. SEVERAL INJURED BY THE OFFICERS Protesters Demanding Appropriation of $50,000,000 for the Needy. By GORDON C. NIXON Columbus, O., April 10 (AP)-A defiant group of 100 relief seekers occupied a church today as a haven from the office of Gov. Martin L. Davey from which they were dragged and carried by sheriff's deputies. Six of their organizers were in jail for investigation, cut off from all but attorneys. A committee of the Ohio Workers Alliance took over the leadership and declared they would stay in the state capital until their demands were met. Many nursed bruises made by officers' maces; nearly all went without food for nearly 12 hours from the time the National Guard stopped feeding them until they could take up a collection for supplies. \"The demonstration will continue,\" was the final declaration in a statement issued by temporary leaders. They declined to say if they would attempt to re-enter the governor's office which they held from late Wednesday until yesterday evening. Screaming, kicking and cursing, the marchers, mostly from the Toledo area, struggled for several minutes before ejection was completed. One was taken to a hospital for treatment. Another had severe bruises. Governor Davey, who had ordered them fed until yesterday noon, said, \"we tried to be very courteous to them, fed them, and tried to make them comfortable. of curse, there is a limit to all things.\" The climax of more than two months of Ohio relief crises still was ahead. The legislature appropriated in two installments a total of $6,- 000,000 for relief and flood aid from Jan. 1 to April 15 and deadlocked on proposals t make the counties contribute to a permanent relief program. Governor Davey urged matching of state funds. The house passed a bill providing $15,000,- 000 for a two-year relief porgram but turned down enabling acts (Turn to Page Three)", "libraryCatalog": "newspapers.com", "pages": "1", "place": "Rushville, Indiana", "publicationTitle": "Rushville Republican", - "url": "https://www.newspapers.com/clip/31333699/driven-from-governors-office-ohio/", + "url": "https://www.newspapers.com/article/rushville-republican-driven-from-governo/31333699/", "attachments": [ { "title": "Image", @@ -237,14 +203,13 @@ var testCases = [ { "type": "web", "url": "https://www.newspapers.com/article/the-times-picayune-telegraphed-to-the-ne/120087578/", - "detectedItemType": "newspaperArticle", "items": [ { "itemType": "newspaperArticle", "title": "Telegraphed to the New Orleans Picayune. Latest from Charleston. Fort Sumter Returns Fire", "creators": [], "date": "1861-04-13", - "abstractNote": "Telegraphed to the New Orleans Picayune. LATEST FROM CHARLESTON. FORT SUMTER RETflUS FIRE. SULLI VAN12AND MORRIS ISLAND BATTERIES AT WORK. BREACH MADE IN FORT SUMTER. War Vessels Reported Outside. By the Southwestern Line. Charleston, April 12. The batteries of Sullivan's Island, Morris Island and other points opened fire on Fort Sumter at half - past four o'clock this morning. Fort Sumter returned the fire. A brisk cannonading is being kept up. There is no infoimation from the seaboard. The military are under arms. The whole population is on the streets, and the harbor is filled with anxious spectators. SECONB DISPATCH. The Moating battery is doing good service. Up to eleven o clock there has been no loea on our side. Fort Sumter replied at 7 o'clock this morning, and has kept up an astonishing fire ever since. Stevens's battery is slightly injured. Three sbejls are fired per minute. Four hundred, in all, have fallen. A breach is expected to be made in Fort Sumter to - morrow. Major Anderson's fire is principally directed I against the floating battery. j War vessels are reported outside the harbor. Only two soldiers are wounded on Salli - ! van's Island. The range is more perfect from the land batteries. Every shot tells. It ia thought from Mnjor Anderson's fire thai he haa more men than was supposed. Fort Sumter will succumb by to - morrow. It is raining at Charleston, but there - is no cessation of the batteries. A continuous steady fire on both sides is beinc kept up. The cutter Harriet Lane, and the steam gnu boat Crntader, are reported olf the bar, but have not entered the harbor. The War Department have as yet no official diepatches. (Jen. Beauregard was at the batteries all day. , The Government expects Fort Sumter to succumb to - morrow. third dispatch The firing continued all day. Two of Fort Sumter's guns are silenced, and it is reported a breach has been made through the southeast wall. No casualty has yet happened to any of the forces. Only seven of the nineteen batteries have opened fire on Fort Sumter. The remainder are held ready for the expected fleet. Two thousand men reached the city this morning and immediately embarked for Morris Island. FOURTH DI fAT H. Charleston, April 10, 11 P. M. Tne bombardment of Fort Saniter is going on every twenty minutes from the mortars It is supposed Major Anderson is resting his men for the night. Three vessels of war are reported outside tho bar. They cannot get in on account of the roughness of the sea. No one has as yet received any injury. The floating battery works admirably well. Every inlet to the harbor is well guarded. Our forces are having a lively time of it.", + "abstractNote": "Telegraphed to the New Orleans Picayune. LATEST FROM CHARLESTON. FORT SUMTER RETURNS FIRE. SULLIVANIMAND MORRIS ISLAND BATTERIES AT WORK. BREACH MADE IN FORT SUMTER. War Vessels Reported Outside. [By the Southwestern Line.) CHARLESTON, April 12.-The batteries of Sullivan's Island, Morris Island and other points opened fire on Fort Samter at half-past four o'clock this morning. Fort Samter returned the fire. A briek cannonading is being kept up. There is no information from the seaboard. The military are under arms. The whole population is on the streets, and the harbor is filled with anxious spectators. [SECOND DISPATCH.] The floating battery is doing good service. Up to eleven o clock there has been no loss on our side. Fort Sumter replied at 7 o'clock this morning, and has kept up an astonishing fire ever since. Stevens's battery is slightly injured. Three shells are fired per minute. Four hundred, in all, have fallen. A breach is expected to be made in Fort Sumter to-morrow. Major Anderson's fire is principally directed against the floating battery. War vessels are reported outeide the harbor. Only two soldiers are wounded on Sallivan's Island. The range is more perfect from the land batteries. tells. It is thought from Major Anderson's a fire that he has more men than was supposed. Fort Sumter will anceumb by to- morrow. It is raiving at Charleston, but there is no ceseation of the batteries. A contianous steady fire on both eides is being kept up. The cutter Harriet Lave, and the steam gun boat Crusader, are reported off the bar, but have not entered the harbor. The War Department have as yet no ollicial dispatches. Gen. Beauregard was at the batteries all day. The Government expects Fort Samter to succumb to- morrow. [THIRD DISPATCH.] The firing continued all day. Two of Fort Sumter's guns are silenced, and it is reported a breach has been made through the southeast wall. No casualty has yet happened to any of the forces. Only seven of the nineteen batteries have opened fire on Fort Sumter. The remainder are held ready for the expected fleet. Two thousand men reached the city this morning and immediately embarked for Morris Ieland. FOURTH DISPATCH. CHARLESTON, April 12, 11 P. M.- -The bombardment of Fort Sumter is going on every twenty minutes from the mortare. It is supposed Major Anderson is resting his men for the night. Three vessels of war are reported outside the bar. They cannot get in on account of the roughness of the 888. No one has as yet received any injary. The floating battery works admirably well. Every inlet to the harbor is well guarded. Our forces are having a lively time of it. |", "libraryCatalog": "newspapers.com", "pages": "4", "place": "New Orleans, Louisiana", @@ -269,14 +234,13 @@ var testCases = [ { "type": "web", "url": "https://nydailynews.newspapers.com/article/daily-news/121098969/", - "detectedItemType": "newspaperArticle", "items": [ { "itemType": "newspaperArticle", "title": "Article clipped from Daily News", "creators": [], "date": "1965-02-26", - "abstractNote": "Donavena 8-5 Choice; Can He Kayo Folley? By Jim McCulIey Professional oddsmakers, otherwise referred to as bookies, evidently are counting on Oscar (Ringo) Bona- vena to flatten Zora Folley the Garden. Otherwise, why young thumper from Argentina an 8-5 favorite over the ringwise No. 5 heavyweight contender from Arizona? Only two fighters in Folley's 13-year career have outpointed him England's Henry Cooper, in London, and big Ernie Terrell, in New York. Five men have stopped Zora, however. IT DOESN'T SEEM possible Bonavena, with only eight pro fights under his belt, could win a decision over tonight's 32-year-old opponent. Oscar has stopped seven of his eight opponents, however, and, of course, does have a powerful body and a punishing punch in either mitt. The fight mob is really puzzled over this fight. Some of those well versed in fisticuffs can't understand how the odds-bodkins can make 22-year-old Bonavena such a big favorite. Some 10,000 fans are expected to come see for themselves and put another $40,- 000 into the current boxing revival. \"I KNOW FOLLEY dogs it at times,\" said a former heavyweight contender, who did not want to be named because he is now an official with the boxing commission. ''But Bonavena is a real novice compared to Zora. It seems to me Folley should be a big favorite, but then the kid does have a punch and he is game. It's possible he can reach Folley and knock him out.\" The price, for Folley backers, Is most enticing. \"I CAN'T RESIST the price,\" said a knowledgeable fight man who has been known to wager a bob now and then when the figures are right. \"Know something, 1 think it will be down close to pick 'em before they get into the ring.\" One thing is certain. Folley can't lose another fight in New York at this time, or he is through as a top contender. He is going for a payday on the gamble that he can go the distance with Oscar; and there is a chance he might stop the young man, too, though nobody has done that yet. RIGHT NOW, FOLLEY is unbeaten in hi3 last six bouts since losing to Terrell here July 27, '63. In that span he has whipped George Chuvalo, easily, and has recorded a draw with European champion Karl Maldenbfrger in Germany. Zora's overall record stands 68-7-4, for 79 professional fights, and includes 38 knockouts, some proof that he can punch as well as box. Only opponent to go the route (10 rounds) with Bonavena was Dick Wipperman, last Nov. 13 here. Oscar came back to the Garden a month later and knocked out Billy Stephan in six. The South American still is unranked among the big boys, but a win tonight will put him up there where he can start hollering. History shows heavyweights do mature a lot quicker than the lighter men, and Oscar may ev.en. be an unusual young fighter, v . . ( . r in 10 rounds or less tonight at would they continue to list the - Vlsic lliv ;.. Vnn-t ST!rt -. lM. FEB. 26, 1958 ZDhe BOSTON CELTICS WOM THEIR SECOMt STRAIGHT N.&.A. EASTERN CROWN BY DOWNING DETROIT, 106-99, AS &1LL RUSSELL COUTftOLU&THE BOARDS. BOBCOUSYAN& BILL SHAfeMAH EACH SCORED 18 POIWTS. Lincoln Downs Results 1ST Clmp.: 4-np: 5 f.: off 1:33. Ravenala Prince (Garry)5.ti0 4i 2 SO Mission Bound (Parker) 6.10 .'i.8'1 Favorite Act (Bradley) K.MI T-l:02, Also Lord Culpeper. Your Reporter, Deacon Shnne. Prmrie Rose. Rinsr Shut, Fearless Leader, ilaryg Gilt. Soft Glance. 2D Clmg-.; 4-np: 7 f.: off 2:00. Idle Threats (Allan) 4 no 2 SO Grey Whirl (Giovanni) 3.40 3.00 Good Effort (Maeda) B.20 T-1:32t4. Also Greek Paire. Inquisition. Frozen North, Fast Bid. Foxy Sway. (Daily Double. 8-1, Paid :!.\". liOl 3D Clm?:3yrs:mdns:5 f :off 2 :2!) . Dogrwood Pateh(MaRia)7.ai) o.no 4.20 I.L Abie K. t Bradley) 13. NO U.KO Peaceful T. (Donahue) H.uO T.-l:t)3. Also Doe I.ark. AlHnx. Miss Pilot. Sum Bomb. Fast Bell. Greek Action, Win Joe. Dont Btatne Babe. 4TH Clmar.: 4-up; 7 t.: off 2:58. Irish Dotty (Bradley) 4.4D 3.20 2. SO Sibling- (Allan) 9.80 6.20 Brimstone Road (Row an 6. Of) T.-l :35 . Also Stahlstown. Emerson Hill. Patti Dowd. Ou The Lawn. Sieve H.. Game Start. Set. 5TH Clma:.: 3-up: 8 t.; off 3:254. Ancient Queen (Lamonte)-4.80 3. no 2.40 Wlwndilly (Merrier) 3 20 2 .So Lady Mink (Bradley) 2.80 T-l:02. Alio Mandolas. Lady Rhody. O. K. Debbie. Jury Verdict. Swift Salonga. Mix n Match. La Calvados. 6TH Clm?: 3-4 yrs; 5 f: off 3:52. Tessie Tansor(Davern)12.60 o.BO 5.00 French Line (Myers) 4.80 5 40 Captain Bronze (Allan) 10. hi) T.-l:02 9i. Alyso Rosie Anirel. Lony-bridge Lu Lu. Star Status, Toute Ma Vie. Tompkins County. 7TH Alw.: 3-4-yos.: 5 fur. off 4:20. Lories Honey (Hole) 24.20 20 3.8\" Rndoon (Clinch) 2.40 2.40 Presta Sun (Gamb'della) 5.00 T.-l:03. Also Green Toea. Anthony Scarfo. Prince O Morn. Captain Lockitup. Caronia. 8TH Clmr.: 4-up: 1 m.: off 4:48. ratcount (Alberts) 13.HO 5 HO 4.20 Lone Peak (Rodriguez) 5.60 3 flu Kilda (Ledezma) 3.40 T-l:48Si. Also Hue or Spank. Carb-anrel, Whitey. Wild Desire. 9TH Clmg-: 41iip: 1 m: off 5:16. Oportscaster (Allan) 20.80 8.KO 7.20 Waste Of Time(Miller) 49.20 2B.20 Da.vFromDallas(G's'do) 20.40 T.-1:5H4. Also Symboleer, Dandy Randy. Sea Tread. My Buyer. Cosmic Rule. Busted Budeet. Another Take, Presented. (Twin Double 8-1 8-3 Paid $3.51 1.20) , Att, 4,744. Handle $364,968. ' r think ( ConraoLf) THEY'LL 7t1-fT EVER SvSXv. ' C COME J uAV' BE A LOHG JfeTV", + "abstractNote": "Bonavena 8-5 Choice; Can He Kayo Folley? By Jim McCullev I bookies, Professional evidently vena to flatten Zora the Garden. Otherwise, young thumper from an 8-5 favorite over No. 5 heavyweight from Arizona? Only two fighters 13-year career have him--England's Henry London, and big Ernie New York. Five stopped Zora, however. IT DOESN'T SEEM Bonavena, with only fights under his belt, a decision over tonight's old opponent. Oscar seven of his eight however, and, of have a powerful punishing punch in The fight mob is over this fight. Some well versed in fisticuffs derstand how the can make 22-year-old such a big favorite. fans are expected to themselves and put 000 into the current vival. \"I KNOW FOLLEY times,\" said a former weight contender, want to be named now an official with commission. \"But real novice compared seems to me Folley big favorite, but does have a punch game. It's possible he Folley and knock him The price, for Folley is most enticing. \"I CAN'T RESIST said a knowledgeable who has been known bob now and then ures are right. \"Know I think it will be pick 'em before they ring.\" One thing is certain. can't lose another York at this time, or as a top contender. for a payday on the he can go the distance and there is a chance stop the young man, nobody has done that RIGHT NOW. beaten in his last six losing to Terrell here In that span he George Chuvalo, easily, recorded a draw with champion Karl Germany. Zora's stands 68-7-4, for 79 fights, and includes 38 some proof that he well as box. Only opponent to (10 rounds) with Dick Wipperman, last here. Oscar came Garden a month later out Billy Stephan in six. American still is unranked the big boys, but a will put him up there can start hollering. heavyweights do quicker than the lighter Oscar may even. be young fighter. y oddsmakers, otherwise referred to as are counting on Oscar (Ringo) BonaFolley in 10 rounds or less tonight at why would they continue to list the Argentina® the contender ringwise This Day in Sports 8 1965 World by Rights News Reserved Syndicate Co. Inc. in Folley's outpointed in GOT WE'VE Cooper, Terrell, in THINK CONTROL! I DON'T men have THEY'LL EVER possible COME eight pro DOWN! could win • COULD. J 32-year- BE A LONG has opponents, stopped • REIGN ! G course, does body and a either mitt. really puzzled of those can't unodds-bodkins Bonavena Some 10,000 come see for another $40,- boxing re- dogs it at heavywho did not because he is the boxing Bonavena is a to Zora. It should be a then the kid and he is can reach out.\" backers, the price,\" fight man to wager a when the figsomething, down close to get into the Folley fight in New he is through He is going gamble that with Oscar; he might too, though yet. FOLLEY is unbouts since July 27, '63. has whipped and has European Maldenberger in overall record professional knockouts, can punch as go the route Bonavena was Nov. 13 back to the and knocked The South among win tonight where he History shows mature a lot men, and an unusual FEB. 26,1958 THE BOSTON CELTICS WON THEIR SECOND STRAIGHT N.B.A. EASTERN CROWN BY DOWNING DETROIT, I06-99, AS BILL RUSSELL CONTROLLED THE BOARDS. BOB COUSY AND BILL SHARMAN EACH SCORED 18 POINTS. Lincoln Downs Results 1ST- 4-up: 5 1.: off 1:33. Ravenala Prince (Garry) -5.60 3.40 2.80 Mission Bound (Parker)- 6.40 3.80 Favorite Act (Bradley) 6.80 T-1:02 %. Also- Lord Culpeper. Your Reporter., Deacon Fearless Shrine, Leader, Prairie Marys Rose. Gift, Soft Glance. 2D Clmg.: 4-up; 7 1.: off 2:00. . Threats 29.20 4.00 2.80 Grey Whirl (Giovanni) _ 3.40 3.00 Good Effort (Maeda). - . Inquisi- 9.20 T-1:32 % Also- Greek Page. tion, Frozen North, Fast Bid. Foxy Sway. (Daily Double, 8-1, Paid $35.60) 3D f:off 2:29 ½ Dogwood Patch (Masia) 7.60 5.00 4.20 LL Abie K. (Bradley) _ 13.80 9.60 Peaceful T. (Donahue) 9.00 T-1:03 ⅕ - Also- Doe Lark. Alltrix. Pilot. Sum Bomb, Fast Bell. Greek Action, Win Joe, Dont Blame Babe. 4TH- 4-up; 7 1.: off 2:56. Irish Dotty, (Bradley) 4.40 3.20 2.80 Sibling (Allan) 9.80 6.20 Brimstone Road (Row an) 6.00 T.-1:35 % Also- Stahlstown. Emerson Hill. Patti Dowd. On The Lawn. Steve H., Game Start. Set. 5TH- 3-up: 5 f.: off 3:25 ½. Queen (Lamonte) _4.80 3.00 2.40 Whindilly (Mercier) _ 3.20 2.80 Lady, T-1:02 Mink (Bradley) Also - Mandolas. Lady 2.80 Rhody, 0. K. Debbie. Jury Verdict. Swift Salonga, Mix n Match. La Calvados. 3-4 yrs: 5 f: off 3:52. Jessie, Tansor (Davern) -12.60 5.60 5.00 Line (Myers) 4.80 5.40 Captain Bronze (Allan) 10.80 T.-1:02 % Alyso- Rosie Angel, Longbridge Star Status. Toute Ma Vie. Tompkins' County. 7TH- 3-4-vos.: fur. off 4:20. Lories Honey (Hole). = -24.20 6.20 3.80 Radoon (Clinch). 2.40 2.40 Presta Sun (Gamb'della) 5.00 T.-1:03%. Also- -Green Toga. Anthony Scarfo. Prince 0 Morn. Captain Lockitup. Caronia. 8TH- 4-up: 1 m.: off 4:48. Catcount (Alberts) .13.60 5.80 4.20 Peak (Rodriguez) 5.60 3.60 Kilda (Ledezma). 3.40 T-1:48 Also- Hug or Spank, Carbangel, Whitey, Wild Desire. 9TH-Clmg: 41up: 1 m: off 5:16. Sportscaster (Allan) - 20.80 8.80 7.20 Waste Of Time (Miller) 49.20 26.20 FromDallas (G's'do) 20.40 T.-1:51⅕. Also - - Symboleer. Dandy Randy, Sea Tread. My Buyer, Cosmic Rule, Busted Budget, Another Take, Presented. (Twin Double 8-1-8-3 Pald $3,514.20) Att. 4,744. Handle $364,968.", "libraryCatalog": "newspapers.com", "pages": "60", "place": "New York, New York", @@ -297,6 +261,37 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://bklyn.newspapers.com/article/the-brooklyn-union-john-applegate-releas/157734583/", + "items": [ + { + "itemType": "newspaperArticle", + "title": "John Applegate released from draft due to physical disability", + "creators": [], + "date": "1865-03-13", + "abstractNote": "defence-was M' II 13 1 It A F T. Work ett the Froyoet-Marshala Offices. iuibd Din-raujT. Cok Kowlerie office presents the nanal bneg tola morning, end tk loo gnene ef epplloanu for exemption honors does not norm to lone In length or la toe heterogeneonaaeea of It el omen to. About 00 min ere bow required lor the Third Dtotrirt. Home very amusing scenes occur it tb office, aad tho change ol faore which occur with too majority ol recruits before rod alter their entrance Into tho doer which admit them into the awful presence of the examining board are remarks -Me. Ae a general thing every man In tbe line profome to think that be will aorely be exempted ea eooo hie story I told. Thoogh mnch witticism prevail, there t on moat face an Ill-concealed look of anxiety . which belie tbe assertions of their poaneeaore aa to tketr eertaldty of retting elf. Each tnne face le econned oa he eomee ant with a look of eager curiosity by those who have not been examined, end there ere few who have ooch command of their tarn a to eoneeel the toot of their eucce. or failure. The man who has been let off makes hi exit with a polite bow to the eeeembled draft official tnd a Jennty elr. He casts a look of mingled benevolence end pity on those outside, end If be bee a friend In tbe crowd eltp him oo tb back, tell him of hi good fortune, tnd take him If he be any message to convey, or whether ha dont feel peckish or feint from long etandlng, or whether ha would not Ilka to try B little eometblng for bit ttomtch'e sake. Yonr Jolly exempt man to lor the time tbe picture .of benerolenoe and benignity, tnd If the rale or the office permitted would be glad to take Colonel Fowler and hie toff ont to refreshment. He pet by tb ornamental broker who lounge around the front of tbe building with at mnch of a teowl aa hie good humor will permit, for be to e man thongh be be exempt, end be cannot forget that if be hadnt been exempted theee merry gentlemen would have the handling of e larger amount of hie money tnn he cere to spare. He take a parting look at tbe building in which be ha spent tome anxtone end unpleasant boar, and trot off home to ell his wife, mother, sweetheart, listers, tnd friends tnd relatives generally that Code Samuel doesnt want klm Just yot. ' 1 be reverse to this picture In that of tbe exceedingly robnet and healthy kind of gentleman whom Unde Samuel dellghU to honor, but who think that the little rheumatism he sometimes baa would eerioualy Impair hln efficiency In a military point of vtow-au opinion In which the draft authorities do net at all coincide, foe after a few questions he to pronounced eligtnle for service, end the word held entered opposite bis name. All into before he he bad e ebnnco to tell tbe offlctolsabouthls occasional lameness, and according to his temperament he either come out of the office with e seowUe sickly smile, or en anxious hoe. or the fin bat gone torth, end been re- eortefi, ewff-'kv-wrent, -ae sporting men say, ploy or pa y- play soldier or pay for a substitute; He Is generally found out hy the writing ones ontalde, who relieve their own misery and uncertainty by. va-rleus Inquiries ue whether hed seen hie uncle, ue lotto health, why he looks no pale, and other sue!! question ae their humor may suggest, Ue meets hie tormentors with more or less philosophy, end to seen soon after In consultation with n broker. The following la the list ol cases examined since onr Itet report : . , Utld.-c. Berk, W. Mosey, I-Veupel, Joe. Lock, Jr,, v ifrhmd EL R. Btylee. H. Wbecjer, He Hiller ? homes, E. Shane, . Spaulding, H. Walks, L.Htein-bern, C. Demerger, J. Schuyler. H. Mdler, C. Harper, W. faster, W. Knapp, A. Mayer, J. Ray, C. Flnehant. , Ao-Aerioit-J. Connor, IHS.fth. i fumithtd SubtlUuta m but Drqfl. A. Saunders, J. Mott, W. Phelps, G. Hartshorne. , f-alol Cfirnmnlorios. It. Fleet. , Until it abie Agk-4. Hhnrdlow, Jr., 8. Botto, M. Kee- rirCdiePrtg.r ton in ; j!Byrne, 7 fioum Beventh: A. Geiek M Grand. uhabmtv J . Wegener, Jo. Wilkinson, H. Baldwin. J. McKay, J. Lawrence, 8. Merrlt, 0. baton, L. Uartleon, J. haven, K. Bmtth, K. Roach, E. Heme, C. HeidengAb, H. Scnultn, O. Griffith, A. Young, M. Bonavirn, 8. Mills, T . Fhelan, C. Gregory. tiirnitked Subtiiiuttt. d-Wicker, J. freed, fl. Track J Hergeant, 8 McKenzie, H. Wheeler, I. Lo-mas J. WebbTB. Clark. D. McCnrley, J Cereoe, 8. Eenrney, W . D. Hart. G. Hawkehurat, J. AMinun, Q. Tyler, K Sumner, and B. Van Buran. THH 6E00SD DISTRICT. The following to the record of Saturday's work at tba headquarters of this district. No. S8 Grand street : Htid to Stnia. Thos. Coyne, Orlando Pearsall, Helb B ColT John B. Smlthl John Ilickey, Jam.; Borne, and bietnck HorBcnpiug, all of the Tenth Ward; Geo -Grafing, Ai jV-eS1fner d gar V. Lawrence, ill (rf Ae Nlnlh WAid, Phtical Dituiiiiiy John Applegate, John 'V. BrnM?m. D. Camp, Francia Hu,Co wm \" iin' bonne? Mark Allen, fiylvauus Whlte.Wm. In. Pslriek Hamlin, Micbael Fahey, Atox. 8. B fiorith, Leopold Voelhe, Theo. Ferguson, Joseph McGawey, A. hLWaldler, George C. White, Adam Bnvder, Jo-eon Beeihe . Edmund Decon, Joseph White, L. K. Wen- Charivs Kode, Thompson Odlen, Benj. P. Coffin i kepiaB dark Hirttn R Dwimrwt, Wo, KwUor, Ohael Frann, liorrisOOonnor, JosephVletory, Dani L.Calkina, fcaacF. Holmea, Goufred Sptudle, John Bjfln Joseph Talbot, Chris. McDonald, Wm. H. Smith Owvn Lynch James Ooodove Ph A Dolman, Wm Grail, and Thos. Muidoom all of tho IfOARrrideriee. Samuel Latorge and Daniel Rem- tk Seme. Lawrence Jtoblnsan, L. Bowers, and BubttUuU 1b Adiwnoft Go. H. Stolner, A. W.Burtls, Wui. Melvin, H. J. Brooks, Charles O. Heary T. Parson, 8. H. wtS?FnIok BHowSid. Thomas E. MarshThso. A Hottf John J. Price. Edeo SproeL Owen Manrijk, Charles Do herty, George R. Stone, a,?e? John Demmarls, bharies Louts, James Walsb, Joeepk , an on the of of the year et", + "libraryCatalog": "newspapers.com", + "pages": "1", + "place": "Brooklyn, New York", + "publicationTitle": "The Brooklyn Union", + "url": "https://www.newspapers.com/article/the-brooklyn-union-john-applegate-releas/157734583/", + "attachments": [ + { + "title": "Image", + "mimeType": "image/jpeg" + }, + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From d247318f42502853a2b578ed49a8cf6f025d2ce2 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 24 Oct 2024 11:14:50 -0400 Subject: [PATCH 132/158] Frontiers: Fix getDOI() on /journals/* pages --- Frontiers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Frontiers.js b/Frontiers.js index 2f10eb504f3..ddf37515107 100644 --- a/Frontiers.js +++ b/Frontiers.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-09-27 07:21:09" + "lastUpdated": "2024-10-24 15:14:44" } /* @@ -221,7 +221,7 @@ function finalizeItem(item, doi, supplements) { } function getDOI(url) { - let m = url.match(/https:\/\/[^/]+\.frontiersin\.org\/articles?\/(10\.\d{4,}\/[^/]+)/); + let m = url.match(/https:\/\/[^/]+\.frontiersin\.org\/(?:journals\/[^/]+\/)?articles?\/(10\.\d{4,}\/[^/]+)/); return m && m[1]; } From cdc1712be9bd5f98ffc99bd4bc4c8d223b76b7ac Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 24 Oct 2024 15:25:15 -0400 Subject: [PATCH 133/158] Lulu: Bail properly from detectSearch() Fix to a90a2411261 --- Lulu.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lulu.js b/Lulu.js index b08bc675bc4..3f899499014 100644 --- a/Lulu.js +++ b/Lulu.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 12, "browserSupport": "gcsibv", - "lastUpdated": "2024-10-24 04:02:00" + "lastUpdated": "2024-10-24 19:22:51" } function getSearchResults(doc) { @@ -102,7 +102,7 @@ function makeItem(doc, url) { function detectSearch(items) { // Disabled -- no longer working - if (false) return false; + if (true) return false; if (items.ISBN) return true; From 51cf9bf665feacffacfaac879b01df6d03f6f7d4 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 29 Oct 2024 11:15:02 -0400 Subject: [PATCH 134/158] Newspapers.com: Support /image/ pages as multiples https://forums.zotero.org/discussion/comment/477807/#Comment_477807 --- newspapers.com.js | 89 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 82 insertions(+), 7 deletions(-) diff --git a/newspapers.com.js b/newspapers.com.js index 94aee795471..de6001a5903 100644 --- a/newspapers.com.js +++ b/newspapers.com.js @@ -2,14 +2,14 @@ "translatorID": "22dd8e35-02da-4968-b306-6efe0779a48d", "label": "newspapers.com", "creator": "Peter Binkley", - "target": "^https?://[^/]+\\.newspapers\\.com/article/", + "target": "^https?://[^/]+\\.newspapers\\.com/(article|image)/", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-10-24 14:54:45" + "lastUpdated": "2024-10-29 15:14:42" } /* @@ -35,15 +35,49 @@ ***** END LICENSE BLOCK ***** */ -function detectWeb(_doc, _url) { - return "newspaperArticle"; +function detectWeb(doc, url) { + if (url.includes('/article/')) { + return 'newspaperArticle'; + } + else if (url.includes('/image/')) { + if (new URL(url).searchParams.has('clipping_id')) { + return 'newspaperArticle'; + } + else { + return 'multiple'; + } + } + return false; } -function doWeb(doc, url) { - scrape(doc, url); +async function getClippings(url) { + let id = url.match(/\/image\/(\d+)/)[1]; + let json = await requestJSON(`/api/clipping/page?page_id=${id}&start=0&count=25`); + let clippings = {}; + for (let clipping of json.clippings) { + clippings[clipping.url] = clipping.title || '[Untitled]'; + } + return clippings; +} + +async function doWeb(doc, url) { + if (detectWeb(doc, url) == 'multiple') { + let items = await Zotero.selectItems(await getClippings(url)); + if (!items) return; + for (let url of Object.keys(items)) { + scrape(await requestDocument(url)); + } + } + else if (url.includes('/image/')) { + let clippingID = new URL(url).searchParams.get('clipping_id'); + scrape(await requestDocument('/article/' + clippingID)); + } + else { + scrape(doc, url); + } } -function scrape(doc, url) { +function scrape(doc, url = doc.location.href) { let item = new Zotero.Item('newspaperArticle'); let json = JSON.parse(text(doc, 'script[type="application/ld+json"]')); @@ -292,6 +326,47 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://www.newspapers.com/image/53697455", + "items": "multiple" + }, + { + "type": "web", + "url": "https://www.newspapers.com/image/53697455/?clipping_id=138120775", + "items": [ + { + "itemType": "newspaperArticle", + "title": "Lorenzo POW Release", + "creators": [], + "date": "1945-05-31", + "abstractNote": "attended Army St. by IT art son 76th Mrs. 47 LOCAL 61s I FREED FROM JAP AND NAZI CAMPS Washington. May 31 The War Department has made public the names of 1.211 soldiers liberated from German and Japanese prison camps. The following 47 Brooklyn, Queens and Long Island men are Included: A1ELLO. Staff Sgt. Loul T.. son of Mrs. Christina Aiello, 118-01 19th St., St. Albans. BAILEY. Pvt. John J . son of Wil- I liaor N. Bailey, 869 St, John's place. BARANII K, Capt. Jerry M son of Mrs. Marv L. Baranluk, S3 Haw- ley St., Babylon. BAl'ER, Pfc. Harold C. Jr., husband of Mrs. Mary A. Bauer, 89 India tCer St.. Greentiolnt. I, BERMAN, Pfc. Martin, son of Mrs. Anne Berman, 609 Logan Si. Hospital BE8SER, Pvt. Louis L., brother of .Sunday Harold Besser. 3070 66th St. M1CELI, Mrs. 1115 ROCCO, of BLASS, Pfc. Louis, son of Mrs. Jennie Blass, 271 Oakley, Ave., H-mont. BOAS, Pfc. Ross P., son of Mrs. Doris P. Boas, 101 Rugby Road. DIPPOLD, Sgt. Christian, son of Mrs. Edna J. Bent, 8829 Fort Hamilton Parkway. GRAY, Staff Sgt. John A., son of John T. Gray, 22-17 19th St., Astoria. HARRIS, Tech. Sgt. Morton G.. son of Mrs. Sylvia R. Harris, 650 Ocean Ave. HOLLAND, Tech. Sgt. Dennis A husband of Mrs. Virginia Holland, 158-10 Sanford Ave., Flushing. HYMAN, Staff Sgt. Milton, son of Mrs. Gussie Hyman. 381 Jericho Turnpike, Floral Park. KAMINETSKY, Pfc. Sol, son of Sam Kaminetsky, 238 Dumonti Avenue. I KEANE. Pfc. Francis L., son of Mrs. Delia Keane, 319 Lincoln Place. KILL. AN, Tech. Sgt. William R..! son of Mrs. Mary E. Killlan, 503 J 6th St. LANE, Sgt. Charles C. husband of, Mrs. Marie Lane, 167 Bushwick j Avenue. i LA ROCCO, Staff Sgt. Guy W.. son of Mrs. Fanny La Rocco, 801 Sheridan Boulevard. Inwood. I LORENZO, Ptc. William E., son! of Mrs. Jennie Lorenzo, 178 j Jackson St. PAPPAS, Pfc. Demetrios. son of. George Pappas, 1357 43d St. !", + "libraryCatalog": "newspapers.com", + "pages": "7", + "place": "Brooklyn, New York", + "publicationTitle": "Brooklyn Eagle", + "url": "https://www.newspapers.com/article/brooklyn-eagle-lorenzo-pow-release/138120775/", + "attachments": [ + { + "title": "Image", + "mimeType": "image/jpeg" + }, + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://bklyn.newspapers.com/image/541712415/", + "items": "multiple" } ] /** END TEST CASES **/ From 874154ce492149208a8b550e9636b88d242557a1 Mon Sep 17 00:00:00 2001 From: Northword <44738481+northword@users.noreply.github.com> Date: Wed, 30 Oct 2024 23:08:15 +0800 Subject: [PATCH 135/158] Crossref Unixref XML: Remove space before sub and sup in title (#3374) --- Crossref Unixref XML.js | 58 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/Crossref Unixref XML.js b/Crossref Unixref XML.js index a4cec09276a..e83cd70170f 100644 --- a/Crossref Unixref XML.js +++ b/Crossref Unixref XML.js @@ -11,7 +11,7 @@ }, "inRepository": true, "translatorType": 1, - "lastUpdated": "2024-03-23 02:00:53" + "lastUpdated": "2024-10-30 12:58:25" } /* @@ -447,6 +447,7 @@ function doImport() { removeUnsupportedMarkup(innerXML(subtitle)) ); } + item.title = item.title.replace(/\s+<(sub|sup)>/g, "<$1>"); } if (!item.title || item.title == "") { item.title = "[No title found]"; @@ -904,6 +905,61 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "import", + "input": "\n\n \n \n \n \n Industrial & Engineering Chemistry Research\n Ind. Eng. Chem. Res.\n 0888-5885\n 1520-5045\n \n \n \n \n Investigation of CO\n <sub>2</sub>\n Reduction to Formate in an Industrial-Scale Electrochemical Cell through Transient Numerical Modeling\n \n \n \n \n Mohammad\n Bahreini\n Department of Chemical Engineering and Biotechnological Engineering, Université de Sherbrooke, 2500 Boulevard de L’Université, Sherbrooke, QC J1K 2R1, Canada\n https://orcid.org/0009-0006-7234-5157\n \n \n Martin\n Désilets\n Department of Chemical Engineering and Biotechnological Engineering, Université de Sherbrooke, 2500 Boulevard de L’Université, Sherbrooke, QC J1K 2R1, Canada\n \n \n Ergys\n Pahija\n Department of Chemical Engineering and Biotechnological Engineering, Université de Sherbrooke, 2500 Boulevard de L’Université, Sherbrooke, QC J1K 2R1, Canada\n https://orcid.org/0000-0003-0859-6489\n \n \n Ulrich\n Legrand\n Electro Carbon, 3275 Chemin de l’Industrie, St-Mathieu-de-Beloeil, QC J3G 0M8, Canada\n Department of Chemical Engineering, Polytechnique Montreal, 2500 Chem. de Polytechnique, Montréal, QC H3T 1J4 ,Canada\n \n \n Jiaxun\n Guo\n Electro Carbon, 3275 Chemin de l’Industrie, St-Mathieu-de-Beloeil, QC J3G 0M8, Canada\n \n \n Arthur G.\n Fink\n Electro Carbon, 3275 Chemin de l’Industrie, St-Mathieu-de-Beloeil, QC J3G 0M8, Canada\n \n \n \n 10\n 14\n 2024\n \n \n acs.iecr.4c03239\n 10.1021/acs.iecr.4c03239\n \n \n \n \n Natural Sciences and Engineering Research Council of Canada\n http://dx.doi.org/10.13039/501100000038\n \n ALLRP 580893 - 22\n \n \n \n Mitacs\n http://dx.doi.org/10.13039/501100004489\n \n \n \n electro carbon Inc\n \n \n \n https://doi.org/10.15223/policy-029\n https://doi.org/10.15223/policy-037\n https://doi.org/10.15223/policy-045\n \n \n 10.1021/acs.iecr.4c03239\n https://pubs.acs.org/doi/10.1021/acs.iecr.4c03239\n \n \n https://pubs.acs.org/doi/pdf/10.1021/acs.iecr.4c03239\n \n \n \n \n https://pubs.acs.org/doi/pdf/10.1021/acs.iecr.4c03239\n \n \n \n \n \n 10.1021/acs.iecr.1c01316\n \n \n Advances in carbon capture\n Yoro K. O.\n 3\n 2020\n 10.1016/B978-0-12-819657-1.00001-3\n \n \n 10.1016/j.apcatb.2015.04.055\n \n \n 10.1039/C8EE00097B\n \n \n 10.1002/cssc.201600394\n \n \n 10.1016/j.cej.2022.139663\n \n \n 10.1016/B978-0-12-820244-9.00001-9\n \n Reichle, D. E.\n The global carbon cycle and climate change\n ; Elsevier, 2019, 1, 388.\n \n \n \n 10.1149/2.0741713jes\n \n \n 10.1016/j.apcatb.2021.120447\n \n \n 10.1016/j.jcat.2015.11.014\n \n \n 10.1021/acsenergylett.3c00489\n \n \n 10.1016/j.seppur.2023.123811\n \n \n 10.1021/acssuschemeng.0c05215\n \n \n 10.1002/cctc.202300977\n \n \n 10.1016/j.cej.2024.148972\n \n \n 10.1038/s41560-021-00973-9\n \n \n 10.1016/j.joule.2020.03.013\n \n \n 10.1039/D2TA02086F\n \n \n 10.1039/C8CP01319E\n \n \n 10.1039/D0CS00230E\n \n \n 10.1021/acscatal.1c02783\n \n \n 10.1016/S0022-0728(01)00729-X\n \n \n 10.1021/acs.accounts.8b00010\n \n \n 10.1016/j.jcou.2019.02.007\n \n \n 10.1021/acssuschemeng.2c06129\n \n \n 10.1016/j.isci.2022.104011\n \n \n 10.1021/accountsmr.1c00004\n \n \n 10.1016/j.matre.2023.100177\n \n \n 10.1016/j.joule.2019.07.009\n \n \n 10.1016/j.renene.2022.01.085\n \n \n 10.1016/j.matre.2023.100177\n \n \n 10.1016/j.xpro.2021.100889\n \n \n 10.3389/fenrg.2020.00005\n \n \n 10.1002/elsa.202100160\n \n \n 10.1016/j.joule.2019.07.021\n \n \n 10.1016/j.xcrp.2021.100522\n \n \n 10.1021/acs.iecr.0c02358\n \n \n 10.1021/acssuschemeng.0c07694\n \n \n 10.1021/acssuschemeng.0c07387\n \n \n 10.1016/j.ijhydene.2011.12.148\n \n \n 10.1021/acsenergylett.0c02184\n \n \n 10.1016/j.electacta.2018.02.100\n \n \n 10.1016/j.jpowsour.2016.02.043\n \n \n 10.1016/j.jpowsour.2022.230998\n \n \n 10.1016/j.matre.2023.100194\n \n \n Legrand, U. Electrochemical cell for carbon dioxide reduction towards liquid chemicals. Google Patents: 2023.\n \n \n 10.1016/j.electacta.2021.138987\n \n \n 10.1073/pnas.1713164114\n \n \n 10.1016/j.marchem.2005.11.001\n \n \n Elements of chemical reaction engineering\n Fogler H. S.\n 2020\n \n \n Chemical kinetics and reaction dynamics\n Houston P. L.\n 2012\n \n \n 10.1017/S0022112067001375\n \n \n 10.1016/j.coche.2016.02.006\n \n \n Multicomponent mass transfer\n Taylor R.\n 1993\n \n \n Chemically reacting flow: theory, modeling, and simulation\n Kee R. J.\n 2017\n 10.1002/9781119186304\n \n \n Fundamentals of momentum, heat, and mass transfer\n Welty J.\n 2020\n \n \n 10.1039/D1SC05743J\n \n \n 10.1002/cssc.201600693\n \n \n \n \n \n Investigation of CO2 Reduction to Formate in an Industrial-Scale Electrochemical Cell through Transient Numerical Modeling\n \n Supplemental Information for 10.1021/acs.iecr.4c03239\n \n \n 10.1021/acs.iecr.4c03239.s001\n https://pubs.acs.org/doi/suppl/10.1021/acs.iecr.4c03239/suppl_file/ie4c03239_si_001.pdf\n \n \n \n \n \n \n \n", + "items": [ + { + "itemType": "journalArticle", + "title": "Investigation of CO2 Reduction to Formate in an Industrial-Scale Electrochemical Cell through Transient Numerical Modeling", + "creators": [ + { + "creatorType": "author", + "firstName": "Mohammad", + "lastName": "Bahreini" + }, + { + "creatorType": "author", + "firstName": "Martin", + "lastName": "Désilets" + }, + { + "creatorType": "author", + "firstName": "Ergys", + "lastName": "Pahija" + }, + { + "creatorType": "author", + "firstName": "Ulrich", + "lastName": "Legrand" + }, + { + "creatorType": "author", + "firstName": "Jiaxun", + "lastName": "Guo" + }, + { + "creatorType": "author", + "firstName": "Arthur G.", + "lastName": "Fink" + } + ], + "date": "2024-10-14", + "DOI": "10.1021/acs.iecr.4c03239", + "ISSN": "0888-5885, 1520-5045", + "journalAbbreviation": "Ind. Eng. Chem. Res.", + "language": "en", + "pages": "acs.iecr.4c03239", + "publicationTitle": "Industrial & Engineering Chemistry Research", + "rights": "https://doi.org/10.15223/policy-029", + "url": "https://pubs.acs.org/doi/10.1021/acs.iecr.4c03239", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From d1bb75a7c2fcfd401123d039021b073111f24b06 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 6 Nov 2024 11:23:30 -0500 Subject: [PATCH 136/158] CI: Update linter cache from stdin Fixes lint errors when length of translator header is different in memory and on disk. Also replace cache object with Map. --- .../processor.js | 50 ++++++++++++------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/.ci/eslint-plugin-zotero-translator/processor.js b/.ci/eslint-plugin-zotero-translator/processor.js index f70ea9396be..3069deaff43 100644 --- a/.ci/eslint-plugin-zotero-translator/processor.js +++ b/.ci/eslint-plugin-zotero-translator/processor.js @@ -21,15 +21,15 @@ function exec(cmd) { return childProcess.execSync(cmd, { cwd: repo, encoding: 'utf8' }); } -// have to pre-load evertyhing to test for conflicting headers -const cache = {}; -for (let filename of fs.readdirSync(repo).sort()) { - if (!filename.endsWith('.js')) continue; - filename = path.join(repo, filename); - - const text = fs.readFileSync(filename, 'utf-8'); - - if (text[0] !== '{') continue; +// have to pre-load everything to test for conflicting headers +const cache = new Map(); + +function updateCache(text, filename) { + if (text[0] !== '{') return; + if (cache.has(filename) && cache.get(filename).text === text) { + // No change - no need to re-parse + return; + } // detect header const prefix = `const ZoteroTranslator${Date.now()} = `; @@ -59,18 +59,30 @@ for (let filename of fs.readdirSync(repo).sort()) { }; }; - cache[filename] = { + const entry = { + text, header: extract(header), testcases: extract(testcases), FW: ast.comments.find(comment => comment.type === 'Block' && comment.value.trim === 'FW LINE 59:b820c6d') }; try { - cache[filename].header.fields = JSON.parse(cache[filename].header.text); + entry.header.fields = JSON.parse(entry.header.text); } catch (err) { // ignore } + + + cache.set(filename, entry); +} + +for (let filename of fs.readdirSync(repo).sort()) { + if (!filename.endsWith('.js')) continue; + filename = path.join(repo, filename); + + const text = fs.readFileSync(filename, 'utf-8'); + updateCache(text, filename); } for (const lu of exec(`git grep '"lastUpdated"' HEAD~1`).split('\n')) { @@ -78,7 +90,7 @@ for (const lu of exec(`git grep '"lastUpdated"' HEAD~1`).split('\n')) { if (!m) continue; const [, translator, lastUpdated] = m; const filename = path.join(repo, translator); - if (cache[filename]) cache[filename].lastUpdated = lastUpdated; + if (cache.has(filename)) cache.get(filename).lastUpdated = lastUpdated; } function tryJSON(json, offset) { @@ -145,9 +157,9 @@ function header(program) { } function conflict(filename) { - const translatorID = (((cache[filename] || {}).header || {}).fields || {}).translatorID; + const translatorID = (((cache.get(filename) || {}).header || {}).fields || {}).translatorID; if (!translatorID) return null; - for (const [other, header] of Object.entries(cache)) { + for (const [other, header] of cache.entries()) { if (other !== filename && header.translatorID === translatorID) { return header.fields; } @@ -159,7 +171,7 @@ const junk = new RegExp(`${path.sep}0_`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$ module.exports = { support: { repo, - parsed: filename => cache[filename.replace(junk, '')], + parsed: filename => cache.get(filename.replace(junk, '')), header, IDconflict: conflict, json: { @@ -171,7 +183,11 @@ module.exports = { supportsAutofix: true, preprocess: function (text, filename) { - const parsed = cache[filename]; + // We might be running on an in-memory version of the translator newer + // than what we read from disk earlier, so update the cache + updateCache(text, filename); + + const parsed = cache.get(filename); if (text[0] !== '{' || !parsed) return [{ text, filename }]; if (parsed.header.text) { @@ -185,7 +201,7 @@ module.exports = { postprocess: function (messages, filename) { messages = [].concat(...messages); - const parsed = cache[filename]; + const parsed = cache.get(filename); if (parsed) { const header = parsed.header; From 7ca20decc67f8ccb0e1426e7bb4b87cdb05daa39 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 7 Nov 2024 17:14:04 -0500 Subject: [PATCH 137/158] OSF Preprints: Grab PDF link from page https://forums.zotero.org/discussion/119492/pdfs-not-saved-from-psyarxiv-socarxiv-when-using-connector --- OSF Preprints.js | 86 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 3 deletions(-) diff --git a/OSF Preprints.js b/OSF Preprints.js index 3318b3f981f..7ae8f0a2329 100644 --- a/OSF Preprints.js +++ b/OSF Preprints.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-03-20 01:58:39" + "lastUpdated": "2024-11-07 22:14:23" } /* @@ -91,6 +91,7 @@ function constructAPIURL(urls) { return ids; } +// TODO: Unify and use API or EM uniformly function osfAPIImport(text) { // Z.debug(text); let json = JSON.parse(text); @@ -141,6 +142,16 @@ function scrape(doc, url) { item.attachments.splice(i, 1); } } + if (!item.attachments.length) { + let pdfURL = attr(doc, 'div[class*="download-container"] a[href$="/download/"]', 'href'); + if (pdfURL) { + item.attachments.push({ + title: 'OSF Preprint', + mimeType: 'application/pdf', + url: pdfURL + }); + } + } item.libraryCatalog = "OSF Preprints"; item.complete(); }); @@ -151,7 +162,6 @@ function scrape(doc, url) { }); } - /** BEGIN TEST CASES **/ var testCases = [ { @@ -329,9 +339,79 @@ var testCases = [ }, { "type": "web", - "defer": true, "url": "https://osf.io/search?activeFilters=%5B%5D&q=metascience&resourceType=Preprint&sort=-relevance&view_only=", + "defer": true, "items": "multiple" + }, + { + "type": "web", + "url": "https://osf.io/preprints/psyarxiv/7eb4g", + "items": [ + { + "itemType": "preprint", + "title": "Revisiting the Digital Jukebox: Applying Mood Management Theory to Algorithmically Curated Music Streaming Environments", + "creators": [ + { + "firstName": "Alicia", + "lastName": "Ernst", + "creatorType": "author" + }, + { + "firstName": "Felix", + "lastName": "Dietrich", + "creatorType": "author" + }, + { + "firstName": "Benedikt", + "lastName": "Rohr", + "creatorType": "author" + }, + { + "firstName": "Leonard", + "lastName": "Reinecke", + "creatorType": "author" + }, + { + "firstName": "Michael", + "lastName": "Scharkow", + "creatorType": "author" + } + ], + "date": "2024-09-30", + "DOI": "10.31234/osf.io/7eb4g", + "abstractNote": "Experimental evidence has profoundly contributed to our understanding of Mood Management Theory (MMT) in the context of music. Extant research, however, lacks insights into everyday mood regulation through music listening, especially on music streaming services where selections can be guided by algorithmic recommendations. Hence, we tested MMT in a naturalistic setting by combining experience sampling with logged music streaming data, while accounting for algorithmic curation as a boundary condition to users’ music choices. In a pre-registered study using T = 6,918 observations from N = 144 listeners, results showed that mood, music selection, and algorithmic curation varied substantially from situation to situation. However, we found no effects between mood and music choices that would confirm MMT’s selection hypotheses, yet small mood-congruent music effects on mood. Algorithmic curation did not establish novel MMT-related choice patterns. Our findings suggest re-specifying MMT and related media use theories for daily life.", + "language": "en-us", + "libraryCatalog": "OSF Preprints", + "repository": "OSF", + "shortTitle": "Revisiting the Digital Jukebox", + "url": "https://osf.io/7eb4g", + "attachments": [ + { + "title": "OSF Preprint", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Mood Management Theory" + }, + { + "tag": "algorithmic curation" + }, + { + "tag": "digital behavioral data" + }, + { + "tag": "experience sampling method" + }, + { + "tag": "music use" + } + ], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From bc846072a55a679866608b0d16009d2e4cfb8f0b Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 12 Nov 2024 11:48:21 -0500 Subject: [PATCH 138/158] Open WorldCat: Update ISBN ranges https://forums.zotero.org/discussion/comment/479027/#Comment_479027 --- Open WorldCat.js | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/Open WorldCat.js b/Open WorldCat.js index 889e500f8aa..1cc7188f2d7 100644 --- a/Open WorldCat.js +++ b/Open WorldCat.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 12, "browserSupport": "gcsibv", - "lastUpdated": "2023-08-22 04:39:47" + "lastUpdated": "2024-11-12 16:47:59" } /* @@ -355,8 +355,8 @@ function wcHyphenateISBN(isbn) { var ISBN = {}; ISBN.ranges = (function () { /* eslint-disable */ - var ranges = {"978":{"0":["00","19","200","699","7000","8499","85000","89999","900000","949999","9500000","9999999"],"1":["00","09","100","329","330","399","4000","5499","55000","86979","869800","998999","9990000","9999999"],"2":["00","19","200","349","400","699","7000","8399","35000","39999","84000","89999","900000","949999","9500000","9999999"],"3":["00","02","04","19","030","033","200","699","0340","0369","7000","8499","03700","03999","85000","89999","95400","96999","99000","99499","99500","99999","900000","949999","9500000","9539999","9700000","9899999"],"5":["01","19","200","420","430","430","440","440","450","699","0050","0099","4210","4299","4310","4399","4410","4499","7000","8499","9200","9299","9501","9799","9910","9999","00000","00499","85000","89999","91000","91999","93000","94999","98000","98999","900000","909999","9500000","9500999","9900000","9909999"],"600":["00","09","100","499","5000","8999","90000","99999"],"601":["00","19","85","99","200","699","7000","7999","80000","84999"],"602":["00","07","200","699","0800","0899","0900","1099","1100","1199","1200","1399","1500","1699","7500","7999","8000","9499","14000","14999","17000","17999","18000","18999","19000","19999","70000","74999","95000","99999"],"603":["00","04","05","49","500","799","8000","8999","90000","99999"],"604":["0","4","50","89","900","979","9800","9999"],"605":["01","02","04","09","030","039","100","399","4000","5999","9000","9999","60000","89999"],"606":["0","0","10","49","500","799","8000","9199","92000","99999"],"607":["00","39","400","749","7500","9499","95000","99999"],"608":["0","0","7","9","10","19","200","449","4500","6499","65000","69999"],"609":["00","39","400","799","8000","9499","95000","99999"],"612":["00","29","50","99","300","399","4000","4499","45000","49999"],"613":["0","9"],"615":["00","09","100","499","5000","7999","80000","89999"],"616":["00","19","200","699","7000","8999","90000","99999"],"617":["00","49","500","699","7000","8999","90000","99999"],"618":["00","19","200","499","5000","7999","80000","99999"],"619":["00","14","150","699","7000","8999","90000","99999"],"621":["00","29","400","599","8000","8999","95000","99999"],"7":["00","09","100","499","5000","7999","80000","89999","900000","999999"],"80":["00","19","200","699","7000","8499","85000","89999","900000","999999"],"82":["00","19","200","689","7000","8999","90000","98999","690000","699999","990000","999999"],"83":["00","19","200","599","7000","8499","60000","69999","85000","89999","900000","999999"],"84":["00","13","140","149","200","699","7000","8499","9000","9199","9700","9999","15000","19999","85000","89999","92400","92999","95000","96999","920000","923999","930000","949999"],"85":["00","19","200","549","5500","5999","7000","8499","60000","69999","85000","89999","98000","99999","900000","979999"],"86":["00","29","300","599","6000","7999","80000","89999","900000","999999"],"87":["00","29","400","649","7000","7999","85000","94999","970000","999999"],"88":["00","19","200","599","910","929","6000","8499","9300","9399","85000","89999","95000","99999","900000","909999","940000","949999"],"89":["00","24","250","549","990","999","5500","8499","85000","94999","97000","98999","950000","969999"],"90":["00","19","90","90","94","94","200","499","5000","6999","8500","8999","70000","79999","800000","849999"],"91":["0","1","20","49","500","649","7000","7999","85000","94999","970000","999999"],"92":["0","5","60","79","800","899","9000","9499","95000","98999","990000","999999"],"93":["00","09","100","499","5000","7999","80000","94999","950000","999999"],"94":["000","599","6000","8999","90000","99999"],"950":["00","49","500","899","9000","9899","99000","99999"],"951":["0","1","20","54","550","889","8900","9499","95000","99999"],"952":["00","19","60","65","80","94","200","499","5000","5999","6600","6699","7000","7999","9500","9899","67000","69999","99000","99999"],"953":["0","0","10","14","51","54","150","509","6000","9499","55000","59999","95000","99999"],"954":["00","28","300","799","2900","2999","8000","8999","9300","9999","90000","92999"],"955":["20","40","550","749","0000","1999","4500","4999","7500","7999","8000","9499","41000","43999","44000","44999","50000","54999","95000","99999"],"956":["00","19","200","699","7000","9999"],"957":["00","02","05","19","21","27","31","43","440","819","0300","0499","2000","2099","8200","9699","28000","30999","97000","99999"],"958":["00","56","600","799","8000","9499","57000","59999","95000","99999"],"959":["00","19","200","699","7000","8499","85000","99999"],"960":["00","19","93","93","200","659","690","699","6600","6899","7000","8499","9400","9799","85000","92999","98000","99999"],"961":["00","19","200","599","6000","8999","90000","94999"],"962":["00","19","200","699","900","999","7000","8499","8700","8999","85000","86999"],"963":["00","19","200","699","7000","8499","9000","9999","85000","89999"],"964":["00","14","150","249","300","549","970","989","2500","2999","5500","8999","9900","9999","90000","96999"],"965":["00","19","200","599","7000","7999","90000","99999"],"966":["00","12","14","14","130","139","170","199","279","289","300","699","910","949","980","999","1500","1699","2000","2789","2900","2999","7000","8999","90000","90999","95000","97999"],"967":["00","00","60","89","300","499","900","989","0100","0999","5000","5999","9900","9989","10000","19999","99900","99999"],"968":["01","39","400","499","800","899","5000","7999","9000","9999"],"969":["0","1","20","22","24","39","400","749","7500","9999","23000","23999"],"970":["01","59","600","899","9000","9099","9700","9999","91000","96999"],"971":["02","02","06","49","97","98","000","015","500","849","0160","0199","0300","0599","8500","9099","9600","9699","9900","9999","91000","95999"],"972":["0","1","20","54","550","799","8000","9499","95000","99999"],"973":["0","0","20","54","100","169","550","759","1700","1999","7600","8499","8900","9499","85000","88999","95000","99999"],"974":["00","19","200","699","7000","8499","9500","9999","85000","89999","90000","94999"],"975":["02","24","250","599","990","999","6000","9199","00000","01999","92000","98999"],"976":["0","3","40","59","600","799","8000","9499","95000","99999"],"977":["00","19","90","99","200","499","700","849","5000","6999","85000","89999"],"978":["000","199","900","999","2000","2999","8000","8999","30000","79999"],"979":["20","29","000","099","400","799","1000","1499","3000","3999","8000","9499","15000","19999","95000","99999"],"980":["00","19","200","599","6000","9999"],"981":["00","11","200","289","290","299","310","399","3000","3099","4000","9999","17000","19999"],"982":["00","09","70","89","100","699","9000","9799","98000","99999"],"983":["00","01","45","49","50","79","020","199","800","899","2000","3999","9000","9899","40000","44999","99000","99999"],"984":["00","39","400","799","8000","8999","90000","99999"],"985":["00","39","400","599","6000","8999","90000","99999"],"986":["00","11","120","559","5600","7999","80000","99999"],"987":["00","09","30","35","40","44","500","899","1000","1999","3600","3999","9000","9499","20000","29999","45000","49999","95000","99999"],"988":["00","11","200","799","8000","9699","12000","14999","15000","16999","17000","19999","97000","99999"],"9925":["0","2","30","54","550","734","7350","9999"],"9926":["0","1","20","39","400","799","8000","9999"],"9927":["00","09","100","399","4000","4999"],"9929":["0","3","40","54","550","799","8000","9999"],"9930":["00","49","500","939","9400","9999"],"9931":["00","29","300","899","9000","9999"],"9932":["00","39","400","849","8500","9999"],"9933":["0","0","10","39","400","899","9000","9999"],"9934":["0","0","10","49","500","799","8000","9999"],"9937":["0","2","30","49","500","799","8000","9999"],"9938":["00","79","800","949","9500","9999"],"9939":["0","4","50","79","800","899","9000","9999"],"9940":["0","1","20","49","500","899","9000","9999"],"9942":["00","84","900","984","8500","8999","9850","9999"],"9943":["00","29","300","399","975","999","4000","9749"],"9944":["60","69","80","89","100","499","700","799","900","999","0000","0999","5000","5999"],"9945":["00","00","08","39","57","57","010","079","400","569","580","849","8500","9999"],"9946":["0","1","20","39","400","899","9000","9999"],"9947":["0","1","20","79","800","999"],"9949":["0","0","10","39","75","89","400","749","9000","9999"],"9950":["00","29","300","849","8500","9999"],"9953":["0","0","10","39","60","89","400","599","9000","9999"],"9955":["00","39","400","929","9300","9999"],"9957":["00","39","70","84","88","99","400","699","8500","8799"],"9958":["00","01","10","18","20","49","020","029","040","089","500","899","0300","0399","0900","0999","1900","1999","9000","9999"],"9959":["0","1","20","79","98","99","800","949","970","979","9500","9699"],"9960":["00","59","600","899","9000","9999"],"9961":["0","2","30","69","700","949","9500","9999"],"9962":["00","54","56","59","600","849","5500","5599","8500","9999"],"9963":["0","1","30","54","250","279","550","734","2000","2499","2800","2999","7350","7499","7500","9999"],"9964":["0","6","70","94","950","999"],"9965":["00","39","400","899","9000","9999"],"9966":["20","69","000","149","750","959","1500","1999","7000","7499","9600","9999"],"9971":["0","5","60","89","900","989","9900","9999"],"9972":["1","1","00","09","30","59","200","249","600","899","2500","2999","9000","9999"],"9973":["00","05","10","69","060","089","700","969","0900","0999","9700","9999"],"9974":["0","2","30","54","95","99","550","749","7500","9499"],"9975":["0","0","45","89","100","299","900","949","3000","3999","4000","4499","9500","9999"],"9977":["00","89","900","989","9900","9999"],"9978":["00","29","40","94","300","399","950","989","9900","9999"],"9979":["0","4","50","64","66","75","650","659","760","899","9000","9999"],"9980":["0","3","40","89","900","989","9900","9999"],"9981":["00","09","20","79","100","159","800","949","1600","1999","9500","9999"],"9982":["00","79","800","989","9900","9999"],"9983":["80","94","950","989","9900","9999"],"9984":["00","49","500","899","9000","9999"],"9986":["00","39","97","99","400","899","940","969","9000","9399"],"9987":["00","39","400","879","8800","9999"],"9988":["0","2","30","54","550","749","7500","9999"],"9989":["0","0","30","59","100","199","600","949","2000","2999","9500","9999"],"99901":["00","49","80","99","500","799"],"99903":["0","1","20","89","900","999"],"99904":["0","5","60","89","900","999"],"99905":["0","3","40","79","800","999"],"99906":["0","2","30","59","70","89","90","94","600","699","950","999"],"99908":["0","0","10","89","900","999"],"99909":["0","3","40","94","950","999"],"99910":["0","2","30","89","900","999"],"99911":["00","59","600","999"],"99912":["0","3","60","89","400","599","900","999"],"99913":["0","2","30","35","600","604"],"99914":["0","4","50","89","900","999"],"99915":["0","4","50","79","800","999"],"99916":["0","2","30","69","700","999"],"99919":["0","2","40","69","70","79","300","399","800","849","850","899","900","999"],"99921":["0","1","8","8","20","69","90","99","700","799"],"99922":["0","3","40","69","700","999"],"99926":["0","0","10","59","87","89","90","99","600","869"],"99927":["0","2","30","59","600","999"],"99928":["0","0","10","79","800","999"],"99932":["0","0","7","7","10","59","80","99","600","699"],"99935":["0","2","7","8","30","59","90","99","600","699"],"99936":["0","0","10","59","600","999"],"99937":["0","1","20","59","600","999"],"99938":["0","1","20","59","90","99","600","899"],"99940":["0","0","10","69","700","999"],"99941":["0","2","30","79","800","999"],"99953":["0","2","30","79","94","99","800","939"],"99954":["0","2","30","69","88","99","700","879"],"99955":["0","1","20","59","80","99","600","799"],"99956":["00","59","86","99","600","859"],"99958":["0","4","50","93","940","949","950","999"],"99960":["0","0","10","94","950","999"],"99961":["0","3","40","89","900","999"],"99963":["00","49","92","99","500","919"],"99966":["0","2","30","69","80","94","700","799"],"99967":["0","1","20","59","600","899"],"99971":["0","5","60","84","850","999"],"99974":["40","79","800","999"],"99976":["0","1","20","59","600","799"]},"979":{"10":["00","19","200","699","7000","8999","90000","97599","976000","999999"],"11":["00","24","250","549","5500","8499","85000","94999","950000","999999"],"12":["200","200"]}}; - ranges['978']['99968']=ranges['978']['99912'];ranges['978']['9935']=ranges['978']['9941']=ranges['978']['9956']=ranges['978']['9933'];ranges['978']['9976']=ranges['978']['9971'];ranges['978']['99949']=ranges['978']['99903'];ranges['978']['9968']=ranges['978']['9930'];ranges['978']['99929']=ranges['978']['99930']=ranges['978']['99931']=ranges['978']['99942']=ranges['978']['99944']=ranges['978']['99948']=ranges['978']['99950']=ranges['978']['99952']=ranges['978']['99962']=ranges['978']['99969']=ranges['978']['99915'];ranges['978']['99917']=ranges['978']['99910'];ranges['978']['99920']=ranges['978']['99970']=ranges['978']['99972']=ranges['978']['99914'];ranges['978']['99933']=ranges['978']['99943']=ranges['978']['99946']=ranges['978']['99959']=ranges['978']['99927'];ranges['978']['81']=ranges['978']['80'];ranges['978']['9967']=ranges['978']['9970']=ranges['978']['9965'];ranges['978']['9936']=ranges['978']['9952']=ranges['978']['9954']=ranges['978']['9926'];ranges['978']['99965']=ranges['978']['99922'];ranges['978']['9928']=ranges['978']['9927'];ranges['978']['99947']=ranges['978']['99916'];ranges['978']['9985']=ranges['978']['9939'];ranges['978']['99918']=ranges['978']['99925']=ranges['978']['99973']=ranges['978']['99975']=ranges['978']['99905'];ranges['978']['99939']=ranges['978']['99945']=ranges['978']['99904'];ranges['978']['989']=ranges['978']['972'];ranges['978']['620']=ranges['978']['613'];ranges['978']['4']=ranges['978']['0'];ranges['978']['99923']=ranges['978']['99924']=ranges['978']['99934']=ranges['978']['99957']=ranges['978']['99964']=ranges['978']['9947'];ranges['978']['614']=ranges['978']['609'];ranges['978']['9948']=ranges['978']['9951']=ranges['978']['9932']; + var ranges={978:{0:["00","19","200","227","229","368","370","638","640","644","646","647","649","654","656","699","2280","2289","3690","3699","6390","6397","6550","6559","7000","8499","85000","89999","900000","900370","900372","949999","6398000","6399999","6450000","6459999","6480000","6489999","9003710","9003719","9500000","9999999"],1:["01","02","05","05","000","009","030","034","040","049","100","397","714","716","0350","0399","0700","0999","3980","5499","6500","6799","6860","7139","7170","7319","7620","7634","7900","7999","8672","8675","9730","9877","55000","64999","68000","68599","74000","76199","76500","77499","77540","77639","77650","77699","77830","78999","80000","80049","80050","80499","80500","83799","83850","86719","86760","86979","869800","915999","916506","916869","916908","919599","919655","972999","987800","991149","991200","998989","0670000","0699999","7320000","7399999","7635000","7649999","7750000","7753999","7764000","7764999","7770000","7782999","8380000","8384999","9160000","9165059","9168700","9169079","9196000","9196549","9911500","9911999","9989900","9999999"],2:["00","19","200","349","400","486","495","495","497","527","530","699","4960","4966","5280","5299","7000","8399","35000","39999","49670","49699","84000","89999","91980","91980","487000","494999","900000","919799","919810","919942","919969","949999","9199430","9199689","9500000","9999999"],3:["00","02","04","19","39","39","030","033","200","389","400","688","0340","0369","6950","8499","9996","9999","03700","03999","68900","69499","85000","89999","95400","96999","98500","99959","900000","949999","9500000","9539999","9700000","9849999"],4:["00","19","200","699","7000","8499","85000","89999","900000","949999","9500000","9999999"],5:["01","19","200","361","363","420","430","430","440","440","450","603","605","699","0050","0099","3620","3623","4210","4299","4310","4399","4410","4499","7000","8499","9200","9299","9501","9799","9910","9999","00000","00499","36240","36299","85000","89999","91000","91999","93000","94999","98000","98999","900000","909999","6040000","6049999","9500000","9500999","9900000","9909999"],600:["00","09","100","499","993","995","5000","8999","9868","9929","90000","98679","99600","99999"],601:["00","19","85","99","200","699","7000","7999","80000","84999"],602:["00","06","200","499","0700","1399","1500","1699","5400","5999","6200","6999","7500","9499","14000","14999","17000","19999","50000","53999","60000","61999","70000","74999","95000","99999"],603:["00","04","05","49","500","799","8000","8999","90000","99999"],604:["0","2","40","46","50","89","300","399","470","497","900","979","4980","4999","9800","9999"],605:["00","02","04","05","07","09","030","039","100","199","240","399","2000","2399","4000","5999","7500","7999","9000","9999","06000","06999","60000","74999","80000","89999"],606:["10","49","000","099","500","799","910","919","975","999","8000","9099","9600","9749","92000","95999"],607:["00","25","27","39","400","588","600","694","700","749","2600","2649","5890","5929","7500","9499","26500","26999","59300","59999","69500","69999","95000","99999"],608:["0","0","7","9","10","19","200","449","4500","6499","65000","69999"],609:["00","39","400","799","8000","9499","95000","99999"],612:["00","29","300","399","4000","4499","5000","5224","45000","49999"],613:["0","9"],615:["00","09","100","499","5000","7999","80000","89999"],616:["00","19","200","699","7000","8999","90000","99999"],617:["00","49","500","699","7000","8999","90000","99999"],618:["00","19","200","499","5000","7999","80000","99999"],619:["00","14","150","699","7000","8999","90000","99999"],621:["00","29","400","599","8000","8999","95000","99999"],622:["00","10","200","459","4600","8749","87500","99999"],623:["00","10","110","524","5250","8799","88000","99999"],624:["00","04","200","249","5000","6699","93000","99999"],625:["00","01","320","442","445","449","5500","7793","7795","8499","44300","44499","77940","77949","94000","99999"],626:["00","04","300","499","7000","7999","95000","99999"],627:["30","31","500","524","7500","7999","94500","94649"],628:["00","09","500","549","7500","8499","95000","99999"],629:["00","02","460","499","7500","7999","95000","99999"],630:["300","399","6500","6849","95000","99999"],631:["00","09","300","399","6500","7499","90000","99999"],632:["00","11","600","679"],633:["00","01","300","349","8250","8999","99500","99999"],634:["00","04","200","349","7000","7999","96000","99999"],65:["00","01","250","299","300","302","5000","5129","5200","6149","80000","81824","83000","89999","900000","902449","980000","999999"],7:["00","09","100","499","5000","7999","80000","89999","900000","999999"],80:["00","19","200","529","550","689","7000","8499","53000","54999","69000","69999","85000","89999","99900","99999","900000","998999"],81:["00","18","200","699","7000","8499","19000","19999","85000","89999","900000","999999"],82:["00","19","200","689","7000","8999","90000","98999","690000","699999","990000","999999"],83:["00","19","200","599","7000","8499","60000","69999","85000","89999","900000","999999"],84:["00","09","140","149","200","699","1050","1199","1300","1399","7000","8499","9000","9199","9700","9999","10000","10499","15000","19999","85000","89999","92400","92999","95000","96999","120000","129999","920000","923999","930000","949999"],85:["00","19","96","97","200","454","456","528","534","539","5320","5339","5440","5479","5500","5999","7000","8499","9450","9599","45530","45599","52900","53199","54000","54029","54030","54039","54050","54089","54100","54399","54800","54999","60000","69999","85000","89999","92500","94499","98000","99999","455000","455299","540400","540499","540900","540999","900000","924999"],86:["00","29","300","599","6000","7999","80000","89999","900000","999999"],87:["00","29","400","649","7000","7999","85000","94999","970000","999999"],88:["00","19","200","311","315","318","323","326","339","360","363","548","555","599","910","926","3270","3389","3610","3629","5490","5549","6000","8499","9270","9399","31200","31499","31900","32299","85000","89999","94800","99999","900000","909999","940000","947999"],89:["00","24","250","549","990","999","5500","8499","85000","94999","97000","98999","950000","969999"],90:["00","19","90","90","94","94","200","499","5000","6999","8500","8999","70000","79999","800000","849999"],91:["0","1","20","49","500","649","7000","8199","85000","94999","970000","999999"],92:["0","5","60","79","800","899","9000","9499","95000","98999","990000","999999"],93:["00","09","100","479","5000","7999","48000","49999","80000","95999","960000","999999"],94:["000","599","6000","6387","6389","6395","6397","6399","6401","6406","6408","6419","6421","6432","6434","6435","6437","6443","6445","6450","6452","6458","6460","6465","6467","6474","6476","6476","6479","6493","6495","6497","6499","8999","63881","63881","63884","63885","63887","63889","63961","63962","63964","63964","63966","63969","64001","64004","64006","64006","64009","64009","64074","64074","64076","64077","64200","64201","64203","64203","64205","64206","64208","64208","64330","64331","64333","64333","64336","64336","64338","64339","64361","64363","64366","64366","64368","64369","64441","64441","64443","64443","64445","64446","64449","64449","64510","64512","64514","64515","64591","64592","64595","64596","64599","64599","64661","64662","64666","64666","64669","64669","64750","64751","64754","64754","64756","64757","64759","64759","64771","64771","64773","64773","64777","64779","64781","64781","64783","64786","64788","64789","64941","64942","64945","64946","64948","64948","64980","64980","64983","64984","64987","64987","90000","99999","638800","638809","638820","638839","638860","638869","639600","639609","639630","639639","639650","639659","640000","640009","640050","640059","640070","640089","640700","640739","640750","640759","640780","640799","642020","642029","642040","642049","642070","642079","642090","642099","643320","643329","643340","643359","643370","643379","643600","643609","643640","643659","643670","643679","644400","644409","644420","644429","644440","644449","644470","644489","645130","645139","645160","645199","645900","645909","645930","645949","645970","645989","646600","646609","646630","646659","646670","646689","647520","647539","647550","647559","647580","647589","647700","647708","647723","647729","647740","647769","647800","647809","647820","647829","647870","647879","649400","649409","649430","649449","649470","649479","649490","649499","649810","649829","649850","649869","649880","649899"],950:["00","49","500","899","9000","9899","99000","99999"],951:["0","1","20","54","550","889","8900","9499","95000","99999"],952:["00","19","60","64","80","94","200","499","5000","5999","6600","6699","7000","7999","9500","9899","65000","65999","67000","69999","99000","99999"],953:["0","0","10","14","51","54","150","459","500","500","6000","9499","46000","49999","50100","50999","55000","59999","95000","99999"],954:["00","28","300","799","2900","2999","8000","8999","9300","9999","90000","92999"],955:["20","33","550","710","0000","1999","3400","3549","3600","3799","3900","4099","4500","4999","7150","9499","35500","35999","38000","38999","41000","44999","50000","54999","71100","71499","95000","99999"],956:["00","07","10","19","200","599","6000","6999","7000","9999","08000","08499","09000","09999"],957:["00","02","05","19","21","27","31","43","440","819","0300","0499","2000","2099","8200","9699","28000","30999","97000","99999"],958:["00","49","500","509","600","799","5100","5199","5400","5599","8000","9499","52000","53999","56000","59999","95000","99999"],959:["00","19","200","699","7000","8499","85000","99999"],960:["00","19","93","93","200","659","690","699","6600","6899","7000","8499","9400","9799","85000","92999","98000","99999"],961:["00","19","200","599","6000","8999","90000","97999"],962:["00","19","200","699","900","999","7000","8499","8700","8999","85000","86999"],963:["00","19","200","699","7000","8499","9000","9999","85000","89999"],964:["00","14","150","249","300","549","970","989","2500","2999","5500","8999","9900","9999","90000","96999"],965:["00","19","200","599","7000","7999","90000","99999"],966:["00","12","14","14","130","139","170","199","279","289","300","699","910","949","980","999","1500","1699","2000","2789","2900","2999","7000","8999","90000","90999","95000","97999"],967:["60","89","250","254","300","499","900","989","0000","0999","2000","2499","2700","2799","2800","2999","5000","5999","9900","9989","10000","19999","25500","26999","99900","99999"],968:["01","39","400","499","800","899","5000","7999","9000","9999"],969:["0","1","20","20","24","39","210","219","400","749","2200","2299","7500","9999","23000","23999"],970:["01","59","600","899","9000","9099","9700","9999","91000","96999"],971:["02","02","06","49","97","98","000","015","500","849","0160","0199","0300","0599","8500","9099","9600","9699","9900","9999","91000","95999"],972:["0","1","20","54","550","799","8000","9499","95000","99999"],973:["0","0","20","54","100","169","550","759","1700","1999","7600","8499","8900","9499","85000","88999","95000","99999"],974:["00","19","200","699","7000","8499","9500","9999","85000","89999","90000","94999"],975:["02","23","250","599","990","999","2400","2499","6000","9199","00000","01999","92000","98999"],976:["0","3","40","59","600","799","8000","9499","95000","99999"],977:["00","19","90","95","200","499","700","849","890","894","970","999","5000","6999","8740","8899","8950","8999","9600","9699","85000","87399"],978:["000","199","765","799","900","999","2000","2999","8000","8999","30000","69999"],979:["20","29","000","099","400","799","1000","1499","3000","3999","8000","9499","15000","19999","95000","99999"],980:["00","19","200","599","6000","9999"],981:["00","16","18","19","94","94","96","99","200","299","310","399","3000","3099","4000","5999","17000","17999"],982:["00","09","70","89","100","699","9000","9799","98000","99999"],983:["00","01","45","49","50","79","020","199","800","899","2000","3999","9000","9899","40000","44999","99000","99999"],984:["00","39","400","799","8000","8999","90000","99999"],985:["00","39","400","599","880","899","6000","8799","90000","99999"],986:["00","05","08","11","120","539","0700","0799","5400","7999","06000","06999","80000","99999"],987:["00","09","30","35","42","43","85","88","500","824","1000","1999","3600","4199","4400","4499","4900","4999","8250","8279","8300","8499","8900","9499","20000","29999","45000","48999","82800","82999","95000","99999"],988:["00","11","200","699","8000","9699","12000","19999","70000","79999","97000","99999"],989:["0","1","20","34","37","52","550","799","8000","9499","35000","36999","53000","54999","95000","99999"],9908:["0","1","50","69","825","899","9700","9999"],9909:["00","19","750","849","9800","9999"],9910:["01","09","650","799","8800","9999"],9911:["20","24","550","749","9500","9999"],9912:["40","44","750","799","9800","9999"],9913:["00","07","600","699","9550","9999"],9914:["35","55","700","774","9450","9999"],9915:["40","59","650","799","9300","9999"],9916:["0","0","4","5","10","39","79","91","94","94","600","789","9200","9399","9500","9999"],9917:["0","0","30","34","600","699","9700","9999"],9918:["0","0","20","29","600","799","9500","9999"],9919:["0","0","20","29","500","599","9000","9999"],9920:["23","42","430","799","8550","9999"],9921:["0","0","30","39","700","899","9700","9999"],9922:["20","29","600","799","8250","9999"],9923:["0","0","10","69","700","899","9400","9999"],9924:["28","39","500","659","8950","9999"],9925:["0","2","30","54","550","734","7350","9999"],9926:["0","1","20","39","400","799","8000","9999"],9927:["00","09","100","399","4000","4999"],9928:["00","09","90","99","100","399","800","899","4000","4999"],9929:["0","3","40","54","550","799","8000","9999"],9930:["00","49","500","939","9400","9999"],9931:["00","23","240","899","9000","9999"],9932:["00","39","400","849","8500","9999"],9933:["0","0","10","39","87","89","400","869","9000","9999"],9934:["0","0","10","49","500","799","8000","9999"],9935:["0","0","10","39","400","899","9000","9999"],9937:["0","2","30","49","500","799","8000","9999"],9938:["00","79","800","949","975","990","9500","9749","9910","9999"],9939:["0","3","40","47","50","79","98","99","480","499","800","899","960","979","9000","9599"],9940:["0","1","20","49","84","86","500","839","8700","9999"],9941:["0","0","8","8","10","39","400","799","9000","9999"],9942:["00","59","600","699","750","849","900","984","7000","7499","8500","8999","9850","9999"],9943:["00","29","300","399","975","999","4000","9749"],9944:["60","69","80","89","100","499","700","799","900","999","0000","0999","5000","5999"],9945:["00","00","08","39","57","57","80","80","010","079","400","569","580","799","810","849","8500","9999"],9946:["0","1","20","39","400","899","9000","9999"],9947:["0","1","20","79","800","999"],9949:["00","08","10","39","70","71","75","89","090","099","400","699","7200","7499","9000","9999"],9950:["00","29","300","849","8500","9999"],9951:["00","38","390","849","980","999","8500","9799"],9953:["0","0","10","39","60","89","93","96","400","599","970","999","9000","9299"],9954:["0","1","20","39","99","99","400","799","8000","9899"],9955:["00","39","400","929","9300","9999"],9957:["00","39","65","67","70","84","88","99","400","649","680","699","8500","8799"],9958:["00","01","10","18","20","49","020","029","040","089","500","899","0300","0399","0900","0999","1900","1999","9000","9999"],9959:["0","1","20","79","98","99","800","949","970","979","9500","9699"],9960:["00","59","600","899","9000","9999"],9961:["0","2","30","69","700","949","9500","9999"],9962:["00","54","56","59","600","849","5500","5599","8500","9999"],9963:["0","1","30","54","250","279","550","734","2000","2499","2800","2999","7350","7499","7500","9999"],9964:["0","6","70","94","950","999"],9965:["00","39","400","899","9000","9999"],9966:["14","14","20","69","000","139","750","820","825","825","829","959","1500","1999","7000","7499","8210","8249","8260","8289","9600","9999"],9969:["00","06","500","649","9700","9999"],9971:["0","5","60","89","900","989","9900","9999"],9972:["1","1","00","09","30","59","200","249","600","899","2500","2999","9000","9999"],9973:["00","05","10","69","060","089","700","969","0900","0999","9700","9999"],9974:["0","2","30","54","91","94","95","99","550","749","880","909","7500","8799"],9975:["0","0","45","89","100","299","900","949","3000","3999","4000","4499","9500","9999"],9976:["0","4","59","89","580","589","900","989","5000","5799","9900","9999"],9977:["00","89","900","989","9900","9999"],9978:["00","29","40","94","300","399","950","989","9900","9999"],9979:["0","4","50","64","66","75","650","659","760","899","9000","9999"],9980:["0","3","40","89","900","989","9900","9999"],9981:["00","09","20","79","100","159","800","949","1600","1999","9500","9999"],9982:["00","79","800","989","9900","9999"],9983:["80","94","950","989","9900","9999"],9984:["00","49","500","899","9000","9999"],9985:["0","4","50","79","800","899","9000","9999"],9986:["00","39","97","99","400","899","940","969","9000","9399"],9987:["00","39","400","879","8800","9999"],9988:["0","3","40","54","550","749","7500","9999"],9989:["0","0","30","59","100","199","600","949","2000","2999","9500","9999"],99901:["00","49","80","99","500","799"],99903:["0","1","20","89","900","999"],99904:["0","5","60","89","900","999"],99905:["0","3","40","79","800","999"],99906:["0","2","30","59","70","89","90","94","600","699","950","999"],99908:["0","0","10","89","900","999"],99909:["0","3","40","94","950","999"],99910:["0","2","30","89","900","999"],99911:["00","59","600","999"],99912:["0","3","60","89","400","599","900","999"],99913:["0","2","30","35","600","604"],99914:["0","4","7","7","50","69","80","86","88","89","870","879","900","999"],99915:["0","4","50","79","800","999"],99916:["0","2","30","69","700","999"],99917:["0","2","30","88","890","999"],99919:["0","2","40","79","300","399","800","999"],99920:["0","4","50","89","900","999"],99921:["0","1","8","8","20","69","90","99","700","799"],99922:["0","3","40","69","700","999"],99925:["0","0","3","3","10","19","40","79","200","299","800","999"],99926:["0","0","10","59","87","89","90","99","600","869"],99927:["0","2","30","59","600","999"],99928:["0","0","10","79","800","999"],99932:["0","0","7","7","10","59","80","99","600","699"],99935:["0","2","7","8","30","59","90","99","600","699"],99936:["0","0","10","59","600","999"],99937:["0","1","20","59","600","999"],99938:["0","1","20","59","90","99","600","899"],99939:["0","2","30","59","60","89","900","999"],99940:["0","0","10","69","700","999"],99941:["0","2","30","79","800","999"],99945:["0","4","50","89","98","99","900","979"],99949:["0","1","8","8","20","79","99","99","900","989"],99953:["0","2","30","79","94","99","800","939"],99954:["0","2","30","69","88","99","700","879"],99955:["0","1","20","59","80","99","600","799"],99956:["00","59","86","99","600","859"],99957:["0","1","20","79","95","99","800","949"],99958:["0","4","50","93","940","949","950","999"],99960:["10","94","070","099","950","999"],99961:["0","2","37","89","300","369","900","999"],99963:["00","49","92","99","500","919"],99965:["0","2","36","62","300","359","630","999"],99966:["0","2","30","69","80","96","700","799","970","999"],99969:["0","4","50","79","95","99","800","949"],99971:["0","3","40","84","850","999"],99974:["0","0","10","25","40","63","65","79","260","399","640","649","800","999"],99976:["00","03","10","15","20","59","82","89","050","099","160","199","600","819","900","999"],99977:["0","1","40","69","700","799","975","999"],99978:["0","4","50","69","700","999"],99980:["0","0","30","64","700","999"],99981:["0","0","15","19","22","74","120","149","200","219","750","999"],99982:["0","2","50","71","885","999"],99983:["0","0","35","69","900","999"],99984:["0","0","50","69","950","999"],99985:["0","1","25","79","800","999"],99987:["700","999"],99988:["0","0","50","54","800","824"],99989:["0","1","50","79","900","999"],99990:["0","0","50","57","960","999"],99992:["0","1","50","64","950","999"],99993:["0","2","50","54","980","999"],99994:["0","0","50","52","985","999"],99995:["50","52","975","999"]},979:{10:["00","19","200","699","7000","8999","90000","97599","976000","999999"],11:["00","24","250","549","5500","8499","85000","94999","950000","999999"],12:["200","299","5450","5999","80000","84999","985000","999999"],13:["00","00","600","604","7000","7349","87500","89999","990000","999999"],8:["200","229","230","239","3000","3199","3200","3499","3500","8849","88500","89999","90000","90999","9850000","9899999","9900000","9929999","9985000","9999999"]}}; ranges['978']['99968']=ranges['978']['99912'];ranges['978']['9935']=ranges['978']['9941']=ranges['978']['9956']=ranges['978']['9933'];ranges['978']['9976']=ranges['978']['9971'];ranges['978']['99949']=ranges['978']['99903'];ranges['978']['9968']=ranges['978']['9930'];ranges['978']['99929']=ranges['978']['99930']=ranges['978']['99931']=ranges['978']['99942']=ranges['978']['99944']=ranges['978']['99948']=ranges['978']['99950']=ranges['978']['99952']=ranges['978']['99962']=ranges['978']['99969']=ranges['978']['99915'];ranges['978']['99917']=ranges['978']['99910'];ranges['978']['99920']=ranges['978']['99970']=ranges['978']['99972']=ranges['978']['99914'];ranges['978']['99933']=ranges['978']['99943']=ranges['978']['99946']=ranges['978']['99959']=ranges['978']['99927'];ranges['978']['81']=ranges['978']['80'];ranges['978']['9967']=ranges['978']['9970']=ranges['978']['9965'];ranges['978']['9936']=ranges['978']['9952']=ranges['978']['9954']=ranges['978']['9926'];ranges['978']['99965']=ranges['978']['99922'];ranges['978']['9928']=ranges['978']['9927'];ranges['978']['99947']=ranges['978']['99916'];ranges['978']['9985']=ranges['978']['9939'];ranges['978']['99918']=ranges['978']['99925']=ranges['978']['99973']=ranges['978']['99975']=ranges['978']['99905'];ranges['978']['99939']=ranges['978']['99945']=ranges['978']['99904'];ranges['978']['989']=ranges['978']['972'];ranges['978']['620']=ranges['978']['613'];ranges['978']['4']=ranges['978']['0'];ranges['978']['99923']=ranges['978']['99924']=ranges['978']['99934']=ranges['978']['99957']=ranges['978']['99964']=ranges['978']['9947'];ranges['978']['614']=ranges['978']['609'];ranges['978']['9948']=ranges['978']['9951']=ranges['978']['9932']; + ranges["978"]["614"]=ranges["978"]["609"],ranges["978"]["620"]=ranges["978"]["613"],ranges["978"]["9936"]=ranges["978"]["9952"]=ranges["978"]["9926"],ranges["978"]["9948"]=ranges["978"]["9932"],ranges["978"]["9956"]=ranges["978"]["9935"],ranges["978"]["9967"]=ranges["978"]["9970"]=ranges["978"]["9965"],ranges["978"]["9968"]=ranges["978"]["9930"],ranges["978"]["99918"]=ranges["978"]["99973"]=ranges["978"]["99979"]=ranges["978"]["99905"],ranges["978"]["99923"]=ranges["978"]["99924"]=ranges["978"]["99934"]=ranges["978"]["99964"]=ranges["978"]["9947"],ranges["978"]["99929"]=ranges["978"]["99930"]=ranges["978"]["99931"]=ranges["978"]["99942"]=ranges["978"]["99944"]=ranges["978"]["99948"]=ranges["978"]["99950"]=ranges["978"]["99952"]=ranges["978"]["99962"]=ranges["978"]["99915"],ranges["978"]["99933"]=ranges["978"]["99943"]=ranges["978"]["99946"]=ranges["978"]["99959"]=ranges["978"]["99927"],ranges["978"]["99947"]=ranges["978"]["99916"],ranges["978"]["99967"]=ranges["978"]["99936"],ranges["978"]["99968"]=ranges["978"]["99912"],ranges["978"]["99970"]=ranges["978"]["99972"]=ranges["978"]["99920"],ranges["978"]["99975"]=ranges["978"]["99919"],ranges["978"]["99986"]=ranges["978"]["99984"]; /* eslint-enable */ return ranges; })(); @@ -1183,6 +1183,38 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "search", + "input": { + "ISBN": "9798218450144" + }, + "items": [ + { + "itemType": "book", + "title": "A system for writing: how an unconventional approach to note-making can help you capture ideas, think wildly, and write constantly", + "creators": [ + { + "firstName": "Bob", + "lastName": "Doto", + "creatorType": "author" + } + ], + "date": "2024", + "ISBN": "9798218450144", + "edition": "First edition", + "extra": "OCLC: 1452662618", + "language": "eng", + "libraryCatalog": "Open WorldCat", + "place": "United States", + "publisher": "New Old Traditions", + "shortTitle": "A system for writing", + "attachments": [], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 43fce727d6044fada99707b890ec2302fe8a25ca Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Tue, 19 Nov 2024 13:08:45 -0500 Subject: [PATCH 139/158] PMC Hotfix (#3380) --- PubMed Central.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/PubMed Central.js b/PubMed Central.js index 8a8f3bb5b86..36edabfd49b 100644 --- a/PubMed Central.js +++ b/PubMed Central.js @@ -2,14 +2,14 @@ "translatorID": "27ee5b2c-2a5a-4afc-a0aa-d386642d4eed", "label": "PubMed Central", "creator": "Michael Berkowitz and Rintze Zelle", - "target": "^https://(www\\.)?ncbi\\.nlm\\.nih\\.gov/pmc", + "target": "^https://(www\\.)?(pmc\\.ncbi\\.nlm\\.nih\\.gov/|ncbi\\.nlm\\.nih\\.gov/pmc)", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2022-08-12 07:27:23" + "lastUpdated": "2024-10-28 02:40:59" } /* @@ -39,7 +39,7 @@ function detectWeb(doc, url) { // Make sure the page have a PMCID and we're on a valid item page, // or looking at a PDF if (getPMCID(url) && (url.includes(".pdf") - || doc.getElementsByClassName('fm-ids').length)) { + || doc.getElementsByClassName('pmc-header').length)) { return "journalArticle"; } @@ -70,10 +70,11 @@ function doWeb(doc, url) { var pdf = getPDF(doc, '//td[@class="format-menu"]//a[contains(@href,".pdf")]' + '|//div[@class="format-menu"]//a[contains(@href,".pdf")]' + '|//aside[@id="jr-alt-p"]/div/a[contains(@href,".pdf")]' - + '|//li[contains(@class, "pdf-link")]/a'); + + '|//li[contains(@class, "pdf-link")]/a' + + '|//a[contains(@data-ga-label, "pdf_download_")]'); // Z.debug(pdf); // if we're looking at a pdf, just use the current url - if (!pdf && url.search(/\/pdf\/.+.pdf/) != -1) { + if (!pdf && /\/pdf\/.+.pdf/.test(url)) { pdf = url; } var pdfCollection = {}; @@ -350,11 +351,6 @@ var testCases = [ "url": "https://www.ncbi.nlm.nih.gov/pmc/?term=anger", "items": "multiple" }, - { - "type": "web", - "url": "https://www.ncbi.nlm.nih.gov/pmc/issues/184700/", - "items": "multiple" - }, { "type": "web", "url": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3139813/?report=classic", From bdb36008ba644d65661fdd67347a403b4aebdc29 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 19 Nov 2024 15:53:25 -0500 Subject: [PATCH 140/158] APS: Update for site changes Fixes #3388 --- APS.js | 236 ++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 156 insertions(+), 80 deletions(-) diff --git a/APS.js b/APS.js index 2d0470c6741..f8f46b40385 100644 --- a/APS.js +++ b/APS.js @@ -1,7 +1,7 @@ { "translatorID": "2c310a37-a4dd-48d2-82c9-bd29c53c1c76", "label": "APS", - "creator": "Aurimas Vinckevicius", + "creator": "Aurimas Vinckevicius and Abe Jellinek", "target": "^https?://journals\\.aps\\.org/([^/]+/(abstract|supplemental|references|cited-by|issues)/|search(\\?|/))", "minVersion": "3.0.12", "maxVersion": "", @@ -9,24 +9,52 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2017-01-14 21:44:41" + "lastUpdated": "2024-11-19 20:53:18" } +/* + ***** BEGIN LICENSE BLOCK ***** + + Copyright © 2024 Aurimas Vinckevicius and 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 detectWeb(doc, url) { - var title = doc.getElementById('title'); - if (title && ZU.xpath(title, './/a[@id="export-article-link"]').length) { + if (doc.querySelector('#article-body #export-article-dialog') + || doc.querySelector('main#main') && /^\/[^/]+\/(abstract|supplemental|references|cited-by)\//.test(new URL(url).pathname)) { return "journalArticle"; - } else if (getSearchResults(doc, true)){ + } + else if (getSearchResults(doc, true)) { return "multiple"; } + return false; } function getSearchResults(doc, checkOnly) { var items = {}; var found = false; - var rows = ZU.xpath(doc, '//div[contains(@class, "search-results")]//div[contains(@class, "row")]//h5/a'); - for (var i=0; i a'); + if (!rows.length) { + rows = doc.querySelectorAll('#search-main h3 > a'); + } + for (var i = 0; i < rows.length; i++) { var href = rows[i].href; var title = ZU.trimInternal(cleanMath(rows[i].textContent)); if (!href || !title) continue; @@ -42,7 +70,7 @@ function doWeb(doc, url) { if (detectWeb(doc, url) == "multiple") { Zotero.selectItems(getSearchResults(doc, false), function (items) { if (!items) { - return true; + return; } var articles = []; for (var i in items) { @@ -50,7 +78,8 @@ function doWeb(doc, url) { } ZU.processDocuments(articles, scrape); }); - } else { + } + else { scrape(doc, url); } } @@ -58,13 +87,13 @@ function doWeb(doc, url) { // Extension to mimeType mapping var suppTypeMap = { - 'pdf': 'application/pdf', - 'zip': 'application/zip', - 'doc': 'application/msword', - 'docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'xls': 'application/vnd.ms-excel', - 'xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'mov': 'video/quicktime' + pdf: 'application/pdf', + zip: 'application/zip', + doc: 'application/msword', + docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + xls: 'application/vnd.ms-excel', + xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + mov: 'video/quicktime' }; var dontDownload = [ @@ -75,20 +104,20 @@ var dontDownload = [ function scrape(doc, url) { url = url.replace(/[?#].*/, ''); - if (url.indexOf('/abstract/') == -1) { + if (!url.includes('/abstract/')) { // Go to Abstract page first so we can scrape the abstract url = url.replace(/\/(?:supplemental|references|cited-by)\//, '/abstract/'); - if (url.indexOf('/abstract/') == -1) { + if (!url.includes('/abstract/')) { Zotero.debug('Unrecognized URL ' + url); return; } - ZU.processDocuments(url, function(doc, url) { - if (url.indexOf('/abstract/') == -1) { + ZU.processDocuments(url, function (doc, url) { + if (!url.includes('/abstract/')) { Zotero.debug('Redirected when trying to go to abstract page. ' + url); return; } - scrape(doc, url) + scrape(doc, url); }); return; } @@ -97,26 +126,23 @@ function scrape(doc, url) { // fetch RIS var risUrl = url.replace('{REPLACE}', 'export') - + '?type=ris&download=true'; - ZU.doGet(risUrl, function(text) { - text = text.replace(/^ID\s+-\s+/mg, 'DO - '); + + '?type=ris&download=true'; + ZU.doGet(risUrl, function (risText) { + risText = risText.replace(/^ID\s+-\s+/mg, 'DO - '); var trans = Zotero.loadTranslator('import'); trans.setTranslator('32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7'); //RIS - trans.setString(text); - trans.setHandler('itemDone', function(obj, item) { + trans.setString(risText); + trans.setHandler('itemDone', function (obj, item) { // scrape abstract from page item.abstractNote = ZU.trimInternal(cleanMath( - ZU.xpathText(doc, '//section[contains(@class,"abstract")]/div[@class="content"]/p[1]') + text(doc, '#abstract-section-content') )); - // attach PDF - if (ZU.xpath(doc, '//div[@class="article-nav-actions"]/a[contains(text(), "PDF")]').length) { - item.attachments.push({ - title: 'Full Text PDF', - url: url.replace('{REPLACE}', 'pdf'), - mimeType: 'application/pdf' - }); - } + item.attachments.push({ + title: 'Full Text PDF', + url: url.replace('{REPLACE}', 'pdf'), + mimeType: 'application/pdf' + }); item.attachments.push({ title: "APS Snapshot", @@ -124,38 +150,37 @@ function scrape(doc, url) { }); if (Z.getHiddenPref && Z.getHiddenPref('attachSupplementary')) { - ZU.processDocuments(url.replace('{REPLACE}', 'supplemental'), function(doc) { - try { - var asLink = Z.getHiddenPref('supplementaryAsLink'); - var suppFiles = doc.getElementsByClassName('supplemental-file'); - for (var i=0; i]*>.*?<\/\1>/g, ''); } + /** BEGIN TEST CASES **/ var testCases = [ { @@ -186,9 +212,9 @@ var testCases = [ "creatorType": "author" } ], - "date": "October 21, 2011", + "date": "2011-10-21", "DOI": "10.1103/PhysRevD.84.077701", - "abstractNote": "We reconsider Higgs boson invisible decays into Dark Matter in the light of recent Higgs searches at the LHC. Present hints in the Compact Muon Solenoid and ATLAS data favor a nonstandard Higgs boson with approximately 50% invisible branching ratio, and mass around 143 GeV. This situation can be realized within the simplest thermal scalar singlet Dark Matter model, predicting a Dark Matter mass around 50 GeV and direct detection cross section just below present bound. The present runs of the Xenon100 and LHC experiments can test this possibility.", + "abstractNote": "We reconsider Higgs boson invisible decays into Dark Matter in the light of recent Higgs searches at the LHC. Present hints in the Compact Muon Solenoid and ATLAS data favor a nonstandard Higgs boson with approximately 50% invisible branching ratio, and mass around 143 GeV. This situation can be realized within the simplest thermal scalar singlet Dark Matter model, predicting a Dark Matter mass around 50 GeV and direct detection cross section just below present bound. The present runs of the Xenon100 and LHC experiments can test this possibility. locked icon locked icon locked icon locked icon", "issue": "7", "journalAbbreviation": "Phys. Rev. D", "libraryCatalog": "APS", @@ -202,7 +228,8 @@ var testCases = [ "mimeType": "application/pdf" }, { - "title": "APS Snapshot" + "title": "APS Snapshot", + "mimeType": "text/html" } ], "tags": [], @@ -260,9 +287,9 @@ var testCases = [ "creatorType": "author" } ], - "date": "March 4, 2015", + "date": "2015-03-04", "DOI": "10.1103/PhysRevLett.114.098105", - "abstractNote": "Cellular aggregates (spheroids) are widely used in biophysics and tissue engineering as model systems for biological tissues. In this Letter we propose novel methods for molding stem-cell spheroids, deforming them, and measuring their interfacial and elastic properties with a single method based on cell tagging with magnetic nanoparticles and application of a magnetic field gradient. Magnetic molding yields spheroids of unprecedented sizes (up to a few mm in diameter) and preserves tissue integrity. On subjecting these spheroids to magnetic flattening (over 150g), we observed a size-dependent elastocapillary transition with two modes of deformation: liquid-drop-like behavior for small spheroids, and elastic-sphere-like behavior for larger spheroids, followed by relaxation to a liquidlike drop.", + "abstractNote": "Cellular aggregates (spheroids) are widely used in biophysics and tissue engineering as model systems for biological tissues. In this Letter we propose novel methods for molding stem-cell spheroids, deforming them, and measuring their interfacial and elastic properties with a single method based on cell tagging with magnetic nanoparticles and application of a magnetic field gradient. Magnetic molding yields spheroids of unprecedented sizes (up to a few mm in diameter) and preserves tissue integrity. On subjecting these spheroids to magnetic flattening (over ), we observed a size-dependent elastocapillary transition with two modes of deformation: liquid-drop-like behavior for small spheroids, and elastic-sphere-like behavior for larger spheroids, followed by relaxation to a liquidlike drop. locked icon locked icon locked icon locked icon locked icon locked icon", "issue": "9", "journalAbbreviation": "Phys. Rev. Lett.", "libraryCatalog": "APS", @@ -276,7 +303,8 @@ var testCases = [ "mimeType": "application/pdf" }, { - "title": "APS Snapshot" + "title": "APS Snapshot", + "mimeType": "text/html" } ], "tags": [], @@ -319,9 +347,9 @@ var testCases = [ "creatorType": "author" } ], - "date": "March 17, 2015", + "date": "2015-03-17", "DOI": "10.1103/PhysRevX.5.011029", - "abstractNote": "Based on first-principle calculations, we show that a family of nonmagnetic materials including TaAs, TaP, NbAs, and NbP are Weyl semimetals (WSM) without inversion centers. We find twelve pairs of Weyl points in the whole Brillouin zone (BZ) for each of them. In the absence of spin-orbit coupling (SOC), band inversions in mirror-invariant planes lead to gapless nodal rings in the energy-momentum dispersion. The strong SOC in these materials then opens full gaps in the mirror planes, generating nonzero mirror Chern numbers and Weyl points off the mirror planes. The resulting surface-state Fermi arc structures on both (001) and (100) surfaces are also obtained, and they show interesting shapes, pointing to fascinating playgrounds for future experimental studies.", + "abstractNote": "Based on first-principle calculations, we show that a family of nonmagnetic materials including TaAs, TaP, NbAs, and NbP are Weyl semimetals (WSM) without inversion centers. We find twelve pairs of Weyl points in the whole Brillouin zone (BZ) for each of them. In the absence of spin-orbit coupling (SOC), band inversions in mirror-invariant planes lead to gapless nodal rings in the energy-momentum dispersion. The strong SOC in these materials then opens full gaps in the mirror planes, generating nonzero mirror Chern numbers and Weyl points off the mirror planes. The resulting surface-state Fermi arc structures on both (001) and (100) surfaces are also obtained, and they show interesting shapes, pointing to fascinating playgrounds for future experimental studies.This article is available under the terms of the Creative Commons Attribution 3.0 License. Further distribution of this work must maintain attribution to the author(s) and the published article’s title, journal citation, and DOI.", "issue": "1", "journalAbbreviation": "Phys. Rev. X", "libraryCatalog": "APS", @@ -335,7 +363,8 @@ var testCases = [ "mimeType": "application/pdf" }, { - "title": "APS Snapshot" + "title": "APS Snapshot", + "mimeType": "text/html" } ], "tags": [], @@ -378,9 +407,9 @@ var testCases = [ "creatorType": "author" } ], - "date": "March 17, 2015", + "date": "2015-03-17", "DOI": "10.1103/PhysRevX.5.011029", - "abstractNote": "Based on first-principle calculations, we show that a family of nonmagnetic materials including TaAs, TaP, NbAs, and NbP are Weyl semimetals (WSM) without inversion centers. We find twelve pairs of Weyl points in the whole Brillouin zone (BZ) for each of them. In the absence of spin-orbit coupling (SOC), band inversions in mirror-invariant planes lead to gapless nodal rings in the energy-momentum dispersion. The strong SOC in these materials then opens full gaps in the mirror planes, generating nonzero mirror Chern numbers and Weyl points off the mirror planes. The resulting surface-state Fermi arc structures on both (001) and (100) surfaces are also obtained, and they show interesting shapes, pointing to fascinating playgrounds for future experimental studies.", + "abstractNote": "Based on first-principle calculations, we show that a family of nonmagnetic materials including TaAs, TaP, NbAs, and NbP are Weyl semimetals (WSM) without inversion centers. We find twelve pairs of Weyl points in the whole Brillouin zone (BZ) for each of them. In the absence of spin-orbit coupling (SOC), band inversions in mirror-invariant planes lead to gapless nodal rings in the energy-momentum dispersion. The strong SOC in these materials then opens full gaps in the mirror planes, generating nonzero mirror Chern numbers and Weyl points off the mirror planes. The resulting surface-state Fermi arc structures on both (001) and (100) surfaces are also obtained, and they show interesting shapes, pointing to fascinating playgrounds for future experimental studies.This article is available under the terms of the Creative Commons Attribution 3.0 License. Further distribution of this work must maintain attribution to the author(s) and the published article’s title, journal citation, and DOI.", "issue": "1", "journalAbbreviation": "Phys. Rev. X", "libraryCatalog": "APS", @@ -394,7 +423,8 @@ var testCases = [ "mimeType": "application/pdf" }, { - "title": "APS Snapshot" + "title": "APS Snapshot", + "mimeType": "text/html" } ], "tags": [], @@ -437,9 +467,9 @@ var testCases = [ "creatorType": "author" } ], - "date": "January 20, 2015", + "date": "2015-01-20", "DOI": "10.1103/PhysRevX.5.011003", - "abstractNote": "We report on a stringent test of the nonclassicality of the motion of a massive quantum particle, which propagates on a discrete lattice. Measuring temporal correlations of the position of single atoms performing a quantum walk, we observe a 6σ violation of the Leggett-Garg inequality. Our results rigorously excludes (i.e., falsifies) any explanation of quantum transport based on classical, well-defined trajectories. We use so-called ideal negative measurements—an essential requisite for any genuine Leggett-Garg test—to acquire information about the atom’s position, yet avoiding any direct interaction with it. The interaction-free measurement is based on a novel atom transport system, which allows us to directly probe the absence rather than the presence of atoms at a chosen lattice site. Beyond the fundamental aspect of this test, we demonstrate the application of the Leggett-Garg correlation function as a witness of quantum superposition. Here, we employ the witness to discriminate different types of walks spanning from merely classical to wholly quantum dynamics.", + "abstractNote": "We report on a stringent test of the nonclassicality of the motion of a massive quantum particle, which propagates on a discrete lattice. Measuring temporal correlations of the position of single atoms performing a quantum walk, we observe a 6σ violation of the Leggett-Garg inequality. Our results rigorously excludes (i.e., falsifies) any explanation of quantum transport based on classical, well-defined trajectories. We use so-called ideal negative measurements—an essential requisite for any genuine Leggett-Garg test—to acquire information about the atom’s position, yet avoiding any direct interaction with it. The interaction-free measurement is based on a novel atom transport system, which allows us to directly probe the absence rather than the presence of atoms at a chosen lattice site. Beyond the fundamental aspect of this test, we demonstrate the application of the Leggett-Garg correlation function as a witness of quantum superposition. Here, we employ the witness to discriminate different types of walks spanning from merely classical to wholly quantum dynamics.This article is available under the terms of the Creative Commons Attribution 3.0 License. Further distribution of this work must maintain attribution to the author(s) and the published article’s title, journal citation, and DOI.", "issue": "1", "journalAbbreviation": "Phys. Rev. X", "libraryCatalog": "APS", @@ -453,7 +483,53 @@ var testCases = [ "mimeType": "application/pdf" }, { - "title": "APS Snapshot" + "title": "APS Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://journals.aps.org/pra/abstract/10.1103/PhysRevA.65.032314", + "items": [ + { + "itemType": "journalArticle", + "title": "Computable measure of entanglement", + "creators": [ + { + "lastName": "Vidal", + "firstName": "G.", + "creatorType": "author" + }, + { + "lastName": "Werner", + "firstName": "R. F.", + "creatorType": "author" + } + ], + "date": "2002-02-22", + "DOI": "10.1103/PhysRevA.65.032314", + "abstractNote": "We present a measure of entanglement that can be computed effectively for any mixed state of an arbitrary bipartite system. We show that it does not increase under local manipulations of the system, and use it to obtain a bound on the teleportation capacity and on the distillable entanglement of mixed states.", + "issue": "3", + "journalAbbreviation": "Phys. Rev. A", + "libraryCatalog": "APS", + "pages": "032314", + "publicationTitle": "Physical Review A", + "url": "https://link.aps.org/doi/10.1103/PhysRevA.65.032314", + "volume": "65", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + }, + { + "title": "APS Snapshot", + "mimeType": "text/html" } ], "tags": [], @@ -463,4 +539,4 @@ var testCases = [ ] } ] -/** END TEST CASES **/ \ No newline at end of file +/** END TEST CASES **/ From 552b3dc129b50dd11a08789e4ed4a4dcdf166a0c Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 20 Nov 2024 10:43:17 -0500 Subject: [PATCH 141/158] Cambridge Core: Fix book PDFs Closes #3382 --- Cambridge Core.js | 54 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/Cambridge Core.js b/Cambridge Core.js index 4e63a7e34e3..20814ec8be6 100644 --- a/Cambridge Core.js +++ b/Cambridge Core.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-02-17 18:58:43" + "lastUpdated": "2024-11-20 15:43:05" } /* @@ -108,6 +108,9 @@ async function scrape(doc, url = doc.location.href) { var pdfURL = ZU.xpathText(doc, '//meta[contains(@name, "citation_pdf_url")]/@content' ); + if (!pdfURL) { + pdfURL = attr(doc, '.actions a[target="_blank"][href*=".pdf"]', 'href'); + } // Z.debug("pdfURL: " + pdfURL); var text = await requestText(risURL); var translator = Zotero.loadTranslator( @@ -524,7 +527,54 @@ var testCases = [ "type": "web", "url": "https://www.cambridge.org/core/journals/american-political-science-review/firstview", "items": "multiple" + }, + { + "type": "web", + "url": "https://www.cambridge.org/core/books/foundations-of-probabilistic-programming/819623B1B5B33836476618AC0621F0EE", + "items": [ + { + "itemType": "book", + "title": "Foundations of Probabilistic Programming", + "creators": [ + { + "lastName": "Barthe", + "firstName": "Gilles", + "creatorType": "editor" + }, + { + "lastName": "Katoen", + "firstName": "Joost-Pieter", + "creatorType": "editor" + }, + { + "lastName": "Silva", + "firstName": "Alexandra", + "creatorType": "editor" + } + ], + "date": "2020", + "ISBN": "9781108488518", + "abstractNote": "What does a probabilistic program actually compute? How can one formally reason about such probabilistic programs? This valuable guide covers such elementary questions and more. It provides a state-of-the-art overview of the theoretical underpinnings of modern probabilistic programming and their applications in machine learning, security, and other domains, at a level suitable for graduate students and non-experts in the field. In addition, the book treats the connection between probabilistic programs and mathematical logic, security (what is the probability that software leaks confidential information?), and presents three programming languages for different applications: Excel tables, program testing, and approximate computing. This title is also available as Open Access on Cambridge Core.", + "extra": "DOI: 10.1017/9781108770750", + "libraryCatalog": "Cambridge University Press", + "place": "Cambridge", + "publisher": "Cambridge University Press", + "url": "https://www.cambridge.org/core/books/foundations-of-probabilistic-programming/819623B1B5B33836476618AC0621F0EE", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + }, + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] - /** END TEST CASES **/ From 5c77d6977d7f82f3cff4ef4cd724b789c40726e2 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 20 Nov 2024 11:01:36 -0500 Subject: [PATCH 142/158] AustLII: Get court abbreviation from URL, support classic view Fixes #3389 --- AustLII and NZLII.js | 91 ++++++++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 37 deletions(-) diff --git a/AustLII and NZLII.js b/AustLII and NZLII.js index 0ef4dcae009..3c4a79ed314 100644 --- a/AustLII and NZLII.js +++ b/AustLII and NZLII.js @@ -2,14 +2,14 @@ "translatorID": "5ed5ab01-899f-4a3b-a74c-290fb2a1c9a4", "label": "AustLII and NZLII", "creator": "Justin Warren, Philipp Zumstein", - "target": "^https?://www\\d?\\.(austlii\\.edu\\.au|nzlii\\.org)", + "target": "^https?://(www\\d?|classic)\\.(austlii\\.edu\\.au|nzlii\\.org)", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2023-08-03 04:51:32" + "lastUpdated": "2024-11-20 16:01:22" } /* @@ -53,6 +53,9 @@ function detectWeb(doc, url) { if (url.includes('austlii.edu.au/cgi-bin/sinodisp/au/cases/') && url.includes('.html')) { return "case"; } + if (url.includes('classic.austlii.edu.au') && url.includes('.html')) { + return "case"; + } if (getSearchResults(doc, true)) { return "multiple"; } @@ -77,43 +80,25 @@ function getSearchResults(doc, checkOnly) { } -function doWeb(doc, url) { - var type = detectWeb(doc, url); - if (type == "multiple") { - Zotero.selectItems(getSearchResults(doc, false), function (items) { - if (!items) { - return true; - } - var articles = []; - for (var i in items) { - articles.push(i); - } - ZU.processDocuments(articles, scrape); - return true; +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)) { + scrape(await requestDocument(url), url); } - ); + } + else if (new URL(url).hostname === 'classic.austlii.edu.au') { + let urlObj = new URL(url); + urlObj.hostname = 'www.austlii.edu.au'; + url = urlObj.toString(); + scrape(await requestDocument(url), url); } else { scrape(doc, url); } - return false; } -/* - * Convert full court names to standard abbreviations. - * If the name of the court is in the map, return the abbreviation - * else return the original full name (i.e. leave it unchanged) - * The Australian Guide to Legal Citation covers this in Rule 2.2.3 - * legal Reports in Appendix A, but I've not been able to locate - * a copy with the appendix intact yet. -*/ -var courtAbbrev = { - "Federal Court of Australia": "FCA", - "High Court of Australia": "HCA", - "Family Court of Australia": "FamCA", - "Australian Information Commissioner": "AICmr" -}; - /* * Adjust some jurisdiction abbreviations */ @@ -169,8 +154,8 @@ function parseActName(nameOfAct) { function scrape(doc, url) { var type = detectWeb(doc, url); var newItem = new Zotero.Item(type); - var full_jurisdiction = text(doc, 'li.ribbon-jurisdiction>a>span'); - var jurisdiction = jurisdictionAbbrev[full_jurisdiction] || full_jurisdiction; + var fullJurisdiction = text(doc, 'li.ribbon-jurisdiction > a > span'); + var jurisdiction = jurisdictionAbbrev[fullJurisdiction] || fullJurisdiction; if (jurisdiction) { newItem.code = jurisdiction; } @@ -192,8 +177,14 @@ function scrape(doc, url) { else { newItem.dateDecided = text(doc, 'li.ribbon-year>a>span'); } - var full_court = text(doc, 'li.ribbon-database>a>span'); - newItem.court = courtAbbrev[full_court] || full_court; + var courtAbbrevInURL = url.match(/\/cases\/[^/]+\/([^/]+)\//); + if (courtAbbrevInURL) { + newItem.court = decodeURIComponent(courtAbbrevInURL[1]); + } + else { + // Full court name + newItem.court = text(doc, 'li.ribbon-database > a > span'); + } if (citation) { var lastNumber = citation.match(/(\d+)$/); if (lastNumber) { @@ -245,7 +236,9 @@ function scrape(doc, url) { } } - newItem.url = url; + newItem.url = url + .replace(/^http:\/\//, 'https://') + .replace(/^(https:\/\/www)\d/, '$1'); newItem.attachments = [{ document: doc, title: "Snapshot", @@ -585,6 +578,30 @@ var testCases = [ "seeAlso": [] } ] + }, + { + "type": "web", + "url": "https://www8.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/FedCFamC1A/2024/214.html", + "items": [ + { + "itemType": "case", + "caseName": "Dimitrova & Carman", + "creators": [], + "dateDecided": "2024-11-15", + "court": "FedCFamC1A", + "docketNumber": "214", + "url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/FedCFamC1A/2024/214.html", + "attachments": [ + { + "title": "Snapshot", + "mimeType": "text/html" + } + ], + "tags": [], + "notes": [], + "seeAlso": [] + } + ] } ] /** END TEST CASES **/ From 75b2eb9ad8e7cbc924f3e6f2472e6ec0a0476347 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 20 Nov 2024 11:03:59 -0500 Subject: [PATCH 143/158] AustLII: Update tests --- AustLII and NZLII.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/AustLII and NZLII.js b/AustLII and NZLII.js index 3c4a79ed314..a0cdf8f36da 100644 --- a/AustLII and NZLII.js +++ b/AustLII and NZLII.js @@ -258,10 +258,9 @@ var testCases = [ "caseName": "C & M", "creators": [], "dateDecided": "2006-01-20", - "code": "Cth", "court": "FamCA", "docketNumber": "212", - "url": "http://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/FamCA/2006/212.html", + "url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/FamCA/2006/212.html", "attachments": [ { "title": "Snapshot", @@ -283,10 +282,9 @@ var testCases = [ "caseName": "Yeo, in the matter of AES Services (Aust) Pty Ltd (ACN 111 306 543) (Administrators Appointed)", "creators": [], "dateDecided": "2010-01-05", - "code": "Cth", "court": "FCA", "docketNumber": "1", - "url": "http://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/FCA/2010/1.html", + "url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/FCA/2010/1.html", "attachments": [ { "title": "Snapshot", @@ -310,7 +308,7 @@ var testCases = [ "dateDecided": "2008-02-08", "court": "NZSC", "docketNumber": "1", - "url": "http://www.nzlii.org/nz/cases/NZSC/2008/1.html", + "url": "https://www.nzlii.org/nz/cases/NZSC/2008/1.html", "attachments": [ { "title": "Snapshot", @@ -337,10 +335,9 @@ var testCases = [ "caseName": "'NM' and Department of Human Services (Freedom of information)", "creators": [], "dateDecided": "2017-12-08", - "code": "Cth", "court": "AICmr", "docketNumber": "134", - "url": "http://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/AICmr/2017/134.html", + "url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/AICmr/2017/134.html", "attachments": [ { "title": "Snapshot", @@ -364,7 +361,7 @@ var testCases = [ "dateEnacted": "1982", "code": "Cth", "section": "24AB", - "url": "http://www.austlii.edu.au/cgi-bin/viewdoc/au/legis/cth/consol_act/foia1982222/s24ab.html", + "url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/legis/cth/consol_act/foia1982222/s24ab.html", "attachments": [ { "title": "Snapshot", @@ -387,7 +384,7 @@ var testCases = [ "creators": [], "dateEnacted": "1982", "code": "Cth", - "url": "http://www.austlii.edu.au/cgi-bin/viewdb/au/legis/cth/consol_act/foia1982222/", + "url": "https://www.austlii.edu.au/cgi-bin/viewdb/au/legis/cth/consol_act/foia1982222/", "attachments": [ { "title": "Snapshot", @@ -468,7 +465,7 @@ var testCases = [ "date": "2010", "libraryCatalog": "AustLII and NZLII", "publicationTitle": "Administrative Review Council - Admin Review", - "url": "http://www.austlii.edu.au/cgi-bin/viewdoc/au/journals/AdminRw//2010/9.html", + "url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/journals/AdminRw//2010/9.html", "attachments": [ { "title": "Snapshot", @@ -488,7 +485,7 @@ var testCases = [ }, { "type": "web", - "url": "http://www.austlii.edu.au/cgi-bin/sinodisp/au/cases/cth/AICmr/2017/20.html", + "url": "http://www6.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/AICmr/2017/20.html", "items": [ { "itemType": "case", @@ -497,7 +494,7 @@ var testCases = [ "dateDecided": "2017-03-10", "court": "AICmr", "docketNumber": "20", - "url": "http://www8.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/AICmr/2017/20.html", + "url": "https://www.austlii.edu.au/cgi-bin/viewdoc/au/cases/cth/AICmr/2017/20.html", "attachments": [ { "title": "Snapshot", From 912c514fef81994a10c90431ef6eda066083622e Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 21 Nov 2024 11:46:35 -0500 Subject: [PATCH 144/158] Clarify issue reporting --- .github/ISSUE_TEMPLATE/config.yml | 5 +++++ .github/{ISSUE_TEMPLATE.MD => ISSUE_TEMPLATE/template.md} | 0 2 files changed, 5 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml rename .github/{ISSUE_TEMPLATE.MD => ISSUE_TEMPLATE/template.md} (100%) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000000..cc1b52af17d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Post all translator issues and requests to the Zotero Forums. + url: https://forums.zotero.org/post/discussion + about: Do not use GitHub Issues to report problems saving pages or to request a new translator. Make a forum post. Zotero developers will create new issues in the relevant repositories. diff --git a/.github/ISSUE_TEMPLATE.MD b/.github/ISSUE_TEMPLATE/template.md similarity index 100% rename from .github/ISSUE_TEMPLATE.MD rename to .github/ISSUE_TEMPLATE/template.md From 6c34a311d008d46583c3a59c6067e6b6e64649d6 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 21 Nov 2024 11:50:42 -0500 Subject: [PATCH 145/158] Allow issues again? --- .github/ISSUE_TEMPLATE/template.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/template.md b/.github/ISSUE_TEMPLATE/template.md index d793edabb8f..47207077adb 100644 --- a/.github/ISSUE_TEMPLATE/template.md +++ b/.github/ISSUE_TEMPLATE/template.md @@ -1,3 +1,8 @@ +--- +name: Report confirmed issue with details +about: If you’re sure you’ve identified a bug in a specific Zotero translator and can provide technical details, you can open an issue here. +--- + **READ THIS BEFORE CREATING AN ISSUE** Zotero generally does not use GitHub Issues for bug reports or feature requests regarding Zotero software. From 21a45ca590a98f7016abca2124a927254389b77c Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 21 Nov 2024 11:53:49 -0500 Subject: [PATCH 146/158] Wording --- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/ISSUE_TEMPLATE/template.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index cc1b52af17d..5aca3a9a488 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - - name: Post all translator issues and requests to the Zotero Forums. + - name: "ALL translator issues and requests: Post to the Zotero Forums" url: https://forums.zotero.org/post/discussion about: Do not use GitHub Issues to report problems saving pages or to request a new translator. Make a forum post. Zotero developers will create new issues in the relevant repositories. diff --git a/.github/ISSUE_TEMPLATE/template.md b/.github/ISSUE_TEMPLATE/template.md index 47207077adb..2cfd6a43eb2 100644 --- a/.github/ISSUE_TEMPLATE/template.md +++ b/.github/ISSUE_TEMPLATE/template.md @@ -1,5 +1,5 @@ --- -name: Report confirmed issue with details +name: Report confirmed bug with technical details about: If you’re sure you’ve identified a bug in a specific Zotero translator and can provide technical details, you can open an issue here. --- From 6696be6cc2c36d2f47c87ea4ad730906effb2810 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 21 Nov 2024 12:51:46 -0500 Subject: [PATCH 147/158] arXiv: Always add DOI (#3390) --- arXiv.org.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arXiv.org.js b/arXiv.org.js index 89d5b5fa4b7..4ea679a4850 100644 --- a/arXiv.org.js +++ b/arXiv.org.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 12, "browserSupport": "gcsibv", - "lastUpdated": "2024-10-22 16:12:31" + "lastUpdated": "2024-11-20 15:37:18" } /* @@ -234,8 +234,7 @@ const arXivCategories = { }; var version; -var arxivDOI; -// these variables will be set in doWeb and +// this variable will be set in doWeb and // can be used then afterwards in the parseXML function detectSearch(item) { @@ -334,7 +333,6 @@ async function doWeb(doc, url) { if (versionMatch) { version = versionMatch[1]; } - arxivDOI = text(doc, '.arxivdoi > a'); if (!id) { // Honestly not sure where this might still be needed id = text(doc, 'span.arxivid > a'); @@ -419,7 +417,7 @@ function parseSingleEntry(entry) { // retrieve and supplement publication data for published articles via DOI if (newItem.DOI) { var translate = Zotero.loadTranslator("search"); - // CrossRef + // DOI Content Negotiation translate.setTranslator("b28d0d42-8549-4c6d-83fc-8382874a5cb9"); var item = { itemType: "journalArticle", DOI: newItem.DOI }; @@ -449,7 +447,8 @@ function parseSingleEntry(entry) { if (version) { newItem.extra += '\nversion: ' + version; } - if (arxivDOI) newItem.DOI = ZU.cleanDOI(arxivDOI); + // https://blog.arxiv.org/2022/02/17/new-arxiv-articles-are-now-automatically-assigned-dois/ + newItem.DOI = "10.48550/arXiv." + articleID; newItem.archiveID = "arXiv:" + articleID; newItem.complete(); } @@ -717,6 +716,7 @@ var testCases = [ } ], "date": "2014-02-06", + "DOI": "10.48550/arXiv.1402.1516", "abstractNote": "We construct a dual pair associated to the Hamiltonian geometric formulation of perfect fluids with free boundaries. This dual pair is defined on the cotangent bundle of the space of volume preserving embeddings of a manifold with boundary into a boundaryless manifold of the same dimension. The dual pair properties are rigorously verified in the infinite dimensional Fr\\'echet manifold setting. It provides an example of a dual pair associated to actions that are not completely mutually orthogonal.", "archiveID": "arXiv:1402.1516", "extra": "arXiv:1402.1516 [math]", @@ -984,6 +984,7 @@ var testCases = [ } ], "date": "2002-11-11", + "DOI": "10.48550/arXiv.math/0211159", "abstractNote": "We present a monotonic expression for the Ricci flow, valid in all dimensions and without curvature assumptions. It is interpreted as an entropy for a certain canonical ensemble. Several geometric applications are given. In particular, (1) Ricci flow, considered on the space of riemannian metrics modulo diffeomorphism and scaling, has no nontrivial periodic orbits (that is, other than fixed points); (2) In a region, where singularity is forming in finite time, the injectivity radius is controlled by the curvature; (3) Ricci flow can not quickly turn an almost euclidean region into a very curved one, no matter what happens far away. We also verify several assertions related to Richard Hamilton's program for the proof of Thurston geometrization conjecture for closed three-manifolds, and give a sketch of an eclectic proof of this conjecture, making use of earlier results on collapsing with local lower curvature bound.", "archiveID": "arXiv:math/0211159", "extra": "arXiv:math/0211159", From 60cf8861956ef99b507625c4a7c71cef95005b4d Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 21 Nov 2024 13:50:17 -0500 Subject: [PATCH 148/158] APS: Only pull text from abstract https://forums.zotero.org/discussion/comment/479783/#Comment_479783 --- APS.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/APS.js b/APS.js index f8f46b40385..87175a5be9e 100644 --- a/APS.js +++ b/APS.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-11-19 20:53:18" + "lastUpdated": "2024-11-21 18:50:09" } /* @@ -135,7 +135,7 @@ function scrape(doc, url) { trans.setHandler('itemDone', function (obj, item) { // scrape abstract from page item.abstractNote = ZU.trimInternal(cleanMath( - text(doc, '#abstract-section-content') + text(doc, '#abstract-section-content p') )); item.attachments.push({ @@ -214,7 +214,7 @@ var testCases = [ ], "date": "2011-10-21", "DOI": "10.1103/PhysRevD.84.077701", - "abstractNote": "We reconsider Higgs boson invisible decays into Dark Matter in the light of recent Higgs searches at the LHC. Present hints in the Compact Muon Solenoid and ATLAS data favor a nonstandard Higgs boson with approximately 50% invisible branching ratio, and mass around 143 GeV. This situation can be realized within the simplest thermal scalar singlet Dark Matter model, predicting a Dark Matter mass around 50 GeV and direct detection cross section just below present bound. The present runs of the Xenon100 and LHC experiments can test this possibility. locked icon locked icon locked icon locked icon", + "abstractNote": "We reconsider Higgs boson invisible decays into Dark Matter in the light of recent Higgs searches at the LHC. Present hints in the Compact Muon Solenoid and ATLAS data favor a nonstandard Higgs boson with approximately 50% invisible branching ratio, and mass around 143 GeV. This situation can be realized within the simplest thermal scalar singlet Dark Matter model, predicting a Dark Matter mass around 50 GeV and direct detection cross section just below present bound. The present runs of the Xenon100 and LHC experiments can test this possibility.", "issue": "7", "journalAbbreviation": "Phys. Rev. D", "libraryCatalog": "APS", @@ -289,7 +289,7 @@ var testCases = [ ], "date": "2015-03-04", "DOI": "10.1103/PhysRevLett.114.098105", - "abstractNote": "Cellular aggregates (spheroids) are widely used in biophysics and tissue engineering as model systems for biological tissues. In this Letter we propose novel methods for molding stem-cell spheroids, deforming them, and measuring their interfacial and elastic properties with a single method based on cell tagging with magnetic nanoparticles and application of a magnetic field gradient. Magnetic molding yields spheroids of unprecedented sizes (up to a few mm in diameter) and preserves tissue integrity. On subjecting these spheroids to magnetic flattening (over ), we observed a size-dependent elastocapillary transition with two modes of deformation: liquid-drop-like behavior for small spheroids, and elastic-sphere-like behavior for larger spheroids, followed by relaxation to a liquidlike drop. locked icon locked icon locked icon locked icon locked icon locked icon", + "abstractNote": "Cellular aggregates (spheroids) are widely used in biophysics and tissue engineering as model systems for biological tissues. In this Letter we propose novel methods for molding stem-cell spheroids, deforming them, and measuring their interfacial and elastic properties with a single method based on cell tagging with magnetic nanoparticles and application of a magnetic field gradient. Magnetic molding yields spheroids of unprecedented sizes (up to a few mm in diameter) and preserves tissue integrity. On subjecting these spheroids to magnetic flattening (over ), we observed a size-dependent elastocapillary transition with two modes of deformation: liquid-drop-like behavior for small spheroids, and elastic-sphere-like behavior for larger spheroids, followed by relaxation to a liquidlike drop.", "issue": "9", "journalAbbreviation": "Phys. Rev. Lett.", "libraryCatalog": "APS", @@ -349,7 +349,7 @@ var testCases = [ ], "date": "2015-03-17", "DOI": "10.1103/PhysRevX.5.011029", - "abstractNote": "Based on first-principle calculations, we show that a family of nonmagnetic materials including TaAs, TaP, NbAs, and NbP are Weyl semimetals (WSM) without inversion centers. We find twelve pairs of Weyl points in the whole Brillouin zone (BZ) for each of them. In the absence of spin-orbit coupling (SOC), band inversions in mirror-invariant planes lead to gapless nodal rings in the energy-momentum dispersion. The strong SOC in these materials then opens full gaps in the mirror planes, generating nonzero mirror Chern numbers and Weyl points off the mirror planes. The resulting surface-state Fermi arc structures on both (001) and (100) surfaces are also obtained, and they show interesting shapes, pointing to fascinating playgrounds for future experimental studies.This article is available under the terms of the Creative Commons Attribution 3.0 License. Further distribution of this work must maintain attribution to the author(s) and the published article’s title, journal citation, and DOI.", + "abstractNote": "Based on first-principle calculations, we show that a family of nonmagnetic materials including TaAs, TaP, NbAs, and NbP are Weyl semimetals (WSM) without inversion centers. We find twelve pairs of Weyl points in the whole Brillouin zone (BZ) for each of them. In the absence of spin-orbit coupling (SOC), band inversions in mirror-invariant planes lead to gapless nodal rings in the energy-momentum dispersion. The strong SOC in these materials then opens full gaps in the mirror planes, generating nonzero mirror Chern numbers and Weyl points off the mirror planes. The resulting surface-state Fermi arc structures on both (001) and (100) surfaces are also obtained, and they show interesting shapes, pointing to fascinating playgrounds for future experimental studies.", "issue": "1", "journalAbbreviation": "Phys. Rev. X", "libraryCatalog": "APS", @@ -409,7 +409,7 @@ var testCases = [ ], "date": "2015-03-17", "DOI": "10.1103/PhysRevX.5.011029", - "abstractNote": "Based on first-principle calculations, we show that a family of nonmagnetic materials including TaAs, TaP, NbAs, and NbP are Weyl semimetals (WSM) without inversion centers. We find twelve pairs of Weyl points in the whole Brillouin zone (BZ) for each of them. In the absence of spin-orbit coupling (SOC), band inversions in mirror-invariant planes lead to gapless nodal rings in the energy-momentum dispersion. The strong SOC in these materials then opens full gaps in the mirror planes, generating nonzero mirror Chern numbers and Weyl points off the mirror planes. The resulting surface-state Fermi arc structures on both (001) and (100) surfaces are also obtained, and they show interesting shapes, pointing to fascinating playgrounds for future experimental studies.This article is available under the terms of the Creative Commons Attribution 3.0 License. Further distribution of this work must maintain attribution to the author(s) and the published article’s title, journal citation, and DOI.", + "abstractNote": "Based on first-principle calculations, we show that a family of nonmagnetic materials including TaAs, TaP, NbAs, and NbP are Weyl semimetals (WSM) without inversion centers. We find twelve pairs of Weyl points in the whole Brillouin zone (BZ) for each of them. In the absence of spin-orbit coupling (SOC), band inversions in mirror-invariant planes lead to gapless nodal rings in the energy-momentum dispersion. The strong SOC in these materials then opens full gaps in the mirror planes, generating nonzero mirror Chern numbers and Weyl points off the mirror planes. The resulting surface-state Fermi arc structures on both (001) and (100) surfaces are also obtained, and they show interesting shapes, pointing to fascinating playgrounds for future experimental studies.", "issue": "1", "journalAbbreviation": "Phys. Rev. X", "libraryCatalog": "APS", @@ -469,7 +469,7 @@ var testCases = [ ], "date": "2015-01-20", "DOI": "10.1103/PhysRevX.5.011003", - "abstractNote": "We report on a stringent test of the nonclassicality of the motion of a massive quantum particle, which propagates on a discrete lattice. Measuring temporal correlations of the position of single atoms performing a quantum walk, we observe a 6σ violation of the Leggett-Garg inequality. Our results rigorously excludes (i.e., falsifies) any explanation of quantum transport based on classical, well-defined trajectories. We use so-called ideal negative measurements—an essential requisite for any genuine Leggett-Garg test—to acquire information about the atom’s position, yet avoiding any direct interaction with it. The interaction-free measurement is based on a novel atom transport system, which allows us to directly probe the absence rather than the presence of atoms at a chosen lattice site. Beyond the fundamental aspect of this test, we demonstrate the application of the Leggett-Garg correlation function as a witness of quantum superposition. Here, we employ the witness to discriminate different types of walks spanning from merely classical to wholly quantum dynamics.This article is available under the terms of the Creative Commons Attribution 3.0 License. Further distribution of this work must maintain attribution to the author(s) and the published article’s title, journal citation, and DOI.", + "abstractNote": "We report on a stringent test of the nonclassicality of the motion of a massive quantum particle, which propagates on a discrete lattice. Measuring temporal correlations of the position of single atoms performing a quantum walk, we observe a 6σ violation of the Leggett-Garg inequality. Our results rigorously excludes (i.e., falsifies) any explanation of quantum transport based on classical, well-defined trajectories. We use so-called ideal negative measurements—an essential requisite for any genuine Leggett-Garg test—to acquire information about the atom’s position, yet avoiding any direct interaction with it. The interaction-free measurement is based on a novel atom transport system, which allows us to directly probe the absence rather than the presence of atoms at a chosen lattice site. Beyond the fundamental aspect of this test, we demonstrate the application of the Leggett-Garg correlation function as a witness of quantum superposition. Here, we employ the witness to discriminate different types of walks spanning from merely classical to wholly quantum dynamics.", "issue": "1", "journalAbbreviation": "Phys. Rev. X", "libraryCatalog": "APS", From daa4501bbe61b7d8457fd7de23d9b5438c3223a3 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 21 Nov 2024 13:54:16 -0500 Subject: [PATCH 149/158] AustLII: Don't add Code to case items https://github.com/zotero/translators/pull/2882#issuecomment-2488572263 --- AustLII and NZLII.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AustLII and NZLII.js b/AustLII and NZLII.js index a0cdf8f36da..8973feb3a9a 100644 --- a/AustLII and NZLII.js +++ b/AustLII and NZLII.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-11-20 16:01:22" + "lastUpdated": "2024-11-21 18:54:11" } /* @@ -156,7 +156,7 @@ function scrape(doc, url) { var newItem = new Zotero.Item(type); var fullJurisdiction = text(doc, 'li.ribbon-jurisdiction > a > span'); var jurisdiction = jurisdictionAbbrev[fullJurisdiction] || fullJurisdiction; - if (jurisdiction) { + if (jurisdiction && ZU.fieldIsValidForType('code', type)) { newItem.code = jurisdiction; } var citation = text(doc, 'li.ribbon-citation>a>span'); From 4cadb3e1455e6438b0b7c530d509cddca5f3e1c6 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 21 Nov 2024 16:03:11 -0500 Subject: [PATCH 150/158] PubMed Central: Throw when PMC returns error Prevent silent failures when the backend is having issues (as it is right now); this allows a fallback to EM, which works quite well. --- PubMed Central.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PubMed Central.js b/PubMed Central.js index 36edabfd49b..ecde87ecc2d 100644 --- a/PubMed Central.js +++ b/PubMed Central.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-10-28 02:40:59" + "lastUpdated": "2024-11-21 21:03:01" } /* @@ -141,6 +141,13 @@ function lookupPMCIDs(ids, doc, pdfLink) { var articles = ZU.xpath(doc, '/pmcarticleset/article'); + if (!articles.length) { + let error = ZU.xpathText(doc, '/pmcarticleset/error/Message'); + if (error) { + throw new Error(`PMC returned error: ${error}`); + } + } + for (var i in articles) { var newItem = new Zotero.Item("journalArticle"); From 9f1d764903d85a41a55aa114066882ebd25f0b42 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 26 Nov 2024 10:26:33 -0500 Subject: [PATCH 151/158] PICA: Extract more page numbers, add missing localization, fix URL field https://forums.zotero.org/discussion/119970/catalog-records-and-pagination-loss-in-zotero-recording --- Library Catalog (PICA).js | 442 ++++++++++++++++++++++---------------- 1 file changed, 260 insertions(+), 182 deletions(-) diff --git a/Library Catalog (PICA).js b/Library Catalog (PICA).js index db8472c30db..631dbf1b929 100644 --- a/Library Catalog (PICA).js +++ b/Library Catalog (PICA).js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-09-20 15:05:33" + "lastUpdated": "2024-11-26 15:26:20" } /* @@ -55,7 +55,15 @@ function detectWeb(doc, _url) { return "multiple"; } - else if ((content == "Notice détaillée") || (content == "title data") || (content == 'Titeldaten') || (content == 'Vollanzeige') || (content == 'Besitznachweis(e)') || (content == 'full title') || (content == 'Titelanzeige' || (content == 'titelgegevens'))) { + else if (content == "Notice détaillée" + || content == "title data" + || content == 'Titeldaten' + || content == 'Vollanzeige' + || content == 'Besitznachweis(e)' + || content == 'full title' + || content == 'Titelanzeige' + || content == 'titelgegevens' + || content == 'Detailanzeige') { var xpathimage = "//span[@class='rec_mat_long']/img|//table[contains(@summary, 'presentation')]/tbody/tr/td/img"; if ((elt = doc.evaluate(xpathimage, doc, null, XPathResult.ANY_TYPE, null).iterateNext())) { var type = elt.getAttribute('src'); @@ -465,7 +473,7 @@ function scrape(doc, url) { // f., p., and S. are "pages" in various languages // For multi-volume works, we expect formats like: // x-109 p., 510 p. and X, 106 S.; 123 S. - var numPagesRE = /\[?((?:[ivxlcdm\d]+[ ,-]*)+)\]?\s+[fps]\b/ig, + var numPagesRE = /\[?((?:[ivxlcdm\d]+[ ,-]*)+)\]?\s+([fps]|pages?)\b/ig, numPages = []; while ((m = numPagesRE.exec(value))) { numPages.push(m[1].replace(/ /g, '') @@ -586,7 +594,9 @@ function scrape(doc, url) { case 'accès en ligne': // Some time links are inside the third cell : https://kxp.k10plus.de/DB=2.1/DB=2.1/PPNSET?PPN=600530787 url = doc.evaluate('./td[3]//a | ./td[2]//a', tableRow, null, XPathResult.ANY_TYPE, null).iterateNext(); - newItem.url = url; + if (url) { + newItem.url = url.href; + } break; } } @@ -1299,6 +1309,7 @@ var testCases = [ { "type": "web", "url": "http://swb.bsz-bw.de/DB=2.1/PPNSET?PPN=012099554&INDEXSET=1", + "defer": true, "items": [ { "itemType": "book", @@ -1396,13 +1407,12 @@ var testCases = [ } ], "date": "2012", - "ISBN": "2-7056-8274-0, 978-2-7056-8274-3", - "callNumber": "1 A 845058 Verfügbarkeit anzeigen / bestellen", - "libraryCatalog": "Library Catalog - stabikat.de", + "ISBN": "9782705682743", + "callNumber": "1 A 845058", + "libraryCatalog": "Library Catalog - lbssbb.gbv.de", "numPages": "290", - "pages": "290", "place": "Paris", - "publisher": "Hermann Ed.", + "publisher": "Hermann Éd.", "attachments": [ { "title": "Link to Library Catalog Entry", @@ -1416,11 +1426,22 @@ var testCases = [ } ], "tags": [ - "Gesetzgebung / Rechtsprechung / Komplexes System / Kongress / Paris <2010>Law -- Philosophy -- Congresses / Law -- Political aspects -- Congresses / Rule of law -- Congresses" + { + "tag": "*Gesetzgebung / Rechtsprechung / Komplexes System" + }, + { + "tag": "*Law -- Philosophy -- Congresses" + }, + { + "tag": "Law -- Political aspects -- Congresses" + }, + { + "tag": "Rule of law -- Congresses" + } ], "notes": [ { - "note": "Contient des contributions en anglais
Notes bibliogr. Résumés. Index" + "note": "
Notes bibliogr. Résumés. Index
Issus du 1er Atelier Complexité & politique publiques, organisé par l'Institut des systèmes complexes, à Paris les 23 et 24 septembre 2010. - Contient des contributions en anglais. - Notes bibliogr. Résumés. Index
" } ], "seeAlso": [] @@ -1467,115 +1488,7 @@ var testCases = [ }, { "type": "web", - "url": "http://gso.gbv.de/DB=2.1/PPNSET?PPN=768059798", - "items": [ - { - "itemType": "book", - "title": "Ehetagebücher 1840 - 1844", - "creators": [ - { - "firstName": "Robert", - "lastName": "Schumann", - "creatorType": "author" - }, - { - "firstName": "Clara", - "lastName": "Schumann", - "creatorType": "author" - }, - { - "firstName": "Gerd", - "lastName": "Nauhaus", - "creatorType": "editor" - }, - { - "firstName": "Ingrid", - "lastName": "Bodsch", - "creatorType": "editor" - } - ], - "date": "2013", - "ISBN": "978-3-86600-002-5, 978-3-931878-40-5", - "abstractNote": "Zum ersten Mal als Einzelausgabe erscheinen die von Robert Schumann und seiner Frau, der Pianistin und Komponistin Clara Schumann, geb. Wieck, in den ersten Jahren ihrer Ehe geführten gemeinsamen Tagebücher. 1987 waren diese in Leipzig und bei Stroemfeld in wissenschaftlich-kritischer Edition von dem Schumannforscher und langjährigen Direktor des Robert-Schumann-Hauses Zwickau, Gerd Nauhaus, vorgelegt worden. Mit der Neupublikation wird die textgetreue, mit Sacherläuterungen sowie Personen-, Werk- und Ortsregistern und ergänzenden Abbildungen versehene Leseausgabe vorgelegt, die einem breiten interessierten Publikum diese einzigartigen Zeugnisse einer bewegenden Künstlerehe nahebringen.", - "edition": "2", - "libraryCatalog": "Library Catalog - gso.gbv.de", - "numPages": "332", - "place": "Frankfurt/M.", - "publisher": "Stroemfeld", - "attachments": [ - { - "title": "Link to Library Catalog Entry", - "mimeType": "text/html", - "snapshot": false - }, - { - "title": "Library Catalog Entry Snapshot", - "mimeType": "text/html", - "snapshot": true - } - ], - "tags": [ - "Schumann, Robert 1810-1856 / Schumann, Clara 1819-1896 / Tagebuch 1840-1844" - ], - "notes": [ - { - "note": "
Sammlung
" - } - ], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "http://gso.gbv.de/DB=2.1/PPNSET?PPN=770481450", - "items": [ - { - "itemType": "book", - "title": "Religiosidade no Brasil", - "creators": [ - { - "firstName": "João Baptista Borges", - "lastName": "Pereira", - "creatorType": "author" - } - ], - "date": "2012", - "ISBN": "9788531413742", - "libraryCatalog": "Library Catalog - kxp.k10plus.de", - "numPages": "397", - "place": "São Paulo, SP, Brasil", - "publisher": "EDUSP", - "url": "http://www.gbv.de/dms/spk/iai/toc/770481450.pdf", - "attachments": [ - { - "title": "Link to Library Catalog Entry", - "mimeType": "text/html", - "snapshot": false - }, - { - "title": "Library Catalog Entry Snapshot", - "mimeType": "text/html", - "snapshot": true - } - ], - "tags": [ - { - "tag": "Brazil -- Religious life and customs" - } - ], - "notes": [ - { - "note": "
Includes bibliographical references
" - } - ], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "http://www.sudoc.abes.fr/cbs/xslt/DB=2.1//SRCH?IKT=12&TRM=024630527", + "url": "https://www.sudoc.abes.fr/cbs/xslt/DB=2.1/SRCH?IKT=12&TRM=024630527", "items": [ { "itemType": "book", @@ -1591,7 +1504,6 @@ var testCases = [ "language": "français", "libraryCatalog": "Library Catalog - www.sudoc.abes.fr", "numPages": "xii+xxiii+681+540+739", - "numberOfVolumes": "3", "place": "Paris, France", "publisher": "Dunod", "attachments": [ @@ -1627,7 +1539,7 @@ var testCases = [ ], "notes": [ { - "note": "\n
Titre des tomes 2 et 3 : Conférences sur l'administration et le droit administratif faites à l'Ecole des ponts et chaussées
\n
 
\n" + "note": "\n
Titre des tomes 2 et 3 : Conférences sur l'administration et le droit administratif faites à l'Ecole des ponts et chaussées
\n
 
\n
 
\n
 
\n
 
\n" } ], "seeAlso": [] @@ -1636,7 +1548,7 @@ var testCases = [ }, { "type": "web", - "url": "http://www.sudoc.abes.fr/cbs/xslt/DB=2.1//SRCH?IKT=12&TRM=001493817", + "url": "https://www.sudoc.abes.fr/cbs/xslt/DB=2.1/SRCH?IKT=12&TRM=001493817", "items": [ { "itemType": "book", @@ -1662,11 +1574,6 @@ var testCases = [ "place": "Paris, France", "publisher": "Librairie générale de droit et de jurisprudence", "attachments": [ - { - "title": "Worldcat Link", - "mimeType": "text/html", - "snapshot": false - }, { "title": "Link to Library Catalog Entry", "mimeType": "text/html", @@ -1694,7 +1601,7 @@ var testCases = [ ], "notes": [ { - "note": "
1, Notions générales et législation comparée, histoire, organisation compétence de la juridiction administrative. 2, Compétence (suite), marchés et autres contrats, dommages, responsabilité de l'état, traitements et pensions, contributions directes, élections, recours pour excés de pouvoir, interprétation, contraventions de grandes voirie
" + "note": "\n
1, Notions générales et législation comparée, histoire, organisation compétence de la juridiction administrative. 2, Compétence (suite), marchés et autres contrats, dommages, responsabilité de l'état, traitements et pensions, contributions directes, élections, recours pour excés de pouvoir, interprétation, contraventions de grandes voirie
\n
 
\n
 
\n" } ], "seeAlso": [] @@ -1703,7 +1610,7 @@ var testCases = [ }, { "type": "web", - "url": "http://www.sudoc.abes.fr/cbs/xslt/DB=2.1//SRCH?IKT=12&TRM=200278649", + "url": "https://www.sudoc.abes.fr/cbs/xslt/DB=2.1/SRCH?IKT=12&TRM=200278649", "items": [ { "itemType": "book", @@ -1759,7 +1666,7 @@ var testCases = [ ], "notes": [ { - "note": "
\nTable des matières disponible en ligne (http://catdir.loc.gov/catdir/toc/casalini11/13192019.pdf)\n
" + "note": "\n
\nTable des matières disponible en ligne (http://catdir.loc.gov/catdir/toc/casalini11/13192019.pdf)\n
\n
 
\n
 
\n" } ], "seeAlso": [] @@ -1768,14 +1675,18 @@ var testCases = [ }, { "type": "web", - "url": "https://stabikat.de/DB=1/XMLPRS=N/PPN?PPN=1748358820", + "url": "https://lbssbb.gbv.de/DB=1/XMLPRS=N/PPN?PPN=1748358820", "items": [ { - "itemType": "webpage", + "itemType": "book", "title": "Modern and contemporary Taiwanese philosophy: traditional foundations and new developments", "creators": [], "date": "2021", + "ISBN": "9781527562448", "abstractNote": "This collection contains 13 essays on modern and contemporary Taiwanese philosophy, written by outstanding scholars working in this field. It highlights the importance of Taiwanese philosophy in the second half of the 20th century. While the Chinese conceptual tradition (especially Confucianism) fell out of favor from the 1950s onwards and was often banned or at least severely criticized on the mainland, Taiwanese philosophers constantly strove to preserve and develop it. Many of them tried to modernize their own traditions through dialogs with Western thought, especially with the ideas of the European Enlightenment. However, it was not only about preserving tradition; in the second half of the 20th century, several complex and coherent philosophical systems emerged in Taiwan. The creation of these discourses is evidence of the great creativity and innovative power of many Taiwanese theorists, whose work is still largely unknown in the Western world.Intro -- Table of Contents -- Acknowledgements -- Editor's Foreword -- Introduction -- Modern and Contemporary Confucianism -- The Problem of \"Inner Sageliness and Outer Kingliness\" Revisited -- A Debate on Confucian Orthodoxy in Contemporary Taiwanese Confucian Thought -- A Phenomenological Interpretation of Mou Zongsan's Use of \"Transcendence\" and \"Immanence\" -- Modern Confucianism and the Methodology of Chinese Aesthetics -- Research on Daoist Philosophy -- Laozi's View of Presence and Absence, Movement and Stillness, and Essence and Function -- Characteristics of Laozi's \"Complementary Opposition\" Thought Pattern -- A General Survey of Taiwanese Studies on the Philosophy of the Wei-Jin Period in the Last Fifty Years of the 20th Century -- Logic and Methodology -- Qinghua School of Logic and the Origins of Taiwanese Studies in Modern Logic -- Discussing the Functions and Limitations of Conveying \"Concepts\" in Philosophical Thinking -- Taiwanese Philosophy from the East Asian and Global Perspective -- How is it Possible to \"Think from the Point of View of East Asia?\" -- Between Philosophy and Religion -- The Global Significance of Chinese/Taiwanese Philosophy in a Project -- Index of Special Terms and Proper Names.", + "libraryCatalog": "Library Catalog - lbssbb.gbv.de", + "place": "Newcastle-upon-Tyne", + "publisher": "Cambridge Scholars Publishing", "shortTitle": "Modern and contemporary Taiwanese philosophy", "url": "http://erf.sbb.spk-berlin.de/han/872773256/ebookcentral.proquest.com/lib/staatsbibliothek-berlin/detail.action?docID=6416045", "attachments": [ @@ -1803,7 +1714,7 @@ var testCases = [ "note": "
Description based on publisher supplied metadata and other sources.
" }, { - "note": "
Einzelnutzerlizenz
" + "note": "
Einzelnutzungslizenz
" } ], "seeAlso": [] @@ -1812,7 +1723,7 @@ var testCases = [ }, { "type": "web", - "url": "http://swb.bsz-bw.de/DB=2.1/PPNSET?PPN=1703871782", + "url": "https://swb.bsz-bw.de/DB=2.1/PPNSET?PPN=1703871782", "items": [ { "itemType": "journalArticle", @@ -1828,7 +1739,7 @@ var testCases = [ "ISSN": "1361-6455", "issue": "13", "libraryCatalog": "Library Catalog - swb.bsz-bw.de", - "publicationTitle": "Journal of physics B", + "publicationTitle": "Journal of physics : one of the major international journals in atomic, molecular and optical physics, covering the study of atoms, ion, molecules or clusters, their structure and interactions with particles, photons or fields", "url": "http://dx.doi.org/10.1088/1361-6455/ab8834", "volume": "53", "attachments": [ @@ -1892,7 +1803,7 @@ var testCases = [ "tags": [], "notes": [ { - "note": "
WEEE = Waste Electrical and Electronic Equipment
Literaturverzeichnis: Seite 39-43
Archivierung/Langzeitarchivierung gewährleistet ; TIB Hannover
" + "note": "
WEEE = Waste Electrical and Electronic Equipment
Literaturverzeichnis: Seite 39-43
Archivierung/Langzeitarchivierung gewährleistet. TIB Hannover
" }, { "note": "
Es gilt deutsches Urheberrecht. Das Werk bzw. der Inhalt darf zum eigenen Gebrauch kostenfrei heruntergeladen, konsumiert, gespeichert oder ausgedruckt, aber nicht im Internet bereitgestellt oder an Außenstehende weitergegeben werden. - German copyright law applies. The work or content may be downloaded, consumed, stored or printed for your own use but it may not be distributed via the internet or passed on to external parties.
" @@ -1919,10 +1830,11 @@ var testCases = [ "date": "2021", "ISBN": "9783030568573", "libraryCatalog": "Library Catalog - opac.sub.uni-goettingen.de", + "numPages": "337", "place": "Cham", "publisher": "Springer International Publishing AG", "shortTitle": "12 Strokes", - "url": "http://han.sub.uni-goettingen.de/han/ebookcentral1/ebookcentral.proquest.com/lib/subgoettingen/detail.action?docID=6454869", + "url": "https://ebookcentral.proquest.com/lib/subgoettingen/detail.action?docID=6454869", "attachments": [ { "title": "Link to Library Catalog Entry", @@ -1954,31 +1866,16 @@ var testCases = [ }, { "type": "web", - "url": "http://lhclz.gbv.de/DB=1/XMLPRS=N/PPN?PPN=839046855", + "url": "http://cbsopac.rz.uni-frankfurt.de/DB=2.1/PPNSET?PPN=318490412", "items": [ { "itemType": "book", - "title": "Customer Value Generation in Banking: The Zurich Model of Customer-Centricity", - "creators": [ - { - "firstName": "Bernhard", - "lastName": "Koye", - "creatorType": "author" - }, - { - "firstName": "Axel", - "lastName": "Liebetrau", - "creatorType": "author" - } - ], - "date": "2024", - "libraryCatalog": "Library Catalog - lhclz.gbv.de", - "numPages": "209", - "place": "Cham", - "publisher": "Springer International Publishing", - "series": "Management for Professionals", - "shortTitle": "Customer Value Generation in Banking", - "url": "https://ebookcentral.proquest.com/lib/tuclausthal-ebooks/detail.action?docID=3567812", + "title": "Daten- und Identitätsschutz in Cloud Computing, E-Government und E-Commerce", + "creators": [], + "ISBN": "9783642301025", + "edition": "1st ed. 2012", + "libraryCatalog": "Library Catalog - cbsopac.rz.uni-frankfurt.de", + "url": "https://doi.org/10.1007/978-3-642-30102-5", "attachments": [ { "title": "Link to Library Catalog Entry", @@ -1991,36 +1888,206 @@ var testCases = [ "snapshot": true } ], - "tags": [ - { - "tag": "Electronic books" - } - ], - "notes": [ - { - "note": "
Description based upon print version of record
" - }, - { - "note": "
Campusweiter Zugriff. - Vervielfältigungen (z.B. Kopien, Downloads) sind nur von einzelnen Kapiteln oder Seiten und nur zum eigenen wissenschaftlichen Gebrauch erlaubt. Keine Weitergabe an Dritte. Kein systematisches Downloaden durch Robots.
" - } - ], + "tags": [], + "notes": [], "seeAlso": [] } ] }, { "type": "web", - "url": "http://cbsopac.rz.uni-frankfurt.de/DB=2.1/PPNSET?PPN=318490412", + "url": "https://www.sudoc.abes.fr/cbs/DB=2.1/SRCH?IKT=12&TRM=281455481", "items": [ { "itemType": "book", - "title": "Daten- und Identitätsschutz in Cloud Computing, E-Government und E-Commerce", - "creators": [], - "ISBN": "9783642301025", - "edition": "1st ed. 2012", - "libraryCatalog": "Library Catalog - cbsopac.rz.uni-frankfurt.de", - "url": "https://doi.org/10.1007/978-3-642-30102-5", + "title": "Migrations: une odyssée humaine", + "creators": [ + { + "firstName": "Sylvie", + "lastName": "Mazzella", + "creatorType": "author" + }, + { + "firstName": "Christine", + "lastName": "Verna", + "creatorType": "author" + }, + { + "firstName": "Aline", + "lastName": "Averbouh", + "creatorType": "author" + }, + { + "firstName": "Hassan", + "lastName": "Boubakri", + "creatorType": "author" + }, + { + "firstName": "Souleymane Bachir", + "lastName": "Diagne", + "creatorType": "author" + }, + { + "firstName": "Adélie", + "lastName": "Chevée", + "creatorType": "author" + }, + { + "firstName": "Dana", + "lastName": "Diminescu", + "creatorType": "author" + }, + { + "firstName": "Florent", + "lastName": "Détroit", + "creatorType": "author" + }, + { + "firstName": "Théo", + "lastName": "Ducharme", + "creatorType": "author" + }, + { + "firstName": "Mustapha", + "lastName": "El Miri", + "creatorType": "author" + }, + { + "firstName": "Stéphanie", + "lastName": "Garneau", + "creatorType": "author" + }, + { + "firstName": "Sébastien", + "lastName": "Gökalp", + "creatorType": "author" + }, + { + "firstName": "Christian", + "lastName": "Grataloup", + "creatorType": "author" + }, + { + "firstName": "François", + "lastName": "Héran", + "creatorType": "author" + }, + { + "firstName": "Julien d'", + "lastName": "Huy", + "creatorType": "author" + }, + { + "firstName": "Thomas", + "lastName": "Ingicco", + "creatorType": "author" + }, + { + "firstName": "Christophe", + "lastName": "Lavelle", + "creatorType": "author" + }, + { + "firstName": "Hélène", + "lastName": "Le Bail", + "creatorType": "author" + }, + { + "firstName": "Antoine", + "lastName": "Lourdeau", + "creatorType": "author" + }, + { + "firstName": "Nick", + "lastName": "Mai", + "creatorType": "author" + }, + { + "firstName": "Claire", + "lastName": "Manen", + "creatorType": "author" + }, + { + "firstName": "Cléo", + "lastName": "Marmié", + "creatorType": "author" + }, + { + "firstName": "Nathalie", + "lastName": "Mémoire", + "creatorType": "author" + }, + { + "firstName": "Marie-France", + "lastName": "Mifune", + "creatorType": "author" + }, + { + "firstName": "Swanie", + "lastName": "Potot", + "creatorType": "author" + }, + { + "firstName": "Nicolas", + "lastName": "Puig", + "creatorType": "author" + }, + { + "firstName": "Michelle", + "lastName": "Salord", + "creatorType": "author" + }, + { + "firstName": "Yann", + "lastName": "Tephany", + "creatorType": "author" + }, + { + "firstName": "Paul", + "lastName": "Verdu", + "creatorType": "author" + }, + { + "firstName": "Catherine", + "lastName": "Wihtol de Wenden", + "creatorType": "author" + }, + { + "firstName": "Wanda", + "lastName": "Zinger", + "creatorType": "author" + }, + { + "firstName": "Frédérique", + "lastName": "Chlous-Ducharme", + "creatorType": "editor" + }, + { + "firstName": "Gilles Préfacier", + "lastName": "Bloch", + "creatorType": "author" + }, + { + "lastName": "Musée de l'Homme", + "creatorType": "author", + "fieldMode": 1 + } + ], + "date": "2024", + "ISBN": "9782382790328", + "abstractNote": "Les conditions dans lesquelles des humains quittent leur pays soulèvent de nombreuses controverses. Le mot « migrant » ne désigne que rarement le fait brut de la mobilité ; il est chargé de jugements de valeur. Dans les discours politiques et médiatiques, l’omniprésence de certains termes participe à une rhétorique du danger ou de la nuisance : crise, invasion, remplacement, flot migratoire, pression démographique… Prenons un peu de recul. S’il n’y a pas de vie sans installation, il n’y a pas non plus de vie sans déplacement. Cette complémentarité entre stabilité et échanges est l’un des moteurs de la pérennité des espèces. Les migrations, en tant que déplacements des êtres humains dans l’espace, permettent également une diffusion des savoirs, des techniques, des cultures. Elles sont ainsi une part constitutive et fondamentale de nos sociétés, de nous-mêmes. En une vingtaine de chapitres clairs et accessibles, auxquels se mêlent des témoignages recueillis aux quatre coins du monde, ce catalogue invite, en complémentarité avec l’exposition, à adopter un regard critique et citoyen sur cette question d’actualité qui fait écho, aussi, aux premiers temps de l’humanité (site web de l’éditeur)", + "language": "français", + "libraryCatalog": "Library Catalog - www.sudoc.abes.fr", + "numPages": "228", + "place": "Paris, France", + "publisher": "Muséum national d'histoire naturelle", + "shortTitle": "Migrations", "attachments": [ + { + "title": "Worldcat Link", + "mimeType": "text/html", + "snapshot": false + }, { "title": "Link to Library Catalog Entry", "mimeType": "text/html", @@ -2032,8 +2099,19 @@ var testCases = [ "snapshot": true } ], - "tags": [], - "notes": [], + "tags": [ + { + "tag": "Migrations de peuples" + }, + { + "tag": "Préhistoire" + } + ], + "notes": [ + { + "note": "
Autres contributeurs : Adélie Chevée, Dana Diminescu, Florent Détroit, Théo Ducharme, Mustapha El Miri, Stéphanie Garneau, Sébastien Gökalp, Christian Grataloup, François Héran, Julien d'Huy, Thomas Ignicco, Christophe Lavelle, Hélène Le Bail, Antoine Lourdeau, Nick Mai, Claire Manen, Cléo Marmié, Nathalie Mémoire, Marie-France Mifune, Swanie Potot, Nicolas Puig, Michelle Salord Lopez, Yann Téphany, Paul Verdu, Catherine Wihtol de Wenden, Wanda Zinger
 
 
" + } + ], "seeAlso": [] } ] From f7f06c2538ebf492c7c51b993c2140464707d9bb Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 3 Dec 2024 10:55:13 -0500 Subject: [PATCH 152/158] arXiv: Parse Atom manually to work around Connector issue https://forums.zotero.org/discussion/comment/480521/#Comment_480521 Was working fine in the client/Scaffold, but not in the browser due to zotero/zotero-connectors#526. Easy enough to work around it for now. --- arXiv.org.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/arXiv.org.js b/arXiv.org.js index 4ea679a4850..cc097602361 100644 --- a/arXiv.org.js +++ b/arXiv.org.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 12, "browserSupport": "gcsibv", - "lastUpdated": "2024-11-20 15:37:18" + "lastUpdated": "2024-12-03 15:53:57" } /* @@ -243,7 +243,7 @@ function detectSearch(item) { async function doSearch(item) { let url = `https://export.arxiv.org/api/query?id_list=${encodeURIComponent(item.arXiv)}&max_results=1`; - let doc = await requestDocument(url); + let doc = await requestAtom(url); parseAtom(doc); } @@ -323,7 +323,7 @@ async function doWeb(doc, url) { let selectedItems = await Z.selectItems(items); if (selectedItems) { let apiURL = `https://export.arxiv.org/api/query?id_list=${encodeURIComponent(Object.keys(selectedItems).join(','))}`; - let document = await requestDocument(apiURL); + let document = await requestAtom(apiURL); parseAtom(document); } } @@ -343,10 +343,16 @@ async function doWeb(doc, url) { //id = id.trim().replace(/^arxiv:\s*|v\d+|\s+.*$/ig, ''); id = id.trim().replace(/^arxiv:\s*|\s+.*$/ig, ''); let apiURL = `https://export.arxiv.org/api/query?id_list=${encodeURIComponent(id)}&max_results=1`; - await requestDocument(apiURL).then(parseAtom); + await requestAtom(apiURL).then(parseAtom); } } +// Temp workaround for https://github.com/zotero/zotero-connectors/issues/526 +async function requestAtom(url) { + let text = await requestText(url); + return new DOMParser().parseFromString(text, 'application/xml'); +} + function parseAtom(doc) { let entries = doc.querySelectorAll("feed > entry"); entries.forEach(parseSingleEntry); @@ -389,7 +395,7 @@ function parseSingleEntry(entry) { } newItem.url = arxivURL; - let articleID = arxivURL.replace(/https?:\/\/arxiv.org\/abs\//, ''); // Trim off http://arxiv.org/abs/ + let articleID = arxivURL.match(/\/abs\/(.+)$/)[1]; let articleField = attr(entry, "primary_category", "term").replace(/^.+?:/, "").replace(/\..+?$/, ""); if (articleField) articleField = "[" + articleField + "]"; From a2bd2f25e32ce8213c2113a5d9a84a20b7cf44f6 Mon Sep 17 00:00:00 2001 From: Sebastian Karcher Date: Tue, 3 Dec 2024 14:57:56 -0500 Subject: [PATCH 153/158] T&F: BibTeX hotfix (#3399) --- Taylor and Francis+NEJM.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Taylor and Francis+NEJM.js b/Taylor and Francis+NEJM.js index c1d846c84f5..baf7ad24cbb 100644 --- a/Taylor and Francis+NEJM.js +++ b/Taylor and Francis+NEJM.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2024-07-02 20:00:15" + "lastUpdated": "2024-12-03 15:37:21" } /* @@ -107,10 +107,18 @@ async function scrape(doc, url = doc.location.href) { let bibtexText = await requestText(postUrl, { method: 'POST', body: postBody + doi + bibtexFormat }); let risText = await requestText(postUrl, { method: 'POST', body: postBody + doi + risFormat }); + + // Z.debug(bibtexText) // Y1 is online publication date if (/^DA\s+-\s+/m.test(risText)) { risText = risText.replace(/^Y1(\s+-.*)/gm, ''); } + // Fix broken BibTeX as in https://github.com/zotero/translators/issues/3398 + if (/@article\{[^,]+\}/.test(bibtexText)) { + Z.debug("Fixing BibTeX"); + bibtexText = bibtexText.replace(/(@article\{[^,]+)\}/, '$1'); + // Z.debug(bibtexText); + } var item; var risItem; @@ -142,7 +150,6 @@ async function scrape(doc, url = doc.location.href) { } item.bookTitle = item.publicationTitle; - if (!item.title) item.title = ""; // RIS title can be even worse, it actually says "null" if (risItem.date) item.date = risItem.date; // More complete if (item.date && /^\d{4}$/.test(item.date)) { From 5f6cf567c768bfc9122aa14f6dc7cb1688b5e066 Mon Sep 17 00:00:00 2001 From: Bardi Harborow Date: Wed, 4 Dec 2024 07:03:13 +1100 Subject: [PATCH 154/158] Fix Dagstuhl Research Online Publication Server translator (#3397) --- ...tuhl Research Online Publication Server.js | 92 ++++++++++--------- 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/Dagstuhl Research Online Publication Server.js b/Dagstuhl Research Online Publication Server.js index faf7f524a75..7e800c80e9b 100644 --- a/Dagstuhl Research Online Publication Server.js +++ b/Dagstuhl Research Online Publication Server.js @@ -2,59 +2,62 @@ "translatorID": "0526c18d-8dc8-40c9-8314-399e0b743a4d", "label": "Dagstuhl Research Online Publication Server", "creator": "Philipp Zumstein", - "target": "^https?://(www\\.)?drops\\.dagstuhl\\.de/opus/", + "target": "^https?://(www\\.)?drops\\.dagstuhl\\.de/", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2016-08-23 06:54:08" + "lastUpdated": "2024-11-30 08:38:44" } /* ***** BEGIN LICENSE BLOCK ***** - + Copyright © 2016 Philipp Zumstein - + 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.indexOf('source_opus')>-1 || url.indexOf('volltexte')>-1) { - var bibtexEntry = ZU.xpathText(doc, '//pre/tt'); - if (bibtexEntry.indexOf("@InCollection")>-1) { + if (url.includes('/entities/document/')) { + var bibtexEntry = ZU.xpathText(doc, "//pre[contains(@class, 'bibtex')]"); + if (bibtexEntry.includes("@InCollection")) { return "bookSection"; } - if (bibtexEntry.indexOf("@Article")>-1) { + if (bibtexEntry.includes("@Article")) { return "journalArticle"; } return "conferencePaper"; - } else if (getSearchResults(doc, true)) { + } + else if (getSearchResults(doc, true)) { return "multiple"; } + + return false; } function getSearchResults(doc, checkOnly) { var items = {}; var found = false; - var rows = ZU.xpath(doc, '//b/a[contains(@href, "source_opus")]|//td/a[contains(@href, "source_opus")]');// - for (var i=0; i-1) { + if (note.includes('Keywords:')) { note = note.replace('

', '').replace('

', '').replace('Keywords:', ''); var keywords = note.split(','); - for (var j=0; j Date: Fri, 6 Dec 2024 13:29:41 -0500 Subject: [PATCH 155/158] SciELO: Use language-aware abstract and DOI https://forums.zotero.org/discussion/120295/articles-with-versions-in-two-languages-and-two-dois --- SciELO.js | 264 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 222 insertions(+), 42 deletions(-) diff --git a/SciELO.js b/SciELO.js index 6932ab0f97a..2eb4dd561c9 100644 --- a/SciELO.js +++ b/SciELO.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2017-06-24 11:53:49" + "lastUpdated": "2024-12-06 18:29:19" } /* @@ -76,14 +76,19 @@ function doWeb(doc, url) { function scrape(doc, url) { - var abstract = ZU.xpathText(doc, '//div[@class="abstract"]') var translator = Zotero.loadTranslator('web'); //use Embedded Metadata translator.setTranslator("951c027d-74ac-47d4-a107-9c3069ab7b48"); translator.setDocument(doc); translator.setHandler('itemDone', function(obj, item) { - if (abstract) item.abstractNote = abstract.replace(/^\s*(ABSTRACT|RESUMO|RESUMEN)/, "").replace(/[\n\t]/g, ""); - item.libraryCatalog = "SciELO" + let abstract = item.language === 'en' + ? innerText(doc, '.articleSection--abstract') + : innerText(doc, '.articleSection--resumo'); + if (abstract) { + item.abstractNote = abstract.replace(/^\s*(ABSTRACT|RESUMO|RESUMEN)/i, "").replace(/[\n\t]/g, ""); + } + item.DOI = attr(doc, 'a._doi', 'href') || item.DOI; + item.libraryCatalog = "SciELO"; item.complete(); }); translator.translate(); @@ -93,11 +98,11 @@ function scrape(doc, url) { var testCases = [ { "type": "web", - "url": "http://www.scielosp.org/scielo.php?script=sci_arttext&pid=S0034-89102007000900015&lang=pt", + "url": "https://scielosp.org/article/rsp/2007.v41suppl2/94-100/", "items": [ { "itemType": "journalArticle", - "title": "Perceptions of HIV rapid testing among injecting drug users in Brazil", + "title": "Impressões sobre o teste rápido para o HIV entre usuários de drogas injetáveis no Brasil", "creators": [ { "firstName": "P. R.", @@ -120,24 +125,48 @@ var testCases = [ "creatorType": "author" } ], - "date": "12/2007", - "DOI": "10.1590/S0034-89102007000900015", - "ISSN": "0034-8910", + "date": "2007-12", + "ISSN": "0034-8910, 0034-8910, 1518-8787", + "abstractNote": "OBJETIVO: Descrever as impressões, experiências, conhecimentos, crenças e a receptividade de usuários de drogas injetáveis para participar das estratégias de testagem rápida para HIV. MÉTODOS: Estudo qualitativo exploratório foi conduzido entre usuários de drogas injetáveis, de dezembro de 2003 a fevereiro de 2004, em cinco cidades brasileiras, localizadas em quatro regiões do País. Um roteiro de entrevista semi-estruturado contendo questões fechadas e abertas foi usado para avaliar percepções desses usuários sobre procedimentos e formas alternativas de acesso e testagem. Foram realizadas 106 entrevistas, aproximadamente 26 por região. RESULTADOS: Características da população estudada, opiniões sobre o teste rápido e preferências por usar amostras de sangue ou saliva foram apresentadas junto com as vantagens e desvantagens associadas a cada opção. Os resultados mostraram a viabilidade do uso de testes rápidos entre usuários de drogas injetáveis e o interesse deles quanto à utilização destes métodos, especialmente se puderem ser equacionadas questões relacionadas à confidencialidade e confiabilidade dos testes. CONCLUSÕES: Os resultados indicam que os testes rápidos para HIV seriam bem recebidos por essa população. Esses testes podem ser considerados uma ferramenta valiosa, ao permitir que mais usuários de drogas injetáveis conheçam sua sorologia para o HIV e possam ser referidos para tratamento, como subsidiar a melhoria das estratégias de testagem entre usuários de drogas injetáveis.", + "journalAbbreviation": "Rev. Saúde Pública", + "language": "pt", "libraryCatalog": "SciELO", "pages": "94-100", "publicationTitle": "Revista de Saúde Pública", - "url": "http://www.scielosp.org/scielo.php?script=sci_abstract&pid=S0034-89102007000900015&lng=en&nrm=iso&tlng=pt", + "url": "https://scielosp.org/article/rsp/2007.v41suppl2/94-100/", "volume": "41", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Abuso de substâncias por via intravenosa" + }, + { + "tag": "Brasil" + }, + { + "tag": "Pesquisa qualitativa" + }, + { + "tag": "Serviços de diagnóstico" + }, + { + "tag": "Sorodiagnóstico da Aids" + }, + { + "tag": "Síndrome de imunodeficiência adquirida" + }, + { + "tag": "Técnicas de diagnóstico e procedimentos" }, { - "title": "Snapshot" + "tag": "Vulnerabilidade em saúde" } ], - "tags": [], "notes": [], "seeAlso": [] } @@ -145,11 +174,11 @@ var testCases = [ }, { "type": "web", - "url": "http://www.scielo.br/scielo.php?script=sci_arttext&pid=S0104-62762002000200002&lang=pt", + "url": "https://www.scielo.br/j/op/a/JNgwxBLSnHQnSJbzhkRbCBq/?lang=pt", "items": [ { "itemType": "journalArticle", - "title": "How candidates for the Presidency are nominated?: Rules and procedures in the Latin American political parties", + "title": "Como se escolhe um candidato a Presidente?: Regras e práticas nos partidos políticos da América Latina", "creators": [ { "firstName": "Flavia", @@ -162,26 +191,38 @@ var testCases = [ "creatorType": "author" } ], - "date": "10/2002", - "DOI": "10.1590/S0104-62762002000200002", - "ISSN": "0104-6276", - "issue": "2", + "date": "2002-10", + "DOI": "https://doi.org/10.1590/S0104-62762002000200002", + "ISSN": "0104-6276, 1807-0191", + "abstractNote": "Este trabalho examina a maneira como os partidos políticos da América Latina selecionam seus candidatos às eleições presidenciais. A análise está baseada no estudo de 44 partidos de 16 países da América Latina, e mostra que apesar da crescente tendência para o emprego de processos mais inclusivos na seleção dos candidatos nas últimas décadas, predomina a centralização do processo de tomada de decisões dos partidos da região. O material empírico provém da pesquisa sobre Partidos Políticos e Governabilidade na América Latina da Universidad de Salamanca.", + "journalAbbreviation": "Opin. Publica", + "language": "pt", "libraryCatalog": "SciELO", "pages": "158-188", "publicationTitle": "Opinião Pública", - "shortTitle": "How candidates for the Presidency are nominated?", - "url": "http://www.scielo.br/scielo.php?script=sci_abstract&pid=S0104-62762002000200002&lng=en&nrm=iso&tlng=pt", + "shortTitle": "Como se escolhe um candidato a Presidente?", + "url": "https://www.scielo.br/j/op/a/JNgwxBLSnHQnSJbzhkRbCBq/?lang=pt", "volume": "8", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "América Latina" + }, + { + "tag": "eleições internas" }, { - "title": "Snapshot" + "tag": "partidos políticos" + }, + { + "tag": "seleção de candidatos" } ], - "tags": [], "notes": [], "seeAlso": [] } @@ -189,12 +230,12 @@ var testCases = [ }, { "type": "web", - "url": "http://search.scielo.org/?q=&lang=pt&count=15&from=0&output=site&sort=&format=summary&fb=&page=1&q=zotero&lang=pt&page=1", + "url": "https://search.scielo.org/?q=&lang=pt&count=15&from=0&output=site&sort=&format=summary&fb=&page=1&q=zotero&lang=pt&page=1", "items": "multiple" }, { "type": "web", - "url": "http://www.scielo.br/scielo.php?script=sci_arttext&pid=S1413-35552013000400328&lang=pt", + "url": "https://www.scielo.br/j/rbfis/a/69tz8bYzpn36wcdTNSGWKyj/?lang=en", "items": [ { "itemType": "journalArticle", @@ -214,47 +255,186 @@ var testCases = [ "firstName": "Stéphane", "lastName": "Bourliataux-Lajoine", "creatorType": "author" + } + ], + "date": "2013-08-01", + "DOI": "https://doi.org/10.1590/S1413-35552013005000097", + "ISSN": "1413-3555, 1809-9246", + "abstractNote": "BACKGROUND: The concepts of quality management have increasingly been introduced into the health sector. Methods to measure satisfaction and quality are examples of this trend. OBJECTIVE: This study aimed to identify the level of customer satisfaction in a physical therapy department involved in the public area and to analyze the key variables that impact the usersâ€(tm) perceived quality. METHOD: A cross-sectional observational study was conducted, and 95 patients from the physical therapy department of the Hospital Universitário Gaffrée e Guinle - Universidade Federal do Estado do Rio de Janeiro (HUGG/UNIRIO) - Rio de Janeiro, Brazil, were evaluated by the SERVQUAL questionnaire. A brief questionnaire to identify the sociocultural profile of the patients was also performed. RESULTS: Patients from this health service presented a satisfied status with the treatment, and the population final average value in the questionnaire was 0.057 (a positive value indicates satisfaction). There was an influence of the educational level on the satisfaction status (χ‡Â²=17,149; p=0.002). A correlation was found between satisfaction and the dimensions of tangibility (rho=0.56, p=0.05) and empathy (rho=0.46, p=0.01) for the Unsatisfied group. Among the Satisfied group, the dimension that was correlated with the final value of the SERVQUAL was responsiveness (rho=0.44, p=0.01). CONCLUSIONS: The final values of the GGUH physical therapy department showed that patients can be satisfied even in a public health service. Satisfaction measures must have a multidimensional approach, and we found that people with more years of study showed lower values of satisfaction.", + "journalAbbreviation": "Braz. J. Phys. Ther.", + "language": "en", + "libraryCatalog": "SciELO", + "pages": "328-335", + "publicationTitle": "Brazilian Journal of Physical Therapy", + "url": "https://www.scielo.br/j/rbfis/a/69tz8bYzpn36wcdTNSGWKyj/?lang=en", + "volume": "17", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "health management" }, { - "firstName": "Renato S.", - "lastName": "Almeida", + "tag": "physical therapy" + }, + { + "tag": "user satisfaction" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.scielo.br/j/estpsi/a/RD9ttYPdZ9p8GfdmrXXNtKn/?lang=en", + "items": [ + { + "itemType": "journalArticle", + "title": "Challenges of Indigenous Psychology in providing assistance to university students", + "creators": [ + { + "firstName": "Érica Soares", + "lastName": "Assis", "creatorType": "author" }, { - "firstName": "Leandro A. C.", - "lastName": "Nogueira", + "firstName": "Leandro Pires", + "lastName": "Gonçalves", "creatorType": "author" }, { - "firstName": "Stéphane", - "lastName": "Bourliataux-Lajoine", + "firstName": "Flávio Henrique", + "lastName": "Rodrigues", + "creatorType": "author" + }, + { + "firstName": "Kellen Natalice", + "lastName": "Vilharva", + "creatorType": "author" + }, + { + "firstName": "Nelson Filice de", + "lastName": "Barros", "creatorType": "author" } ], - "date": "08/2013", - "DOI": "10.1590/S1413-35552013005000097", - "ISSN": "1413-3555", - "abstractNote": "BACKGROUND: The concepts of quality management have increasingly been introduced into the health sector. Methods to measure satisfaction and quality are examples of this trend. OBJECTIVE: This study aimed to identify the level of customer satisfaction in a physical therapy department involved in the public area and to analyze the key variables that impact the usersâ€(tm) perceived quality. METHOD: A cross-sectional observational study was conducted, and 95 patients from the physical therapy department of the Hospital Universitário Gaffrée e Guinle - Universidade Federal do Estado do Rio de Janeiro (HUGG/UNIRIO) - Rio de Janeiro, Brazil, were evaluated by the SERVQUAL questionnaire. A brief questionnaire to identify the sociocultural profile of the patients was also performed. RESULTS: Patients from this health service presented a satisfied status with the treatment, and the population final average value in the questionnaire was 0.057 (a positive value indicates satisfaction). There was an influence of the educational level on the satisfaction status (χ‡Â²=17,149; p=0.002). A correlation was found between satisfaction and the dimensions of tangibility (rho=0.56, p=0.05) and empathy (rho=0.46, p=0.01) for the Unsatisfied group. Among the Satisfied group, the dimension that was correlated with the final value of the SERVQUAL was responsiveness (rho=0.44, p=0.01). CONCLUSIONS: The final values of the GGUH physical therapy department showed that patients can be satisfied even in a public health service. Satisfaction measures must have a multidimensional approach, and we found that people with more years of study showed lower values of satisfaction.Key words: health management; physical therapy; user satisfaction", - "issue": "4", + "date": "2024-07-15", + "DOI": "https://doi.org/10.1590/1982-0275202441e230095en", + "ISSN": "0103-166X, 1982-0275", + "abstractNote": "Objective  This article aims to discuss the approach of indigenous psychology in the care of indigenous students in a university framework.Method  Using a qualitative method, this article presents a case study detailing the formation trajectory of the Rede de Escuta e Desaprendizagens Étnico-Subjetivas (Network of Ethno-Subjective Listen-ing and Unlearning) to review the application of the principles of indigenous psychology in sup-porting indigenous students and their families at Universidade Estadual de Campinas (Unicamp, State University of Campinas), Brazil.Results  The study highlighted the need to recognize different epistemologies for respectful therapeutic connections. Challenges were faced in the application of practices aligned with indigenous psychology, emphasizing co-authorship in sessions, valuing patients’ perspectives, and continuous unlearning. The study of the cultural elements of the ethnicities involved proved crucial to avoid the pathologization of indigenous worldviews and subjectivities.Conclusion  Indigenous psychology presents itself as a tool for the changes in the cultural struggles, highlighting the gap in clinical approaches and the urgent need for further studies to develop personalized interven-tions for the care of the diverse indigenous ethnicities.Keywords Mental health in ethnic groups; Mental health services; Psychology; Psychosocial support systems; Students", + "journalAbbreviation": "Estud. psicol. (Campinas)", + "language": "en", "libraryCatalog": "SciELO", - "pages": "328-335", - "publicationTitle": "Brazilian Journal of Physical Therapy", - "url": "http://www.scielo.br/scielo.php?script=sci_abstract&pid=S1413-35552013000400328&lng=en&nrm=iso&tlng=en", - "volume": "17", + "pages": "e230095", + "publicationTitle": "Estudos de Psicologia (Campinas)", + "url": "https://www.scielo.br/j/estpsi/a/RD9ttYPdZ9p8GfdmrXXNtKn/?lang=en", + "volume": "41", "attachments": [ { "title": "Full Text PDF", "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Mental health in ethnic groups" + }, + { + "tag": "Mental health services" + }, + { + "tag": "Psychology" + }, + { + "tag": "Psychosocial support systems" + }, + { + "tag": "Students" + } + ], + "notes": [], + "seeAlso": [] + } + ] + }, + { + "type": "web", + "url": "https://www.scielo.br/j/estpsi/a/RD9ttYPdZ9p8GfdmrXXNtKn/?lang=pt", + "items": [ + { + "itemType": "journalArticle", + "title": "Desafios da Psicologia Indígena no atendimento a estudantes universitários", + "creators": [ + { + "firstName": "Érica Soares", + "lastName": "Assis", + "creatorType": "author" + }, + { + "firstName": "Leandro Pires", + "lastName": "Gonçalves", + "creatorType": "author" + }, + { + "firstName": "Flávio Henrique", + "lastName": "Rodrigues", + "creatorType": "author" + }, + { + "firstName": "Kellen Natalice", + "lastName": "Vilharva", + "creatorType": "author" + }, + { + "firstName": "Nelson Filice de", + "lastName": "Barros", + "creatorType": "author" + } + ], + "date": "2024-07-15", + "DOI": "https://doi.org/10.1590/1982-0275202441e230095pt", + "ISSN": "0103-166X, 1982-0275", + "abstractNote": "Objetivo  Este artigo tem como objetivo discutir a abordagem da psicologia indígena no cuidado de estudantes indígenas em contexto universitário.Método  Utilizando o método qualitativo, este artigo apresenta um estudo de caso detalhando a trajetória de formação da Rede de Escuta e Desaprendizagens Étnico-Subjetivas, para analisar a aplicação dos pressupostos da psicologia indígena no suporte a estudantes indígenas e seus familiares na Universidade Estadual de Campinas.Resultados  Evidenciou-se a necessidade de reconhecer diferentes epistemologias para uma conexão terapêutica respeitosa. Foram observados desafios na aplicação de práticas alinhadas com a psicologia indígena, destacando a coautoria nas sessões, a valorização das perspectivas dos pacientes e as desaprendizagens contínuas. O estudo dos elementos culturais das etnias envolvidas mostrou-se crucial para evitar a patologização das cosmovisões e subjetividades indígenas.Conclusão  A psicologia indígena apresenta-se como um vetor de mudança nas disputas de narrativas culturais, destacando a lacuna na abordagem clínica e a necessidade urgente de estudos para desenvolver intervenções personalizadas para o atendimento das diferentes etnias indígenas.Palavras-chave Estudantes; Psicologia; Saúde mental em grupos étnicos; Serviços de saúde mental; Sistemas de apoio psicossocial", + "journalAbbreviation": "Estud. psicol. (Campinas)", + "language": "pt", + "libraryCatalog": "SciELO", + "pages": "e230095", + "publicationTitle": "Estudos de Psicologia (Campinas)", + "url": "https://www.scielo.br/j/estpsi/a/RD9ttYPdZ9p8GfdmrXXNtKn/?lang=pt", + "volume": "41", + "attachments": [ + { + "title": "Full Text PDF", + "mimeType": "application/pdf" + } + ], + "tags": [ + { + "tag": "Estudantes" + }, + { + "tag": "Psicologia" + }, + { + "tag": "Saúde mental em grupos étnicos" + }, + { + "tag": "Serviços de saúde mental" }, { - "title": "Snapshot" + "tag": "Sistemas de apoio psicossocial" } ], - "tags": [], "notes": [], "seeAlso": [] } ] } ] -/** END TEST CASES **/ \ No newline at end of file +/** END TEST CASES **/ From 8607c377bf57bc618469984ee85954e2f98f2a5c Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 11 Dec 2024 13:50:13 -0500 Subject: [PATCH 156/158] Goodreads: Update for site change https://forums.zotero.org/discussion/120426/goodreads-translator-no-longer-detects-books --- Goodreads.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Goodreads.js b/Goodreads.js index 2c7466b3839..f663faf2667 100644 --- a/Goodreads.js +++ b/Goodreads.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", - "lastUpdated": "2021-07-07 18:32:10" + "lastUpdated": "2024-12-11 18:50:04" } /* @@ -37,7 +37,7 @@ function detectWeb(doc, url) { - if (url.includes('/book/show/') && doc.querySelector('meta[property="books:isbn"]')) { + if (url.includes('/book/show/') && getISBN(doc)) { return "book"; } else if (getSearchResults(doc, true)) { @@ -73,7 +73,7 @@ function doWeb(doc, url) { } function scrape(doc, _url) { - let ISBN = ZU.cleanISBN(attr(doc, 'meta[property="books:isbn"]', 'content')); + let ISBN = getISBN(doc); // adapted from Amazon translator let search = Zotero.loadTranslator('search'); @@ -93,6 +93,13 @@ function scrape(doc, _url) { search.getTranslators(); } +function getISBN(doc) { + let json = text(doc, 'script[type="application/ld+json"]'); + if (!json) return null; + json = JSON.parse(json); + return json.isbn; +} + /** BEGIN TEST CASES **/ var testCases = [ { From 3226b5a963c4130e8c695e22339f89d0755a6fe8 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 14 Dec 2024 01:36:04 -0500 Subject: [PATCH 157/158] CI: Update actions/cache to v4 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88a8b8a4a65..19efca713d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: - name: Cache connector code id: connector-cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: .ci/pull-request-check/connectors key: connectors-${{ hashFiles('.ci/pull-request-check/check-pull-request.sh') }}-${{ steps.get-connector-hash.outputs.hash }} From 368d01bb94ba9ba0c8c8fea6cb2457db938a2f56 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Tue, 17 Dec 2024 10:41:06 -0500 Subject: [PATCH 158/158] Open WorldCat: Handle updated response format --- Open WorldCat.js | 409 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 298 insertions(+), 111 deletions(-) diff --git a/Open WorldCat.js b/Open WorldCat.js index 1cc7188f2d7..6cbace90f48 100644 --- a/Open WorldCat.js +++ b/Open WorldCat.js @@ -9,7 +9,7 @@ "inRepository": true, "translatorType": 12, "browserSupport": "gcsibv", - "lastUpdated": "2024-11-12 16:47:59" + "lastUpdated": "2024-12-17 15:40:52" } /* @@ -118,14 +118,8 @@ const RECORD_MAPPING = { }; function detectWeb(doc, url) { - let nextData = doc.querySelector('#__NEXT_DATA__'); - if (url.includes('/title/') && nextData) { - try { - return getItemType(JSON.parse(nextData.textContent).props.pageProps.record); - } - catch (e) { - return 'book'; - } + if (url.includes('/title/')) { + return getPageItemType(doc); } else if (getSearchResults(doc, true)) { return 'multiple'; @@ -137,7 +131,26 @@ function detectWeb(doc, url) { return false; } -function getItemType(record) { +function getPageItemType(doc) { + let format = text(doc, 'span[id^="format"]').toLowerCase(); + if ( + format.includes('article') // en, fr + || format.includes('článek') // cs + || format.includes('artikel') // de, nl + || format.includes('artículo') // es + || format.includes('articolo') // it + || format.includes('記事') // ja + || format.includes('문서') // ko + || format.includes('artigo') // pt + || format.includes('บทความ') // th + || format.includes('文章') // zh + ) { + return 'journalArticle'; + } + return 'book'; +} + +function getRecordItemType(record) { if (record.generalFormat == 'ArtChap') { if (record.specificFormat == 'Artcl') { return 'journalArticle'; @@ -180,20 +193,19 @@ async function doWeb(doc, url) { } async function scrape(doc, url = doc.location.href) { - let record = null; - try { - record = JSON.parse(text(doc, '#__NEXT_DATA__')).props.pageProps.record; - } - catch (e) {} - if (!record || !url.includes('/' + record.oclcNumber)) { - Zotero.debug('__NEXT_DATA__ is stale; requesting page again'); - doc = await requestDocument(url); - record = JSON.parse(text(doc, '#__NEXT_DATA__')).props.pageProps.record; - } - scrapeRecord([record]); + let oclcNumber = getOCLCNumber(url); + let record = await requestJSON('https://search.worldcat.org/api/search-item/' + oclcNumber, { + headers: { Referer: url } + }); + scrapeRecords([record]); } -function scrapeRecord(records) { +function getOCLCNumber(url) { + let matches = new URL(url).pathname.match(/\/(?:oclc|title)\/(\d+)/); + return matches && matches[1]; +} + +function scrapeRecords(records) { for (let record of records) { Z.debug(record); @@ -205,7 +217,7 @@ function scrapeRecord(records) { continue; } - let item = new Zotero.Item(getItemType(record)); + let item = new Zotero.Item(getRecordItemType(record)); for (let [key, mapper] of Object.entries(RECORD_MAPPING)) { if (!record[key]) continue; if (typeof mapper == 'string') { @@ -275,33 +287,57 @@ async function doSearch(items) { } var ids = [], isbns = []; - for (let i = 0; i < items.length; i++) { - if (items[i].identifiers && items[i].identifiers.oclc) { - ids.push(items[i].identifiers.oclc); + for (let item of items) { + if (item.identifiers && item.identifiers.oclc) { + ids.push(item.identifiers.oclc); continue; } - - isbns.push(items[i].ISBN); + else if (item.ISBN) { + isbns.push(item.ISBN); + } } let secureToken = await getSecureToken(); let cookie = `wc_tkn=${encodeURIComponent(secureToken)}`; - ids = await fetchIDs(isbns, ids, cookie); - if (!ids.length) { - Z.debug("Could not retrieve any OCLC IDs"); - Zotero.done(false); - return; + + let found = false; + + for (let isbn of isbns) { + // As of 10/19/2022, WorldCat's API seems to do an unindexed lookup for ISBNs without hyphens, + // with requests taking 40+ seconds, so we hyphenate them + isbn = wcHyphenateISBN(isbn); + let url = "https://search.worldcat.org/api/search?q=bn%3A" + + encodeURIComponent(isbn); + let json = await requestJSON(url, { + headers: { + Referer: 'https://search.worldcat.org/search?q=', + Cookie: cookie + } + }).then(decryptResponse); + if (json && json.briefRecords && json.briefRecords.length) { + scrapeRecords([json.briefRecords[0]]); + found = true; + } } - var url = "https://www.worldcat.org/api/search?q=no%3A" - + ids.map(encodeURIComponent).join('+OR+no%3A'); - let json = await requestJSON(url, { - headers: { - Referer: 'https://worldcat.org/search?q=', - Cookie: cookie + + if (ids.length) { + var url = "https://www.worldcat.org/api/search?q=no%3A" + + ids.map(encodeURIComponent).join('+OR+no%3A'); + let json = await requestJSON(url, { + headers: { + Referer: 'https://worldcat.org/search?q=', + Cookie: cookie + } + }).then(decryptResponse); + if (json.briefRecords && json.briefRecords.length) { + scrapeRecords(json.briefRecords); + found = true; } - }); - if (json.briefRecords) { - scrapeRecord(json.briefRecords); + } + + if (!found) { + Z.debug("Could not retrieve any OCLC IDs"); + Zotero.done(false); } } @@ -328,27 +364,6 @@ async function getSecureToken() { return secureToken; } -async function fetchIDs(isbns, ids, cookie) { - while (isbns.length) { - let isbn = isbns.shift(); - // As of 10/19/2022, WorldCat's API seems to do an unindexed lookup for ISBNs without hyphens, - // with requests taking 40+ seconds, so we hyphenate them - isbn = wcHyphenateISBN(isbn); - let url = "https://www.worldcat.org/api/search?q=bn%3A" - + encodeURIComponent(isbn); - let json = await requestJSON(url, { - headers: { - Referer: 'https://worldcat.org/search?q=', - Cookie: cookie - } - }); - if (json.briefRecords && json.briefRecords.length) { - scrapeRecord([json.briefRecords[0]]); - } - } - return ids; -} - // Copied from Zotero.Utilities.Internal.hyphenateISBN() function wcHyphenateISBN(isbn) { // Copied from isbn.js @@ -422,16 +437,127 @@ function wcHyphenateISBN(isbn) { return parts.join('-'); } +const MODES = { + 1: ['slice', [[0, 64]], [[64]]], + 2: ['slice', [[-64]], [[0, -64]]], + 3: ['slice', [[0, 32], [-32]], [[32, -32]]], + 4: ['splitInterlaced', true], + 5: ['splitInterlaced', false], + 6: ['slice', [[0, 22], [-42]], [[22, -42]]], + 7: ['slice', [[0, 16], [-48]], [[16, -48]]], + 8: ['slice', [[0, 48], [-16]], [[48, -16]]], + 9: ['slice', [[0, 42], [-22]], [[42, -22]]], +}; + +const METHODS = { + slice(input, secretKeySlices, encryptedDataSlices) { + let secretKey = ''; + let encryptedData = ''; + for (let sliceArgs of secretKeySlices) { + secretKey += input.slice(...sliceArgs); + } + for (let sliceArgs of encryptedDataSlices) { + encryptedData += input.slice(...sliceArgs); + } + return { + secretKey, + encryptedData, + }; + }, + + splitInterlaced(input, useEvenIndices) { + let chars = Array.from(input); + let secretKey = ''; + let encryptedData = ''; + + let keyIndices = new Set(Array.from(new Array(64), (_, i) => i * 2 + (useEvenIndices ? 0 : 1)) + .filter(i => i < input.length)); + for (let i = 0; i < chars.length; i++) { + if (keyIndices.has(i)) { + secretKey += chars[i]; + } + else { + encryptedData += chars[i]; + } + } + + return { + secretKey, + encryptedData, + }; + } +}; + +function split(input, mode) { + let [, flipFlag, index] = mode; + Zotero.debug(`Mode: ${mode}`); + if (flipFlag === '1') { + input = input.split('').reverse().join(''); + } + let [method, ...args] = MODES[index]; + Zotero.debug(`Running ${method}(input, ${args.map(obj => JSON.stringify(obj)).join(', ')})`); + return METHODS[method](input, ...args); +} + +function hexToBytes(hex) { + let len = hex.length / 2; + let bytes = new Uint8Array(len); + for (let i = 0; i < len; i++) { + let byte = parseInt(hex[i * 2] + hex[i * 2 + 1], 16); + bytes[i] = byte; + } + return bytes; +} + +async function decrypt(p, x, l) { + let ivHex = x.slice(0, -3); + let mode = x.slice(-3); + + let { encryptedData, secretKey: keyHex } = split(p, mode); + + let ciphertext1 = hexToBytes(encryptedData); + let ciphertext2 = hexToBytes(l); + let ciphertext = new Uint8Array(ciphertext1.length + ciphertext2.length); + ciphertext.set(ciphertext1); + ciphertext.set(ciphertext2, ciphertext1.length); + + let keyBytes = hexToBytes(keyHex); + let key = await crypto.subtle.importKey( + 'raw', + keyBytes, + { name: 'AES-GCM' }, + false, + ['decrypt'] + ); + + let ivBytes = hexToBytes(ivHex); + let cleartextBytes = await crypto.subtle.decrypt({ + name: 'AES-GCM', + iv: ivBytes, + tagLength: 128 + }, key, ciphertext); + + return new TextDecoder().decode(cleartextBytes); +} + +async function decryptResponse(json) { + if ('p' in json && 'x' in json && 'l' in json) { + return JSON.parse(await decrypt(json.p, json.x, json.l)); + } + return json; +} + /** BEGIN TEST CASES **/ var testCases = [ { "type": "web", - "url": "http://www.worldcat.org/search?qt=worldcat_org_bks&q=argentina&fq=dt%3Abks", + "url": "https://search.worldcat.org/search?q=test&offset=1", + "defer": true, "items": "multiple" }, { "type": "web", - "url": "https://www.worldcat.org/title/489605", + "url": "https://search.worldcat.org/title/489605", "items": [ { "itemType": "book", @@ -466,6 +592,9 @@ var testCases = [ { "tag": "Argentina History 1810-" }, + { + "tag": "Argentine" + }, { "tag": "Argentine Histoire" }, @@ -483,6 +612,102 @@ var testCases = [ }, { "tag": "Since 1810" + }, + { + "tag": "armed forces" + }, + { + "tag": "artículo bibliográfico" + }, + { + "tag": "aspect sociologique" + }, + { + "tag": "aspecto sociológico" + }, + { + "tag": "desarrollo económico" + }, + { + "tag": "développement économique" + }, + { + "tag": "dirección política" + }, + { + "tag": "direction politique" + }, + { + "tag": "economic development" + }, + { + "tag": "forces armées" + }, + { + "tag": "fuerzas armadas" + }, + { + "tag": "gobierno" + }, + { + "tag": "gouvernement" + }, + { + "tag": "government" + }, + { + "tag": "histoire" + }, + { + "tag": "historia" + }, + { + "tag": "history" + }, + { + "tag": "immigrant" + }, + { + "tag": "independence" + }, + { + "tag": "independencia" + }, + { + "tag": "indépendance" + }, + { + "tag": "inmigrante" + }, + { + "tag": "literature survey" + }, + { + "tag": "nacionalista" + }, + { + "tag": "nationalist" + }, + { + "tag": "nationaliste" + }, + { + "tag": "political leadership" + }, + { + "tag": "political problem" + }, + { + "tag": "problema político" + }, + { + "tag": "problème politique" + }, + { + "tag": "revue de littérature" + }, + { + "tag": "sociological aspect" } ], "notes": [], @@ -492,7 +717,7 @@ var testCases = [ }, { "type": "web", - "url": "https://www.worldcat.org/title/42854423", + "url": "https://search.worldcat.org/title/42854423", "items": [ { "itemType": "book", @@ -520,7 +745,7 @@ var testCases = [ "place": "Cambridge, Mass.", "publisher": "MIT Press", "series": "MIT Press/Bradford Books series in cognitive psychology", - "url": "http://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&db=nlabk&AN=1712", + "url": "https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&db=nlabk&AN=1712", "attachments": [], "tags": [ { @@ -553,9 +778,6 @@ var testCases = [ { "tag": "Developmental psychobiology" }, - { - "tag": "Electronic books" - }, { "tag": "Enfants" }, @@ -618,7 +840,7 @@ var testCases = [ }, { "type": "web", - "url": "https://www.worldcat.org/title/60321422", + "url": "https://search.worldcat.org/title/60321422", "items": [ { "itemType": "book", @@ -640,7 +862,7 @@ var testCases = [ "place": "Cambridge", "publisher": "Cambridge University Press", "series": "Cambridge companions to philosophy", - "url": "http://catdir.loc.gov/catdir/toc/ecip0512/2005011910.html", + "url": "http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=014576804&line_number=0002&func_code=DB_RECORDS&service_type=MEDIA", "attachments": [], "tags": [ { @@ -942,7 +1164,8 @@ var testCases = [ }, { "type": "web", - "url": "https://www.worldcat.org/title/4933578953", + "url": "https://search.worldcat.org/title/4933578953", + "detectedItemType": "book", "items": [ { "itemType": "journalArticle", @@ -968,6 +1191,7 @@ var testCases = [ "libraryCatalog": "DOI.org (Crossref)", "pages": "205-224", "publicationTitle": "Journal of Asian Economics", + "rights": "https://www.elsevier.com/tdm/userlicense/1.0/", "shortTitle": "Navigating the trilemma", "url": "https://linkinghub.elsevier.com/retrieve/pii/S104900780900013X", "volume": "20", @@ -980,41 +1204,7 @@ var testCases = [ }, { "type": "web", - "url": "https://www.worldcat.org/search?q=isbn%3A7112062314", - "defer": true, - "items": [ - { - "itemType": "book", - "title": "中囯园林假山", - "creators": [ - { - "lastName": "毛培琳", - "creatorType": "author", - "fieldMode": 1 - }, - { - "lastName": "朱志红", - "creatorType": "author", - "fieldMode": 1 - } - ], - "date": "2005", - "ISBN": "9787112062317", - "extra": "OCLC: 77641948", - "language": "Chinese", - "libraryCatalog": "Open WorldCat", - "place": "北京", - "publisher": "中囯建筑工业出版社", - "attachments": [], - "tags": [], - "notes": [], - "seeAlso": [] - } - ] - }, - { - "type": "web", - "url": "https://www.worldcat.org/title/994342191", + "url": "https://search.worldcat.org/title/994342191", "items": [ { "itemType": "book", @@ -1050,9 +1240,6 @@ var testCases = [ "url": "https://www.taylorfrancis.com/books/e/9781315165127", "attachments": [], "tags": [ - { - "tag": "Electronic books" - }, { "tag": "Encyclopedias" },