def __init__(self, htmlWriter, context): OsisHandler.__init__(self, htmlWriter, context) self._bibleHtmlOpen = False self._bibleIntroWritten = False # A Bible introduction has been written self._bibleStarting = True # Not yet found first Bible chapter self._bookTitle = '' # Book title either from config or found in OSIS self._bookHtmlOpen = False self._bookTitleFound = False # Found title which will be used as book title self._bookTitleWritten = False # Title of current book written to output file self._canonicalTitleWritten = False # Last output written was a canonical title self._chFootnoteMarker = '' # Footnote marker in a chapter title self._chNumWritten = False # Chapter number written before current verse self._chHeadingWritten = False # Found or generated a title at the start of a chapter self._chapterTitle = '' # HTML for chapter title ready to be written to output self._chTitleWritten = False # Chapter title has been written to output self._docStructure = DocStructure() self._firstBook = True # First book of testament self._firstTitle = False # Next title found will be first in book self._firstVerse = False # Current verse is first in chapter self._footnoteMarkerWritten = False # Marker for current footnote has been written (and any scripture reference processed) self._groupEmpty = False # No books yet found in current book group self._groupIndex = 0 # Used to check for start of new testament where separate book groups not used self._groupIntroWritten = False # A testament introduction has been written for current testament self._groupHtmlOpen = False self._groupTitle = '' # Title for current testament, obtained from config self._groupTitleWritten = False # The current testament title has been written self._inCanonicalTitle = False # Currently processing a canonical title self._inChapterTitle = False # Currently processing a chapter title self._ignoreChEnd = False # Processing <chapter> tag which is a milestone tag self._ignoreDivEnd = False # Processing <div> tag which is a milestone tag self._inFootnoteRef = False # Processing initial reference in a footnote self._inIntro = False # Processing an introduction rather than scripture self._introDivTextFound = False # Some text has been processed for current introduction <div> self._introStyleStarted = False # Found first occurrence of 'x-introduction' (sub)type in current introduction self._introText = '' # Html generated for current introduction self._introTextFound = False # Some text has been processed for current introduction self._introTitleWritten = False # A title for the current introduction has been written self._inVerse = False # Currently within a scripture verse and not within a canonical title self._lineSpan = False # Current poetic line in first line of chapter, to the right of a chapter number self._psDivTitle = False # Title being processed had been identified as a Psalm division title or subtitle self._psDivTitleFound = False # Last title processed was a Psalm division title, so next may be corresponding subtitle self._readyForSubtitle = False # Last title processed was a book title, so next may be corresponding subtitle self._singleChapterBook = False # Current book should have only one chapter self._startingChapter = False # <chapter> tag processed, but initial <verse> tag not yet found self._verseEmpty = True # Not yet processed any text in this verse (excluding canonical title) self._verseNumWritten = False # Html for the number of the current verse has been generater self._verseText = '' # Text of verse currently beeing processed # For fb2, we need chapter/psalm titles. # If no format has been provided, set up format as the chapter/psalm number only if self._context.outputFmt == 'fb2': if self._context.config.chapterTitle == '': self._context.config.chapterTitle = '%s' if self._context.config.psalmTitle == '': self._context.config.psalmTitle = '%s'
def __init__(self, htmlWriter, context): OsisHandler.__init__(self, htmlWriter, context) self._endDfn = False # Just written </dfn> tag self._glossTitleWritten = False # The title for the glossary has been written out self._inArticle = False # Currently processing a glossary entry self._inChapterTitle = False # The title currently being processed is a chapter title self._inDfn = False # Currently within an OSIS <seg> tag for a keyword self._foundGlossaryDiv = False # A div with type="glossary" has been found self._inChapter = False # Currently between start and end chapter tags self._entryTocLevel = 2 # Level for toc entries for individual entries self._keywordTag = 'dfn' # Tag to use for keywords