"code": "OSTMA", \
"ebrary_code": "algomauca", \
"proxy": "http://libproxy.auc.ca/login?url=", \
- "link_text": "Available online" \
+ "link_text": "Available online", \
+ "access_note": "Access restricted to users with a valid Algoma University ID" \
}
self.laurentian = { \
"code": "OSUL", \
"ebrary_code": "jndlu", \
"proxy": "https://librweb.laurentian.ca/login?url=", \
- "link_text": "Available online / disponible en ligne" \
+ "link_text": "Available online / disponible en ligne", \
+ "access_note": "Access restricted to users with a valid Laurentian University ID" \
}
self.windsor = { \
"code": "OWA", \
"ebrary_code": "oculwindsor", \
"proxy": "http://ezproxy.uwindsor.ca/login?url=", \
- "link_text": "To view Windsor's electronic resource click here." \
+ "link_text": "To view Windsor's electronic resource click here.", \
+ "access_note": "Access restricted to users with a valid University of Windsor ID" \
}
def get_settings(self, lib):
The script customizes the following aspects of each record:
+ * Adds a 506 access restriction note per institution
* Adds one 856 per institution specified at the command line:
* $u (URL) - prepends the institutional proxy and, for eBrary records,
changes the insitutional code
* $y (link text) - sets preferred text of the link to the resource
* $z (public note) - sets public note for the resource
-
+ * $9 - sets the institutional code for located URIs in Evergreen
* Adds a 710 field to identify the publisher using the value specified
at the command line
* Adds a 590 internal note field using the value specified at the command
-o / --output : The name of the output MARC file.
- -p / --publisher : The name of the publisher to be inserted in a 710 field.
+ -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
+ and each 506$e access restriction note.
-A / --algoma: Add an 856 for Algoma University
_options['--input'] = val
elif key == '-o':
_options['--output'] = val
+ elif key == '-c':
+ _options['--consortium'] = val
elif key == '-p':
_options['--publisher'] = val
elif key == '-n':
print "* Missing -o / --output argument!"
_help = True
+ if '--consortium' not in options:
+ print "* Missing -c / --consortium argument!"
+ _help = True
+
if '--publisher' not in options:
print "* Missing -p / --publisher argument!"
_help = True
clean_opts = dict()
clean_opts['publisher'] = options['--publisher']
+ clean_opts['consortium'] = options['--consortium']
if '--sample' in options:
clean_opts['sample'] = options['--sample']
new_record.add_field(field)
add_publisher(record, new_record, options)
+ add_restriction(new_record, options)
if 'note' in options:
note = pymarc.Field(tag = '590',
)
new_record.add_field(seven_ten)
+def add_restriction(new_record, options):
+ """
+ Adds a 506 access restriction note per institution
+
+ The 506 field includes the following subfields:
+ * $a - Standard text to display
+ * $b - Jurisdiction (identifies the consortial license)
+ * $e - Authorization (online publisher that enforces authorization)
+ * $5 - Institutional code to which this note applies
+ """
+
+ for library in options['libraries']:
+ libopts = options['settings'].get_settings(library)
+ # Add the access restriction note
+ note = pymarc.Field(tag = '506',
+ indicators = ['1', ' '],
+ subfields = [
+ 'a', libopts['access_note'],
+ 'b', options['consortium'],
+ 'e', options['publisher'],
+ '5', libopts['code']
+ ]
+ )
+ new_record.add_field(note)
def add_cat_source(record, options):
"""Add or extend the 040 field to identify the cataloguing source"""