def from_template(tmpl_basename, config, dest_fn):
    extension = os.path.splitext(dest_fn)[1][1:]

    use_html = False if 'tex' in extension else True
    outfile = _from_template(tmpl_basename, config, use_html=use_html)
    outname = os.path.join(build_dir, extension, dest_fn)

    with open(outname, mode='w') as f:
        f.write(outfile)
dataset/ETHPy150Open scipy-conference/scipy_proceedings/publisher/build_template.py/from_template/original