Merge branch 'master' into fix_optional_token
commit
93bba18b79
|
@ -11,7 +11,7 @@ INFO_CC = (
|
|||
('CC0', 'cc0', 'No Rights Reserved (CC0)', 'http://creativecommons.org/about/cc0'),
|
||||
)
|
||||
INFO_PD = (
|
||||
('GFDL', 'gdfl', 'GNU Free Documentaion License', 'http://www.gnu.org/licenses/fdl-1.3-standalone.html'),
|
||||
('GFDL', 'gdfl', 'GNU Free Documentation License', 'http://www.gnu.org/licenses/fdl-1.3-standalone.html'),
|
||||
('PD-US', 'pd-us', 'Public Domain, US', 'http://creativecommons.org/about/pdm'),
|
||||
)
|
||||
INFO_ALL = INFO_CC + INFO_PD
|
||||
|
|
|
@ -32,8 +32,11 @@ def makemarc(marcfile, edition):
|
|||
|
||||
record = pymarc.parse_xml_to_array(marcfile)[0]
|
||||
|
||||
# save this for later before deleting it
|
||||
print_lccn = record.get_fields('010')[0].get_subfields('a')[0]
|
||||
# save lccn for later (if there is one) before deleting it
|
||||
print_lccn = None
|
||||
for lccn in record.get_fields('010'):
|
||||
for validlccn in lccn.get_subfields('a'):
|
||||
print_lccn = validlccn
|
||||
|
||||
fields_to_delete = []
|
||||
fields_to_delete += record.get_fields('001')
|
||||
|
@ -171,14 +174,15 @@ def makemarc(marcfile, edition):
|
|||
record.add_ordered_field(field540)
|
||||
|
||||
# add 588 field (source of description) - credit where credit is due
|
||||
field588 = pymarc.Field(
|
||||
tag='588',
|
||||
indicators = [' ', ' '],
|
||||
subfields = [
|
||||
'a', 'Description based on print version record from the Library of Congress.',
|
||||
]
|
||||
)
|
||||
record.add_ordered_field(field588)
|
||||
if print_lccn:
|
||||
field588 = pymarc.Field(
|
||||
tag='588',
|
||||
indicators = [' ', ' '],
|
||||
subfields = [
|
||||
'a', 'Description based on print version record from the Library of Congress.',
|
||||
]
|
||||
)
|
||||
record.add_ordered_field(field588)
|
||||
|
||||
# add 776 field (related editions) - preserve pISBN, LCCN, OCLCnum
|
||||
title = record.get_fields('245')[0].get_subfields('a')[0]
|
||||
|
@ -192,7 +196,8 @@ def makemarc(marcfile, edition):
|
|||
|
||||
if print_isbn:
|
||||
subfields.extend(['z', print_isbn])
|
||||
subfields.extend(['w', '(DLC) ' + print_lccn, ])
|
||||
if print_lccn:
|
||||
subfields.extend(['w', '(DLC) ' + print_lccn, ])
|
||||
if oclcnum:
|
||||
subfields.extend(['w', '(OCoLC) ' + oclcnum,])
|
||||
|
||||
|
|
|
@ -179,7 +179,9 @@ function put_un_in_cookie2(){
|
|||
<div class="jsmodule">
|
||||
<h3 class="module-title">News</h3>
|
||||
<div class="jsmod-content">
|
||||
Blog: <a href="http://blog.unglue.it/2014/07/23/mur-laffertys-afterlife-series-on-unglue-it/">Mur Lafferty's Afterlife series on Unglue.it!</a>
|
||||
Blog: <a href="http://blog.unglue.it/2014/08/29/zero-sum-game-is-an-exponential-transformation/">SL Huang's <i>Zero Sum Game</a> on Unglue.it!</a>
|
||||
<br /><br />
|
||||
Blog: <a href="http://blog.unglue.it/2014/08/21/non-profit-champion-of-openness-adds-its-first-2-cc-books-to-unglue-it/">METRO NY Library Council Champions Openness</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="jsmodule">
|
||||
|
|
Loading…
Reference in New Issue