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
def get_post_raw_content(post): filename = post["file"] return postsparse.get_blog_post_content(filename)