def testTheme(filename='test/index.html'): #logging.basicConfig(filename='log.debug',level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG) main=Main() filefetcher=FileFetcher(filename) main.parseContent(filefetcher) print main.themes if True: printTree(main.themes) return
def updateNew(self): logging.basicConfig(filename='update.log',level=logging.DEBUG) #logging.getLogger('core').setLevel(logging.INFO) main=Main(self.session) main.parseContent(MainFetcher()) self.session.flush() # themes, categories and emissions are loaded # let's update the database with new emissions # load all new videos XML files from self.updateEmissions() self.session.commit()
def showTree(): logging.basicConfig(filename='show.log',level=logging.DEBUG) main=Main() main.parseContent() printTree(main.themes.values())
def resyncAll(self): logging.basicConfig(filename='resync.log',level=logging.DEBUG) main=Main() main.parseContent() # load all new videos XML files from self.updateVideos(True)