def forum_list(e): out = [] for n in lst('et/%s' % e): fi = mydict(topic=lst('topic/%s' % n)) o = get_msg(fi.topic[-1]) fi.lastdate, fi.lastuser = o.date, o.who out.append(fi) out.sort(key=lambda a: int(a.lastdate)) return out
def forum_list(e): out = [] for n in lst('et/%s' % e): fi = mydict(topic=lst('topic/%s' % n)) fi.lastdate, fi.lastuser = lst('topic/%s.updated' % n) fi.updated = int(lst('topic/%s.updated' % n)[0]) out.append(fi) out.sort(key=lambda a: a.updated) return out
def check_check(rq): if not all([rq.txt, rq.title, rq.ea, rq.to]): print dict(rq) return rq.tags = rq.tags.strip() rq.title = rq.title.strip() rq.txt = rq.txt.strip() if rq.ea not in lst('e.list'): print 'elist' print rq.ea return if rq.msgid != rq.topicid: if rq.topicid and not rq.topicid in lst('topic.list'): print 'topiclist' print rq.topicid return return rq
def echo_desc(e): return mydict([x.split(' ', 1) for x in lst('e.desc')]).get(e, 'no desc')
def echolist(): return lst('e.list')
def get_ea(ea): return lst('e/%s' % ea)