示例#1
0
文件: filer.py 项目: nigelb/gRefer
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
示例#2
0
文件: rdf.py 项目: nigelb/gRefer
def setup_ns():
    global ns
    from simpleui.utils import config_helper
    ns = config_helper(create_namespaces())
示例#3
0
文件: tests.py 项目: nigelb/gRefer
 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()
示例#4
0
文件: plugins.py 项目: nigelb/gRefer
 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)