示例#1
0
    def __init__(self, *argv, **kwargs):
        logger.debug("SwordBook - Create a new instance")

        super().__init__(*argv, **kwargs)

        self.mod = Sword.SWGenBook_castTo(self.mod)
        self.key = Sword.TreeKey_castTo(self.mod.getKey())
示例#2
0
 def getGenBookTOC( tk, parent ):
     if tk is None: # obtain one from the module
         tk = Sword.TreeKey_castTo( module.getKey() ) # Only works for gen books
     if tk and tk.firstChild():
         while True:
             print( " ", tk.getText() )
             # Keep track of the information for custom implementation
             #Class *item = storeItemInfoForLaterUse(parent, text);
             item = (parent) # temp ....................
             if tk.hasChildren():
                 print( "  Getting children..." )
                 getGenBookTOC( tk, item )
             if not tk.nextSibling(): break