Exemplo n.º 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
Exemplo n.º 2
0
def e_path(echo, kv=''):
    response.set_header('content-type', 'text/plain; charset=utf-8')
    return dbj.get_single_echo(echo, kv)
Exemplo n.º 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)
Exemplo n.º 4
0
def blacklist_txt(kv=''):
    response.set_header('content-type', 'text/plain; charset=utf-8')
    return open('%s/blacklist.txt' % conf.DATA).read()
Exemplo n.º 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'
Exemplo n.º 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)
Exemplo n.º 7
0
def rss_for_carbon(carbon):
    response.set_header('content-type', 'application/rss+xml; charset=utf-8')
    return userbb.rss_carbon(carbon)
Exemplo n.º 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)
Exemplo n.º 9
0
def bb_api(bb):
    response.set_header('content-type', 'text/plain; charset=utf-8')
    return app_rq_txt(bb, request.forms)
Exemplo n.º 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)
Exemplo n.º 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)