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
def e_path(echo, kv=''): response.set_header('content-type', 'text/plain; charset=utf-8') return dbj.get_single_echo(echo, kv)
def u_e_path(f, kv=''): response.set_header('content-type', 'text/plain; charset=utf-8') return dbj.get_ii_echo(f.split('/'), kv)
def blacklist_txt(kv=''): response.set_header('content-type', 'text/plain; charset=utf-8') return open('%s/blacklist.txt' % conf.DATA).read()
def xfeat_txt(kv=''): response.set_header('content-type', 'text/plain; charset=utf-8') return 'x/c\nlist.txt\nblacklist.txt\n#gk11#102'
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)
def rss_for_carbon(carbon): response.set_header('content-type', 'application/rss+xml; charset=utf-8') return userbb.rss_carbon(carbon)
def rss_echo(echo, num=50): response.set_header('content-type', 'application/rss+xml; charset=utf-8') return userbb.gen_rss(echo, num)
def bb_api(bb): response.set_header('content-type', 'text/plain; charset=utf-8') return app_rq_txt(bb, request.forms)
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)
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)