Пример #1
0
def x_c(f, kv=''):
    fp = f.split('/')
    response.set_header('content-type', 'text/plain; charset=utf-8')
    lst = app_rq_txt('echolist/discover/cnt/1/' + kv, request.query)
    out = ''
    for n in lst.splitlines():
        t = n.split(':')
        if t[0] in fp:
            out += '%s:%s\n' % (t[0], t[1])
    return out
Пример #2
0
def e_path(echo, kv=''):
    response.set_header('content-type', 'text/plain; charset=utf-8')
    return dbj.get_single_echo(echo, kv)
Пример #3
0
def u_e_path(f, kv=''):
    response.set_header('content-type', 'text/plain; charset=utf-8')
    return dbj.get_ii_echo(f.split('/'), kv)
Пример #4
0
def blacklist_txt(kv=''):
    response.set_header('content-type', 'text/plain; charset=utf-8')
    return open('%s/blacklist.txt' % conf.DATA).read()
Пример #5
0
def xfeat_txt(kv=''):
    response.set_header('content-type', 'text/plain; charset=utf-8')
    return 'x/c\nlist.txt\nblacklist.txt\n#gk11#102'
Пример #6
0
def list_txt(kv=''):
    response.set_header('content-type', 'text/plain; charset=utf-8')
    return app_rq_txt('echolist/public/cnt/1/' + kv, request.query)
Пример #7
0
def rss_for_carbon(carbon):
    response.set_header('content-type', 'application/rss+xml; charset=utf-8')
    return userbb.rss_carbon(carbon)
Пример #8
0
def rss_echo(echo, num=50):
    response.set_header('content-type', 'application/rss+xml; charset=utf-8')
    return userbb.gen_rss(echo, num)
Пример #9
0
def bb_api(bb):
    response.set_header('content-type', 'text/plain; charset=utf-8')
    return app_rq_txt(bb, request.forms)
Пример #10
0
def m_path(mid, kv=''):
    response.set_header('content-type', 'text/plain; charset=utf-8')
    return app_rq_txt('msgs/%s/fmt/flatm/%s' % (mid, kv), request.query)
Пример #11
0
def u_m_path(f, kv=''):
    response.set_header('content-type', 'text/plain; charset=utf-8')
    mm = [x for x in f.split('/') if not '.' in x]
    if not mm:
        return ''
    return app_rq_txt('msgs/%s/%s' % (':'.join(mm), kv), request.query)