def initialise(parser, config): model = Model() model.config = config_helper(config) model.namespace = parser.parse_args() init = config.read_config() ui = simpleui.create_UI(model.namespace, config) if not init: model.config.output_dir =\ ui.prompt_file_selector("Select the output location", type=FileSelectorTypes.SELECT_FOLDER)[0] output_types = conv.conv_impl().get_output_types() model.config.convert_to =\ output_types[ui.prompt_list("Select Output Format", "Please Select the Output Format:", output_types)[0]] model.config.config_delegate.write_config() return model
def setup_ns(): global ns from simpleui.utils import config_helper ns = config_helper(create_namespaces())
def setUp(self): model = Model() model.config = config_helper(UserConfig(dir_name=".gref", config_file="config")) self.impl = BibtexParser(model) self.parser = self.impl.create_parser()
def __init__(self, *args, **kwargs): self.logger = logging.getLogger("%s.%s" % (self.__class__.__module__, self.__class__.__name__)) self.args = args self.kwargs = config_helper(kwargs)