示例#1
0
 def printNews(i):
   """ inner function that prints course news """
   newsId = fromQueryString(newsItems.eq(i).attr("href"), "nopen")
   newsPage = pq(self.read("seminar_main.php?nopen="+newsId))
   title, rest = newsPage("a[href*=nclose]").parent().siblings().text().split("|", 1)
   self.asciiout.h2(title)
   self.asciiout.text(br2nl(newsPage("td.printcontent").eq(1)).text())
   self.asciiout.hr()
示例#2
0
    def messageList(id):
      subject = subjects.eq(id)
      author, date = subject.parents("td.printhead").eq(0).next().text().split(",", 1)
      messages[id] = { "hash" : fromQueryString(subject.attr("href"), "mopen"),
               "subject": subject.text(),
               "author": author.strip().replace("von ", ""),
               "date": date.strip()}

      if not all:
        print self.asciiout.trim("["+str(id)+"]  "+messages[id]["author"]+": "+subject.text())