Ejemplo n.º 1
0
 def outputByMysql(self, articles):
     try:
         service = MysqlService(self.log)
         service.setArticles(articles)
         return True
     except Exception as e:
         self.log.printError("outputByMysql error: '%s'" %(e))
         return False
Ejemplo n.º 2
0
 def markCover(self, images):
     '''mark cover image in mysql, change ifused value, ifused=1
     
     '''
     try:
         service = MysqlService(self.log)
         service.updateImages(images)
         return True
     except Exception as e:
         self.log.printError("markCover error: '%s'" %(e)) 
         return False
Ejemplo n.º 3
0
 def markContentImages(self, images):
     '''save content image in mysql, ifused=1
         
     '''
     try:
         service = MysqlService(self.log)
         service.setImages(images)
         return True
     except Exception as e:
         self.log.printError("markContentImages error: '%s'" %(e)) 
         return False
Ejemplo n.º 4
0
 def loadArticles(self, time):
     strTime = self.checkTime(time)
     service = MysqlService(self.log)
     articles = service.getArticles(strTime)
     return articles
Ejemplo n.º 5
0
 def loadImages(self, num):
     service = MysqlService(self.log)
     images = service.getImages(num)
     return images