示例#1
0
    def __init__(self, args):
        # read  command line arguments
        self.args = args

        # absolute first priority is to initialize debugger so that anything triggered here can be logged
        self.debug = Debug()
        Debuggable.__init__(self, 'Globals')

        self.used_list_method = False
        self.used_square_reference_method = False


        # read the configuration
        self.settings_file_path = 'default'
        self.tei_file_path = None
        Settings.setup_settings_file(self.args)
        self.settings = Settings(Settings.get_settings_file(self, self.settings_file_path), self.args)

        self.script_dir = os.environ['METYPESET']

        self.input_file_path = self.settings.args['<input>'].strip()

        self.nlm_file_path = self.input_file_path
        self.nlm_temp_file_path = self.input_file_path + '.tmp'

        self.settings.args['--aggression'] = 11

        self.database_file_path = \
            self.settings.clean_path(self.settings.concat_path(os.path.join(self.settings.script_dir,
                                                                            'database'),
                                                               self.settings.get_setting('databasefile',
                                                                                           self)))
示例#2
0
    def __init__(self):
        # read  command line arguments
        self.args = self.read_command_line()

        # absolute first priority is to initialize debugger so that anything triggered here can be logged
        self.debug = Debug()

        Debuggable.__init__(self, 'Main')

        if self.args['--debug']:
            self.debug.enable_debug(self.args['--nogit'])

        # read settings file
        self.settings_file_path = 'default'
        self.tei_file_path = None
        self.settings_file_path = Settings.setup_settings_file(self.args)
        self.settings = Settings(Settings.get_settings_file(self, self.settings_file_path), self.args)
        self.gv = GV(self.settings, self.debug)

        self.debug.enable_prompt(Interactive(self.gv))
示例#3
0
    def __init__(self):
        # read  command line arguments
        self.args = self.read_command_line()

        # absolute first priority is to initialize debugger so that anything triggered here can be logged
        self.debug = Debug()

        Debuggable.__init__(self, 'Main')

        if self.args['--debug']:
            self.debug.enable_debug(self.args['--nogit'])

        # read settings file
        self.settings_file_path = 'default'
        self.tei_file_path = None
        self.settings_file_path = Settings.setup_settings_file(self.args)
        self.settings = Settings(Settings.get_settings_file(self, self.settings_file_path), self.args)
        self.gv = GV(self.settings, self.debug)

        self.debug.enable_prompt(Interactive(self.gv))
示例#4
0
    def __init__(self, args):
        # read  command line arguments
        self.args = args

        # absolute first priority is to initialize debugger so that anything triggered here can be logged
        self.debug = Debug()
        Debuggable.__init__(self, 'Globals')

        self.used_list_method = False
        self.used_square_reference_method = False

        # read the configuration
        self.settings_file_path = 'default'
        self.tei_file_path = None
        Settings.setup_settings_file(self.args)
        self.settings = Settings(
            Settings.get_settings_file(self, self.settings_file_path),
            self.args)

        self.script_dir = os.environ['METYPESET']

        if self.settings.args['<input>'] is not None:
            self.input_file_path = self.settings.args['<input>'].strip()
        else:
            self.input_file_path = 'NONE'

        self.nlm_file_path = self.input_file_path
        self.nlm_temp_file_path = self.input_file_path + '.tmp'

        self.settings.args['--aggression'] = 11

        self.use_zotero = self.settings.args['--zotero']

        self.database_file_path = \
            self.settings.clean_path(self.settings.concat_path(os.path.join(self.settings.script_dir,
                                                                            'database'),
                                                               self.settings.get_setting('databasefile',
                                                                                           self)))