def file(input_file, light=False):
util.create_dir(os.path.join(CONF_DIR, "<STR_LIT>"))<EOL>util.create_dir(os.path.join(CONF_DIR, "<STR_LIT>"))<EOL>theme_name = "<STR_LIT:.>".join((input_file, "<STR_LIT>"))<EOL>bri = "<STR_LIT>" if light else "<STR_LIT>"<EOL>user_theme_file = os.path.join(CONF_DIR, "<STR_LIT>", bri, theme_name)<EOL>theme_file = os.path.join(MODULE_DIR, "<STR_LIT>", bri, theme_name)<EOL>if input_file in ("<STR_LIT>", "<STR_LIT>"):<EOL><INDENT>theme_file = get_random_theme()<EOL><DEDENT>elif input_file == "<STR_LIT>":<EOL><INDENT>theme_file = get_random_theme(light)<EOL><DEDENT>elif os.path.isfile(user_theme_file):<EOL><INDENT>theme_file = user_theme_file<EOL><DEDENT>elif os.path.isfile(input_file):<EOL><INDENT>theme_file = input_file<EOL><DEDENT>if os.path.isfile(theme_file):<EOL><INDENT>logging.info("<STR_LIT>",<EOL>os.path.basename(theme_file))<EOL>return parse(theme_file)<EOL><DEDENT>logging.error("<STR_LIT>", bri)<EOL>logging.error("<STR_LIT>")<EOL>logging.error("<STR_LIT>")<EOL>sys.exit(<NUM_LIT:1>)<EOL>
Import colorscheme from json file.