def __write_filter_tmpl(html_tpl):
    '''
    doing for directory.
    '''
    out_dir = os.path.join(os.getcwd(), CRUD_PATH, 'list')
    if os.path.exists(out_dir):
        pass
    else:
        os.mkdir(out_dir)
    # for var_name in VAR_NAMES:
    for var_name, bl_val in SWITCH_DICS.items():
        if var_name.startswith('dic_'):
            # 此处简化一下，不考虑子类的问题。
            subdir = ''
            outfile = os.path.join(out_dir, 'list' + '_' + var_name.split('_')[1] + '.html')
            html_view_str_arr = []
            # tview_var = eval('dic_vars.' + var_name)
            for the_val in bl_val:
                # sig = eval('html_vars.html_' + x)
                sig = HTML_DICS['html_' + the_val]
                if sig['type'] == 'select':
                    html_view_str_arr.append(__gen_select_filter('html_' + the_val))

            with open(outfile, 'w') as outfileo:
                outstr = minify(
                    html_tpl.replace(
                        'xxxxxx',
                        ''.join(html_view_str_arr)
                    ).replace(
                        'yyyyyy',
                        var_name.split('_')[1][:2]
                    ).replace(
                        'ssssss',
                        subdir
                    ).replace(
                        'kkkk',
                        KIND_DICS['kind_' + var_name.split('_')[-1]]
                    )
                )
                outfileo.write(outstr)
doing for directory.