Пример #1
0
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
Пример #2
0
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
Пример #3
0
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
Пример #4
0
def echo_desc(e):
    return mydict([x.split(' ', 1) for x in lst('e.desc')]).get(e, 'no desc')
Пример #5
0
def echolist():
    return lst('e.list')
Пример #6
0
def get_ea(ea):
    return lst('e/%s' % ea)