def eval(self): tag = self.tag # Make sure to strip out the category from category:name str_tag = tag.tag.split(':', 1)[1] unread = len([s for s in tag\ if "canto-state" not in s.content or\ "read" not in s.content["canto-state"]]) s = "" if tag.selected: s += cc("selected") if tag.collapsed: s += "[+]" else: s += "[-]" s += " " + str_tag + " " s += "[" + cc("unread") + str(unread) + cc.end("unread") + "]" if tag.updates_pending: s += " [" + cc("pending") + str(tag.updates_pending) + cc.end("pending") + "]" if tag.selected: s += cc.end("selected") return s
def eval(self): tag = self.tag # Make sure to strip out the category from category:name str_tag = tag.tag.split(':', 1)[1] unread = len([s for s in tag\ if "canto-state" not in s.content or\ "read" not in s.content["canto-state"]]) s = "" if tag.selected: s += cc("selected") if tag.collapsed: s += "[+]" else: s += "[-]" s += " " + str_tag + " " s += "[" + cc("unread") + str(unread) + cc.end("unread") + "]" if tag.updates_pending: s += " [" + cc("pending") + str( tag.updates_pending) + cc.end("pending") + "]" if tag.selected: s += cc.end("selected") return s
def eval(self): story = self.story s = "" if "read" in story.content["canto-state"]: s += cc("read") else: s += cc("unread") if story.marked: s += cc("marked") + "[*]" if story.selected: s += cc("selected") s += prep_for_display(story.content["title"]) if story.selected: s += cc.end("selected") if story.marked: s += cc.end("marked") if "read" in story.content["canto-state"]: s += cc.end("read") else: s += cc.end("unread") return s