示例#1
0
文件: txts.py 项目: hevi9/mkwww
def gather(cfg, store):
    parser = Parser(store)
    files = discover_files(
        cfg["roots"], cfg["includes"], cfg["excludes"])
    for file in files:
        log.info("input file %r", file.abspath)
        parser.parse_text(file.read())
示例#2
0
文件: mkwww.py 项目: hevi9/mkwww
def do_www(cfg):

    site = StaticSite(cfg["output"])

    files = discover_files(
        cfg["roots"], cfg["includes"], cfg["excludes"])

    for file in files:
        if file.is_text:
            PrePage(site, file.path + ".html", file)
        else:
            Resource(site, file.path)

    site.make()