コード例 #1
0
ファイル: marc_binary.py プロジェクト: rajbot/openlibrary
 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)
コード例 #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)
コード例 #3
0
ファイル: html.py プロジェクト: amoghravish/openlibrary
 def html(self):
     return '<br>\n'.join(self.html_line(t, l) for t, l in get_all_tag_lines(self.data))
コード例 #4
0
 def html(self):
     return '<br>\n'.join(
         self.html_line(t, l) for t, l in get_all_tag_lines(self.data))
コード例 #5
0
ファイル: html.py プロジェクト: termim/openlibrary
def as_html(data):
    return '<br>\n'.join(html_line(t, l) for t, l in get_all_tag_lines(data))