예제 #1
0
파일: ui.py 프로젝트: Lanka/feedIO
    def addFeed(self):
        feedUrl = unicode(self.ui.UrlLineEdit.text())

        thread = threading.Thread(target=fm.addFeed, args=(feedUrl,))
        thread.setDaemon(True)
        thread.start()

        thread.join()

        itemList = fm.listNew()
        classifier.assignToAllTopics(itemList)
        self.parent.parent.setNewItemScores()
        self.close()
예제 #2
0
파일: ui.py 프로젝트: Lanka/feedIO
    def addFeed(self):
        feedUrl = unicode(self.ui.urlLine.text())
        #Run the addFeed function in a new thread so that the ui is responsive.
        thread = threading.Thread(target=fm.addFeed, args=(feedUrl,))
        thread.setDaemon(True)
        thread.start()
        thread.join()

        itemList = fm.listNew()
        classifier.assignToAllTopics(itemList)
        self.parent.parent.setNewItemScores()

        self.ui.urlLine.clear()
        self.displayFeeds()
예제 #3
0
파일: ui.py 프로젝트: Lanka/feedIO
    def fetchAll(self):
        self.status = "fetching Updates..."
        self.sendNotification()
        fm.updateAll()

        #assign the newly fetched articles to the topics
        newList = fm.listNew()
        classifier.assignToAllTopics(newList)
        print "Assigned the new articles to topics"
        #calculate the priority scores of the new articles for each topic.
        self.setNewItemScores()

        self.status = "All feeds updated."
        print self.status
        self.sendNotification()