Beispiel #1
0
def test():
    h = html.HDoc()

    h.addHead(html.title("Bob Page"))
    h.addScript("referurl_dialog.js")

    h.add(html.h1("Test page"))
    h.add(html.p("Is this working now?"))

    eq_("".join(h), '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>Bob Page</title>\n<script type="text/javascript" src="referurl_dialog.js"></script>\n</head>\n<body><h1>Test page</h1>\n<p>Is this working now?</p>\n</body></html>')
Beispiel #2
0
def single_message():
	id = form["id"].value
	for key in db.keys():
		if ("-%s-" % id) in key:
			post = db[key]
			break
	else:
		return "Unknown message: %s" % id

	return html.body(
		html.h1(html.escape(post["data"]["title"])),
		format_post(post),
	)
Beispiel #3
0
def single_message():
    id = form["id"].value
    for key in db.keys():
        if ("-%s-" % id) in key:
            post = db[key]
            break
    else:
        return "Unknown message: %s" % id

    return html.body(
        html.h1(html.escape(post["data"]["title"])),
        format_post(post),
    )
Beispiel #4
0
def list_messages():
    # Which messages to show?
    messages = list(reversed(sorted(db.keys())))
    if "start" in form:
        start = int(form["start"].value)
    else:
        start = 0
    page_messages = messages[start:start + MESSAGES_PER_PAGE]
    pager = gen_pager(messages, start)

    return html.body(
        pager, html.h1("a858 auto-analysis"), credits(),
        html.div(*map(lambda key: format_post(db[key]), page_messages)), pager)
Beispiel #5
0
def list_messages():
	# Which messages to show?
	messages = list(reversed(sorted(db.keys())))
	if "start" in form:
		start = int(form["start"].value)
	else:
		start = 0
	page_messages = messages[start:start + MESSAGES_PER_PAGE]
	pager = gen_pager(messages, start)

	return html.body(
		pager,
		html.h1("a858 auto-analysis"),
		html.div(*map(lambda key: format_post(db[key]),
		              page_messages)),
		pager
	)
Beispiel #6
0
def review_to_html_summary(r):
    hexsha, review = r
    commits = html.ul(*map(lambda c: html.li(*commit_to_html(repo.commit(c))), review["includedCommits"]))
    return html.div(html.h1(html.a(hexsha[0:12], href=html.absolute("review", hexsha))), commits, **{"class": "review"})
def html():
    return [
        h.h1("""The Exerputer
        """),
        h.img("exerputer.png"),
        ]