Пример #1
0
def list():
    mfetcher.updateMangaDb()
    entries = random.sample(mfetcher.database["manga"],40)
    templatePage = '''
        <html>
            <head>
            </head>
            <body style="font-size:24px;font-family: sans;">
                % for manga in db:
                    <a href="{{manga["a"]}}">{{manga["t"]}}</a><br />
                % end
                <br />
                <br />
                Powered by <a href="http://mangaeden.com">mangaeden.com</a>
            </body>
        </html>
    '''
    return template(templatePage, db=entries)
Пример #2
0
#! /usr/bin/python
from bottle import route, run, template
import random
import mfetcher

mfetcher.updateMangaDb()

@route('/')
def list():
    mfetcher.updateMangaDb()
    entries = random.sample(mfetcher.database["manga"],40)
    templatePage = '''
        <html>
            <head>
            </head>
            <body style="font-size:24px;font-family: sans;">
                % for manga in db:
                    <a href="{{manga["a"]}}">{{manga["t"]}}</a><br />
                % end
                <br />
                <br />
                Powered by <a href="http://mangaeden.com">mangaeden.com</a>
            </body>
        </html>
    '''
    return template(templatePage, db=entries)

@route('/<manga>')
@route('/<manga>/<chapter>')
@route('/<manga>/<chapter>/<page>')
def image(manga,chapter=1,page=0):