def __init__(self, parent, **kwargs): """ Constructor. """ log.debug(self.__class__.__name__) BibleDB.__init__(self, parent, **kwargs) self.filename = kwargs[u'filename']
def __init__(self, parent, **kwargs): """ Finds all the bibles defined for the system. Creates an Interface Object for each bible containing connection information. Throws Exception if no Bibles are found. Init confirms the bible exists and stores the database path. """ BibleDB.__init__(self, parent, **kwargs) self.download_source = kwargs['download_source'] self.download_name = kwargs['download_name'] # TODO: Clean up proxy stuff. We probably want one global proxy per connection type (HTTP and HTTPS) at most. self.proxy_server = None self.proxy_username = None self.proxy_password = None self.language_id = None if 'path' in kwargs: self.path = kwargs['path'] if 'proxy_server' in kwargs: self.proxy_server = kwargs['proxy_server'] if 'proxy_username' in kwargs: self.proxy_username = kwargs['proxy_username'] if 'proxy_password' in kwargs: self.proxy_password = kwargs['proxy_password'] if 'language_id' in kwargs: self.language_id = kwargs['language_id']
def __init__(self, parent, **kwargs): """ Finds all the bibles defined for the system. Creates an Interface Object for each bible containing connection information. Throws Exception if no Bibles are found. Init confirms the bible exists and stores the database path. """ BibleDB.__init__(self, parent, **kwargs) self.download_source = kwargs["download_source"] self.download_name = kwargs["download_name"] # TODO: Clean up proxy stuff. We probably want one global proxy per connection type (HTTP and HTTPS) at most. self.proxy_server = None self.proxy_username = None self.proxy_password = None self.language_id = None if "path" in kwargs: self.path = kwargs["path"] if "proxy_server" in kwargs: self.proxy_server = kwargs["proxy_server"] if "proxy_username" in kwargs: self.proxy_username = kwargs["proxy_username"] if "proxy_password" in kwargs: self.proxy_password = kwargs["proxy_password"] if "language_id" in kwargs: self.language_id = kwargs["language_id"]
def __init__(self, parent, **kwargs): log.debug(self.__class__.__name__) BibleDB.__init__(self, parent, **kwargs) self.filename = kwargs[u'filename'] self.language_regex = re.compile(r'<language.*>(.*?)</language>') self.verse_regex = re.compile( r'<verse osisID="([a-zA-Z0-9 ]*).([0-9]*).([0-9]*)">(.*?)</verse>') self.note_regex = re.compile(r'<note(.*?)>(.*?)</note>') self.title_regex = re.compile(r'<title(.*?)>(.*?)</title>') self.milestone_regex = re.compile(r'<milestone(.*?)/>') self.fi_regex = re.compile(r'<FI>(.*?)<Fi>') self.rf_regex = re.compile(r'<RF>(.*?)<Rf>') self.lb_regex = re.compile(r'<lb(.*?)>') self.lg_regex = re.compile(r'<lg(.*?)>') self.l_regex = re.compile(r'<l (.*?)>') self.w_regex = re.compile(r'<w (.*?)>') self.q_regex = re.compile(r'<q(.*?)>') self.q1_regex = re.compile(r'<q(.*?)level="1"(.*?)>') self.q2_regex = re.compile(r'<q(.*?)level="2"(.*?)>') self.trans_regex = re.compile(r'<transChange(.*?)>(.*?)</transChange>') self.divine_name_regex = re.compile( r'<divineName(.*?)>(.*?)</divineName>') self.spaces_regex = re.compile(r'([ ]{2,})') filepath = os.path.join( AppLocation.get_directory(AppLocation.PluginsDir), u'bibles', u'resources', u'osisbooks.csv')
def __init__(self, parent, **kwargs): """ Constructor to create and set up an instance of the OpenSongBible class. This class is used to import Bibles from OpenSong's XML format. """ log.debug(self.__class__.__name__) BibleDB.__init__(self, parent, **kwargs) self.filename = kwargs['filename']
def __init__(self, parent, **kwargs): """ Constructor to create and set up an instance of the ZefaniaBible class. This class is used to import Bibles from ZefaniaBible's XML format. """ log.debug(self.__class__.__name__) BibleDB.__init__(self, parent, **kwargs) self.filename = kwargs['filename']
def __init__(self, parent, **kwargs): """ Loads a Bible from a set of CSV files. This class assumes the files contain all the information and a clean bible is being loaded. """ log.info(self.__class__.__name__) BibleDB.__init__(self, parent, **kwargs) self.booksfile = kwargs['booksfile'] self.versesfile = kwargs['versefile']
def __init__(self, parent, **kwargs): """ Loads a Bible from a set of CSV files. This class assumes the files contain all the information and a clean bible is being loaded. """ log.info(self.__class__.__name__) BibleDB.__init__(self, parent, **kwargs) self.books_file = kwargs['booksfile'] self.verses_file = kwargs['versefile']
def __init__(self, parent, **kwargs): log.debug(self.__class__.__name__) BibleDB.__init__(self, parent, **kwargs) self.filename = kwargs['filename']
def __init__(self, parent, **kwargs): log.debug(self.__class__.__name__) BibleDB.__init__(self, parent, **kwargs) self.filename = kwargs['filename']