def render_all_files(render_dict, gen_dir, plugin_list=[]): files = gen_file_lists(_TEMPLATES_DIR, gen_dir) for template, target in files: path = os.path.dirname(target) if not os.path.exists(path): os.makedirs(path) with open(target, "w") as f: render_template(f, template, render_dict, _TEMPLATES_DIR, prefix=_TENJIN_PREFIX) if len(plugin_list) > 0: for s in plugin_list: plugin_dir = os.path.join(_PLUGIN_BASE_DIR, s) plugin_files = gen_file_lists(plugin_dir, os.path.join(gen_dir, 'plugin', s)) for template, target in plugin_files: path = os.path.dirname(target) if not os.path.exists(path): os.makedirs(path) with open(target, "w") as f: render_template(f, template, render_dict, plugin_dir, prefix=_TENJIN_PREFIX)
def render_all_files(render_dict, gen_dir): files = gen_file_lists(_TEMPLATES_DIR, gen_dir) for template, target in files: path = os.path.dirname(target) if not os.path.exists(path): os.makedirs(path) with open(target, "w") as f: render_template(f, template, render_dict, _TEMPLATES_DIR, prefix=_TENJIN_PREFIX)