-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplugin_settings.py
72 lines (63 loc) · 1.58 KB
/
plugin_settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
PLUGIN_NAME = 'Import Plugin'
DESCRIPTION = 'This plugin is a collection of import scripts.'
AUTHOR = 'Birkbeck Centre for Technology and Publishing'
VERSION = '1.10'
SHORT_NAME = 'imports'
MANAGER_URL = 'imports_index'
JANEWAY_VERSION = "1.7.0"
from utils import models
def install():
new_plugin, created = models.Plugin.objects.get_or_create(
name=SHORT_NAME,
defaults={'version': VERSION},
)
if created:
print('Plugin {0} installed.'.format(PLUGIN_NAME))
else:
print('Plugin {0} is already installed.'.format(PLUGIN_NAME))
def hook_registry():
return {
'journal_admin_nav_block': {'module': 'plugins.imports.hooks', 'function': 'nav_hook'}
}
UPDATE_CSV_HEADERS = [
'Janeway ID',
'Article title',
'Article abstract',
'Keywords',
'Rights',
'Licence',
'Language',
'Peer reviewed (Y/N)',
'Author salutation',
'Author given name',
'Author middle name',
'Author surname',
'Author suffix',
'Author email',
'Author ORCID',
'Author institution',
'Author department',
'Author biography',
'Author is primary (Y/N)',
'Author is corporate (Y/N)',
'DOI',
'DOI (URL form)',
'Date accepted',
'Date published',
'Article number',
'First page',
'Last page',
'Page numbers (custom)',
'Competing interests',
'Article section',
'Stage',
'File import identifier',
'Journal code',
'Journal title override',
'ISSN override',
'Volume number',
'Issue number',
'Issue title',
'Issue pub date',
'PDF URI',
]