コード例 #1
0
ファイル: compile.py プロジェクト: uniphil/trc-plaintext
 def to_site(self, el):
     # import pdb; pdb.set_trace()
     # site = to_html_string(el)
     # with open(self.output_folder + '/TRC-2015-Executive-Summary.html', 'w') as f:
     #     f.write(site.encode('utf-8'))
     # return ''
     return to_html_string(el)
コード例 #2
0
def parse_description(sequence, index, *stop_tags):
    desc = ""
    while len(sequence) > index and sequence[index].tag not in stop_tags:
        desc += to_html_string(sequence[index]) + "\n"
        index += 1
    return desc.strip() if desc else None, index
コード例 #3
0
ファイル: entities.py プロジェクト: vmarkovtsev/plueprint
def parse_description(sequence, index, *stop_tags):
    desc = ""
    while len(sequence) > index and sequence[index].tag not in stop_tags:
        desc += to_html_string(sequence[index]) + "\n"
        index += 1
    return desc.strip() if desc else None, index