def read_config(self): # config configfile = os.path.join(self.configpath, 'kalpana-chapters.conf') make_sure_config_exists(configfile, os.path.join(self.pluginpath, 'default_config.json')) self.sidebar.settings = read_json(configfile) # stylesheet cssfile = os.path.join(self.configpath, 'kalpana-chapters.css') make_sure_config_exists(cssfile, os.path.join(self.pluginpath, 'default_theme.css')) self.sidebar.setStyleSheet(parse_stylesheet(read_file(cssfile)))
def read_config(configpath, defaultstyle): #if configdir: # configpath = configdir #else: # configpath = join(getenv('HOME'), '.config', 'nomia') configfile = join(configpath, 'settings.json') stylefile = join(configpath, 'style.json') make_sure_config_exists(configfile, local_path('defaultconfig.json')) make_sure_config_exists(stylefile, local_path('defaultstyle.json')) # Make sure to update the style with the defaultstyle's values newstyle = read_json(stylefile) style = defaultstyle.copy() style.update({k:v for k,v in newstyle.items() if k in defaultstyle}) return read_json(configfile), style, stylefile
def read_config(): config_file = os.path.join(os.getenv('HOME'), '.config', 'urd', 'urd.conf') common.make_sure_config_exists(config_file, common.local_path('default_config.json')) return common.read_json(config_file)
def read_config(): config_file = os.path.join(os.getenv("HOME"), ".config", "urd", "urd.conf") common.make_sure_config_exists(config_file, common.local_path("default_config.json")) return common.read_json(config_file)
def load_settings(): config_file = os.path.join(os.getenv('HOME'), '.config', 'sapfo-dl', 'settings.json') make_sure_config_exists(config_file, local_path('default_settings.json')) return read_json(os.path.join(config_file))
def read_config(self): self.configfile = os.path.join(self.configpath, 'kalpanano.conf') defaultconfigfile = os.path.join(self.local_path, 'defaultconfig.json') make_sure_config_exists(self.configfile, defaultconfigfile) self.settings = read_json(self.configfile) self.day = self.settings['day']
def read_config(self): configfile = join(self.configpath, 'kalpana-logger.conf') defaultconfigfile = join(self.local_path, 'defaultconfig.json') make_sure_config_exists(configfile, defaultconfigfile) self.settings = read_json(configfile)
def read_config(self): configfile = os.path.join(self.configpath, 'kalpana-export.conf') make_sure_config_exists(configfile, os.path.join(self.pluginpath, 'default_config.json')) self.settings = read_json(configfile)
def read_config(self): configfile = join(self.configpath, 'kalpana-sapfo.conf') make_sure_config_exists(configfile, join(self.pluginpath, 'defaultconfig.json')) self.settings = read_json(configfile)