-a / --authorization: The name of the online platorm to be inserted in each
506$e access restriction note.
- -c / --consortium : The name of the consortial license to be inserted in
- each 506$b access restriction note.
-
-p / --publisher : The name of the publisher to be inserted in a 710 field
with a subfield 4 relator code 'pbl'.
-L / --laurentian: Add an 856 for Laurentian University
Optional arguments:
+ -c / --consortium : The name of the consortial license to be inserted in
+ each 506$b access restriction note.
+
-C / --clean : Try to clean up diacritics - some of the records we get
have corrupted diacritics.
_req = {
'--input': "* Missing -i / --input argument!",
'--output': "* Missing -o / --output argument!",
- '--consortium': "* Missing -c / --consortium argument!",
'--authorization': "* Missing -a / --authorization argument!",
'--publisher': "* Missing -p / --publisher argument!"
}
def parse_opts():
"""Get command-line arguments from the script"""
try:
- _short_opts = 'i:o:a:c:p:P:ABLWeCI:d:F:T:t:u:n:s:h'
- _long_opts = ['input=', 'output=', 'authorization=', 'consortium=',
+ _short_opts = 'i:o:a:p:P:ABLc:eCId:F:T:t:u:n:s:x:h'
+ _long_opts = ['input=', 'output=', 'authorization=',
'publisher=', 'platform=', 'algoma', 'boreal', 'laurentian',
- 'ebrary', 'clean', 'isbn-sfx', 'duplicate=',
+ 'consortium=', 'ebrary', 'clean', 'isbn-sfx', 'duplicate=',
'from-format=', 'to-format=', 'tcn=', 'url=', 'note=', 'sample=',
'help'
]
libopts = options['settings'].get_settings(library)
# Add the access restriction note
- note = pymarc.Field(tag = '506',
- indicators = ['1', ' '],
+ if 'consortium' in options:
subfields = [
'a', append_space_semi_space(libopts['access_note']),
'b', append_space_semi_space(options['consortium']),
'e', authnote,
'9', libopts['lac_symbol']
]
+ else:
+ subfields = [
+ 'a', append_space_semi_space(libopts['access_note']),
+ 'e', authnote,
+ '9', libopts['lac_symbol']
+ ]
+ note = pymarc.Field(tag = '506',
+ indicators = ['1', ' '],
+ subfields = subfields
)
new_record.add_ordered_field(note)