Esempio n. 1
0
def get_post_html_content(post):
    filename = post["file"]
    format = post["format"]
    body = postsparse.get_blog_post_content(filename)
    if format == "wphtml":
        body = linebreaks(body)
    elif format == "html":
        # do nothing, leave it as it is
        pass
    elif format == "textile":
        txt = body.encode('utf-8')
        body = textile.textile(txt, encoding='utf-8', output='utf-8')
    else:
        print("Unsupported format: '%s'" % format)
        assert 0
    return body
Esempio n. 2
0
def get_post_html_content(post):
    filename = post["file"]
    format = post["format"]
    body = postsparse.get_blog_post_content(filename)
    if format == "wphtml":
        body = linebreaks(body)
    elif format == "html":
        # do nothing, leave it as it is
        pass
    elif format == "textile":
        txt = body.encode('utf-8')
        body = textile.textile(txt, encoding='utf-8', output='utf-8')
    else:
        print("Unsupported format: '%s'" % format)
    assert 0
    return body
Esempio n. 3
0
def get_post_raw_content(post):
    filename = post["file"]
    return postsparse.get_blog_post_content(filename)
Esempio n. 4
0
def get_post_raw_content(post):
    filename = post["file"]
    return postsparse.get_blog_post_content(filename)