Esempio n. 1
0
 def all_fields(self):
     marc8 = self.leader()[9] != 'a'
     for tag, line in handle_wrapped_lines(get_all_tag_lines(self.data)):
         if tag.startswith('00'):
             # marc_upei/marc-for-openlibrary-bigset.mrc:78997353:588
             if tag == '008' and line == '':
                 continue
             assert line[-1] == '\x1e'
             yield tag, line[:-1]
         else:
             yield tag, BinaryDataField(self, line)
Esempio n. 2
0
 def all_fields(self):
     marc8 = self.leader()[9] != 'a'
     for tag, line in fast_parse.handle_wrapped_lines(fast_parse.get_all_tag_lines(self.data)):
         if tag.startswith('00'):
             # marc_upei/marc-for-openlibrary-bigset.mrc:78997353:588
             if tag == '008' and line == '':
                 continue
             assert line[-1] == '\x1e'
             yield tag, line[:-1]
         else:
             yield tag, BinaryDataField(self, line)
Esempio n. 3
0
 def html(self):
     return '<br>\n'.join(self.html_line(t, l) for t, l in get_all_tag_lines(self.data))
Esempio n. 4
0
 def html(self):
     return '<br>\n'.join(
         self.html_line(t, l) for t, l in get_all_tag_lines(self.data))
Esempio n. 5
0
def as_html(data):
    return '<br>\n'.join(html_line(t, l) for t, l in get_all_tag_lines(data))