Refine the 506 $3 punctuation decision
authorDan Scott <dan@coffeecode.net>
Wed, 20 Jul 2011 19:23:32 +0000 (15:23 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 7 May 2013 18:36:31 +0000 (14:36 -0400)
From Graham Staffen:

My definitive answer (until I develop a revised definitive answer) is
that a period would always punctuate the end of the subfield except in
two instances: 1) a closing parenthesis, 2) a closing square bracket. I
have this from our MARC coding trainer who could think of no other
instances when a period is not employed.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
tools/ebooks/prep_ebook_records.py

index efe34d9..7a607e9 100644 (file)
@@ -496,7 +496,7 @@ def add_restriction(new_record, options):
 
     # Add a period if the authorization ends with a number or letter
     authnote = options['authorization']
-    if re.match(r'[a-zA-Z0-9]', authnote[-1]):
+    if authnote[-1] not in '.)]':
         authnote += '.'
 
     for library in options['libraries']: