Пример #1
0
def author(db, au=None):
    stderr.write('author!\n')
    bottle.response.set_header('Content-Type', opds_acq)
    author_info = queries.author_info(db, au)
    if author_info is None:
        bottle.abort(404, 'Unknown author id')
    cur = queries.author_works(db, au)
    return(catrender('author.xml', cursor=cur, author_id=au,
                         author_info=author_info))
Пример #2
0
def author(au=None):
    stderr.write("html author!\n")
    if "au" in bottle.request.params:
        au = bottle.request.params["au"]

    if au:
        template = catlookup.get_template("author.html")
    else:
        template = catlookup.get_template("authorbrowse.html")

    return catrender(template, author_id=au)
Пример #3
0
def authorlist(db):
    stderr.write('browse author!\n')
    bottle.response.set_header('Content-Type', opds_nav)
    cur = queries.author_list(db)
    return(catrender('authorbrowse.xml', cursor=cur))
Пример #4
0
def title(db):
    stderr.write('title!\n')
    bottle.response.set_header('Content-Type', opds_acq)
    return catrender('title.xml', cursor = queries.titlelist(db))
Пример #5
0
def index():
    stderr.write('index!\n')
    bottle.response.set_header('Content-Type', opds_nav)
    return catrender('root.xml')
Пример #6
0
def title():
    stderr.write("html title!\n")
    template = catlookup.get_template("title.html")
    return catrender(template)
Пример #7
0
def index():
    stderr.write("html index!\n")
    template = catlookup.get_template("root.html")
    return catrender(template)