Exemple #1
0
def list_posts():
    posts = [Post.constructFromPath(pf) for pf in list_files(conf.POST_PATH)]
    posts = posts[::-1]
    return json.dumps([p.postStringMap() for p in posts])
Exemple #2
0
def get_post(path_base64):
    # Get post infor
    post = Post.constructFromPath(B64_b64decode(path_base64))
    return post.dumpJSONData()