"""
import os, os.path, sys, getopt, pymarc, pymarc.marc8, re, urllib2
+from datetime import date
from BeautifulSoup import BeautifulSoup
class Institution():
"proxy": "http://libproxy.auc.ca/login?url=", \
"link_text": "Available online", \
"sfx_url": "http://sfx.scholarsportal.info/algoma", \
- "access_note": "Access restricted to users with a valid Algoma University ID" \
+ "access_note": "Access restricted to users with a valid Algoma University ID ;" \
}
self.laurentian = { \
"proxy": "https://librweb.laurentian.ca/login?url=", \
"link_text": "Available online / disponible en ligne", \
"sfx_url": "http://sfx.scholarsportal.info/laurentian", \
- "access_note": "Access restricted to users with a valid Laurentian University ID" \
+ "access_note": "Access restricted to users with a valid Laurentian University ID ;" \
}
self.windsor = { \
"proxy": "http://ezproxy.uwindsor.ca/login?url=", \
"link_text": "Available online", \
"sfx_url": "http://sfx.scholarsportal.info/windsor", \
- "access_note": "Access restricted to users with a valid University of Windsor ID" \
+ "access_note": "Access restricted to users with a valid University of Windsor ID ;" \
}
def get_settings(self, lib):
new_record.add_field(note)
add_cat_source(new_record, options)
+ add_marc_source(new_record, options)
return new_record
return None
# Replace hyphens
- isbn = isbn_match.group(1).replace('-', '');
+ isbn = isbn_match.group(1).replace('-', '')
return isbn
* $a - Standard text to display
* $b - Jurisdiction (identifies the consortial license)
* $e - Authorization (online platform that enforces authorization)
- * $5 - Institutional code to which this note applies
+ * $9 - Institutional code to which this note applies
"""
for library in options['libraries']:
'a', libopts['access_note'],
'b', options['consortium'],
'e', options['authorization'],
- '5', libopts['code']
+ '9', libopts['code']
]
)
new_record.add_field(note)
)
record.add_field(forty)
+def add_marc_source(record, options):
+ """
+ Add a 598 field identifying the source MARC file name and processing date
+ """
+
+ source = os.path.basename(options['input'])
+
+ marc_source = pymarc.Field(tag = '598',
+ indicators = [' ', ' '],
+ subfields = [
+ 'a', source,
+ 'b', date.today().isoformat()
+ ]
+ )
+ record.add_field(marc_source)
def process_urls(field, options):
"""Creates 856 fields required by Conifer"""