Skip to content

Commit

Permalink
Merge pull request #113 from MITLibraries/marc-status
Browse files Browse the repository at this point in the history
Filter MARC records based on status
  • Loading branch information
Mike Graves committed Dec 10, 2019
2 parents 80ef3e3 + a370eea commit dc5332e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions slingshot/marc.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@


def filter_record(record):
return ('655' in record) and (record['655']['a'] == 'Maps.') and \
return record.leader[5] in ('a', 'c', 'n', 'p') and \
('655' in record) and (record['655']['a'] == 'Maps.') and \
('852' in record) and \
(formats(record).intersection(DC_FORMAT_S.keys())) and \
(record['852']['c'] in ('MAPRM', 'GIS'))
(formats(record).intersection(DC_FORMAT_S.keys())) and \
(record['852']['c'] in ('MAPRM', 'GIS'))


def formats(record):
Expand Down

0 comments on commit dc5332e

Please sign in to comment.