def _run(self, marc_record):
if self.show_titles:
print('{}\t{}'.format(marc_record.id, marc_record.title()).encode('utf-8'))
else:
print(marc_record.id.encode('utf-8'))
if self.show_subjects:
for field in marc_record.fields:
if field.tag.startswith('6'):
if field.sf('2') == self.source.sf['2']:
print(' {}{}{}'.format(Fore.YELLOW, field, Style.RESET_ALL).encode('utf-8'))
else:
print(' {}{}{}'.format(Fore.CYAN, field, Style.RESET_ALL).encode('utf-8'))
return 0 # No, we didn't modify anything
评论列表
文章目录