

def createStaticMain(kind='bottle', moldPath=MOLD_DIR_PATH, base='', devel=False, coffee=False, save=False, path=os.path.join(STATIC_APP_PATH, 'main.html')):
    '\n    Generate and return main.html using template filepath mold and optionally\n    write to filepath path is save\n\n    '
    import bottle
    data = dict(baseUrl=base, mini=('.min' if (not devel) else ''), coffee=coffee)
    (scripts, sheets) = aiding.getFiles(top=STATIC_APP_PATH, prefix='', coffee=coffee)
    data['scripts'] = scripts
    data['sheets'] = sheets
    content = ''
    mainMoldPath = os.path.join(mold, 'main_{0}.html'.format(kind))
    with open(mainMoldPath, 'r') as fp:
        mold = fp.read()
        if (kind == 'bottle'):
            content = bottle.SimpleTemplate(mold).render(**data)
    if (content and save):
        with open(path, 'w+') as fp:
            fp.write(content)
    return content

dataset/ETHPy150Open saltstack/halite/halite/server_bottle.py createStaticMain/VarMisuse@125/212 `moldPath`->`mold`