コード例 #1
0
def html_importer(node, zipfile):
    children = node.getchildren()
    assert len(children) == 1 and children[0].tag == "html"
    path = children[0].get("src")
    body = zipfile.read(path)
    b = HTMLBlock(html=body)
    b.save()
    return b
コード例 #2
0
ファイル: exportimport.py プロジェクト: ccnmtl/diabeaters
def html_importer(node, zipfile):
    children = node.getchildren()
    assert len(children) == 1 and children[0].tag == "html"
    path = children[0].get("src")
    body = zipfile.read(path)
    b = HTMLBlock(html=body)
    b.save()
    return b