예제 #1
0
def generateIndex():
    posts = markdown_parser.getAllParsedPosts()
    params = getSiteInfo()
    html = TemplateParser.parse(options.current_template_dir, "index.html", posts=posts, params=params)
    
    index_file = open("build/index.html", "wb")
    index_file.write(html)
예제 #2
0
def generate_index():
    posts = markdown_parser.get_all_parsed_posts()
    params = get_site_info()
    snippets = get_3rd_party_snippet()
    html = TemplateParser.parse(options.current_template_dir, "index.html", posts=posts, params=params, snippets=snippets)
    
    index_file = open("build/index.html", "wb")
    index_file.write(html)
예제 #3
0
파일: generate.py 프로젝트: bingod/IoVision
def generate_index():
    posts = markdown_parser.get_all_parsed_posts()
    params = get_site_info()
    html = TemplateParser.parse(options.current_template_dir,
                                "index.html",
                                posts=posts,
                                params=params)

    index_file = open("build/index.html", "wb")
    index_file.write(html)
예제 #4
0
def generateAbout():  
    dest = options.build_dir + os.sep + "about"
    mkdir(dest)
    post = BasicParser.parse(options.about_dir, "about.markdown")
    post["title"] = options.author
    params = getSiteInfo()
    
    html = TemplateParser.parse(options.current_template_dir, "about.html", post=post, params=params)
    about_file = open(dest + os.sep + "index.html", "wb")
    about_file.write(html)
예제 #5
0
def generatePosts():
    dest = options.build_dir + os.sep + "post"
    mkdir(dest)
    posts = markdown_parser.getAllParsedPosts(brief=False)
    params = getSiteInfo()
    
    for post in posts:
        html = TemplateParser.parse(options.current_template_dir, "post.html", post=post, params=params)
        post_file = open(dest + os.sep + post["post_name"] + ".html", "wb")
        post_file.write(html)
예제 #6
0
def generate_posts():
    dest = options.build_dir + os.sep + "post"
    mkdir(dest)
    posts = markdown_parser.get_all_parsed_posts(brief=False)
    params = get_site_info()
    snippets = get_3rd_party_snippet()
    for post in posts:
        html = TemplateParser.parse(options.current_template_dir, "post.html", post=post, params=params, snippets = snippets)
        post_file = open(dest + os.sep + post["post_name"] + ".html", "wb")
        post_file.write(html)
예제 #7
0
파일: generate.py 프로젝트: bingod/IoVision
def generate_hobby_index():
    dest = options.build_dir + os.sep + "hobby"
    mkdir(dest)
    posts = markdown_parser.get_all_parsed_hobby_posts()
    params = get_site_info()
    html = TemplateParser.parse(options.current_template_dir,
                                "hobbyindex.html",
                                posts=posts,
                                params=params)
    index_file = open("build/hobby/index.html", "wb")
    index_file.write(html)
예제 #8
0
파일: generate.py 프로젝트: bingod/IoVision
def generate_hobby_posts():
    dest = options.build_dir + os.sep + "hobby" + os.sep + "post"
    mkdir(dest)
    posts = markdown_parser.get_all_parsed_hobby_posts(brief=False)
    params = get_site_info()
    for post in posts:
        html = TemplateParser.parse(options.current_template_dir,
                                    "post.html",
                                    post=post,
                                    params=params)
        post_file = open(dest + os.sep + post["post_name"] + ".html", "wb")
        post_file.write(html)
예제 #9
0
파일: generate.py 프로젝트: bingod/IoVision
def generate_about():
    dest = options.build_dir + os.sep + "about"
    mkdir(dest)
    post = BasicParser.parse(options.about_dir, "about.markdown")
    post["title"] = options.author
    params = get_site_info()

    html = TemplateParser.parse(options.current_template_dir,
                                "about.html",
                                post=post,
                                params=params)
    about_file = open(dest + os.sep + "index.html", "wb")
    about_file.write(html)