[ejpimport] Update import script
Goals;
- Support to have changes made to the data mapping on imports _ we should be able to identify changes made to data mapping in elifes datahub that breaks import into Kotahi.
- Import should be running. Only importing objects that have review and/or reviews + assessments.
- Update imports. Known issues; unable import preprint version URL, publishing or peer review state data.
Introduced changes
The result of the overall refactoring of the plugin introduced changes in the way the plugin should be configured.
When it comes to deployments, the sys-admin should be responsible to always pull the latest version of the plugin from its repo
The path on host where the code of the plugin resides should be mounted in Kotahi's server container e.g. host_plugin_path:/home/node/app/config/plugins/import-from-docmap
A configuration file should exist also on the host's side with content:
module.exports = {
'import-from-docmaps': {
dataHubURL:
'URL value of Data hub',
dataHubUsername: 'given_username',
dataHubPassword: 'given_password',
crossrefURL: 'URL value of Crossref',
},
}
The above file should also be mounted in Kotahi's server container e.g. host_config_file_path:/home/node/app/config/local.js
Also a file which will represent the plugins_manifest should be mounted in the container:
[
{
"groupName": "kotahi",
"plugins": [
{
"name": "Import preprints from DataHub Docmaps",
"folderName": "import-from-docmap"
}
]
}
]
That file should be mounted host_manifest_path:/home/node/app/config/plugins/plugins_manifest.json