From: Dan Scott Date: Wed, 22 Jun 2011 14:16:55 +0000 (-0400) Subject: On closer inspection, 506$e != 710$a X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=120a34d5d409afefccef880cb9d43bec2a8b4a4a;p=contrib%2FConifer.git On closer inspection, 506$e != 710$a The 710 is being used for the imprint, while the 506$e is being used to identify the online platform. It's questionable whether this should be required - for example, a 506 wouldn't be necessary for Project Gutenberg materials - but let's go with that for now anyway. Signed-off-by: Dan Scott --- diff --git a/tools/ebooks/prep_ebook_records.py b/tools/ebooks/prep_ebook_records.py index f86e9773a6..92fd8d1c05 100644 --- a/tools/ebooks/prep_ebook_records.py +++ b/tools/ebooks/prep_ebook_records.py @@ -83,11 +83,13 @@ Required arguments: -o / --output : The name of the output MARC file. + -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 - and each 506$e access restriction note. + -p / --publisher : The name of the publisher to be inserted in a 710 field. -A / --algoma: Add an 856 for Algoma University @@ -118,6 +120,8 @@ def consolidate_options(opts): _options['--input'] = val elif key == '-o': _options['--output'] = val + elif key == '-a': + _options['--authorization'] = val elif key == '-c': _options['--consortium'] = val elif key == '-p': @@ -157,6 +161,10 @@ def check_options(options): print "* Missing -c / --consortium argument!" _help = True + if '--restriction' not in options: + print "* Missing -a / --authorization argument!" + _help = True + if '--publisher' not in options: print "* Missing -p / --publisher argument!" _help = True @@ -187,6 +195,7 @@ def check_options(options): clean_opts = dict() clean_opts['publisher'] = options['--publisher'] clean_opts['consortium'] = options['--consortium'] + clean_opts['authorization'] = options['--authorization'] if '--sample' in options: clean_opts['sample'] = options['--sample'] @@ -338,7 +347,7 @@ def add_restriction(new_record, options): 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) + * $e - Authorization (online platform that enforces authorization) * $5 - Institutional code to which this note applies """ @@ -350,7 +359,7 @@ def add_restriction(new_record, options): subfields = [ 'a', libopts['access_note'], 'b', options['consortium'], - 'e', options['publisher'], + 'e', options['authorization'], '5', libopts['code'] ] )