Example #1
0
import os, sys
import countershape
from countershape import Page, Directory, PythonModule, markup, model
import countershape.template
sys.path.insert(0, "..")
from libmproxy import filt

MITMPROXY_SRC = "~/mitmproxy/mitmproxy"

if ns.options.website:
    ns.idxpath = "doc/index.html"
    this.layout = countershape.Layout("_websitelayout.html")
else:
    ns.idxpath = "index.html"
    this.layout = countershape.Layout("_layout.html")


ns.title = countershape.template.Template(None, "<h1>@!this.title!@</h1>")
this.titlePrefix = "mitmproxy 0.10 - "
this.markup = markup.Markdown(extras=["footnotes"])

ns.docMaintainer = "Aldo Cortesi"
ns.docMaintainerEmail = "*****@*****.**"
ns.copyright = u"\u00a9 mitmproxy project, 2013"

def mpath(p):
    p = os.path.join(MITMPROXY_SRC, p)
    return os.path.expanduser(p)

ns.index_contents = file(mpath("README.mkd")).read()
Example #2
0
import countershape
from countershape import Page, Directory, PythonModule, markup
from countershape.doc import *

this.markup = markup.Markdown(extras=["code-friendly"])

this.layout = countershape.Layout("_layout.html")
this.titlePrefix = "Countershape "

this.stdHeaders = [
    model.UrlTo("media/css/reset-fonts-grids-base.css"),
    model.UrlTo("media/css/docstyle-default.css"),
    model.UrlTo("media/css/docstyle-customised.css"),
    model.UrlTo("media/css/syntax.css"),
]
this.metadata = {
    "robots": "all",
    "keywords": "countershape,website generator,website compiler",
    "description": "Countershape website generator",
    "copyright": "(c) Copyright Nullcube 2007"
}
ns.docTitle = "Countershape Manual"
ns.docMaintainer = "Aldo Cortesi"
ns.docMaintainerEmail = "*****@*****.**"
ns.copyright = "Copyright Nullcube 2007"
ns.head = countershape.template.File(None, "_banner.html")
ns.sidebar = countershape.widgets.SiblingPageIndex('/index.html')
ns.license = file("../LICENSE").read()

ns.imgBanner = countershape.html.IMG(
    src=countershape.model.UrlTo("countershape.png"),