diff --git a/common/config.py b/common/config.py index ff6dc66cfdb4ffe8b5734b07485b3b216aae76ee..053e481d2adbf78bd7342846ee451cb7dea9720a 100644 --- a/common/config.py +++ b/common/config.py @@ -35,4 +35,50 @@ class Config: # if not os.path.exists(Config.out_path+'/temp/'): # os.makedirs(Config.out_path + '/temp/') - \ No newline at end of file + @staticmethod + def get_json_dict(): + return Config.dict_json + + + @staticmethod + def get_work_path(): + ''' + get work path + ''' + return Config.path_format(Config.work_path) + + @staticmethod + def get_out_path(): + ''' + get out path + ''' + return Config.path_format(Config.out_path) + + @staticmethod + def get_inst_path(): + ''' + get install path + ''' + return Config.path_format(Config.inst_path) + + @staticmethod + def get_output_path(): + ''' + Get the output file save directory + ''' + return Config.path_format('{}/output-{}/'.format(Config.out_path, Config.dt)) + + @staticmethod + def get_log_path(): + ''' + get log directory + ''' + return Config.path_format(Config.out_path + '/log/') + + + @staticmethod + def path_format(path ): + if len(path): + return path.rstrip('\/') + '/' + else: + return './'