Example #1
0
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
Example #2
0
File: rdf.py Project: nigelb/gRefer
def setup_ns():
    global ns
    from simpleui.utils import config_helper
    ns = config_helper(create_namespaces())
Example #3
0
 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()
Example #4
0
 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)