예제 #1
0
파일: index.py 프로젝트: samtaufa/nomoa.bsd
def section(fname, dirname, title, pageTitle):
    mfname=fname
    filename=os.path.splitext(fname)
    if filename[1] not in htmlfiles:
        mfname = "%s%s"%(filename[0],htmlext)
    
    menu = countershape.widgets.ExtendedParentPageIndex(
        '/%s'%mfname,
        depth = 1,
        divclass = "navBarLineTwo",
        currentActive = True
    )
    page = Page(
            fname,
            title,
            pageTitle = pageTitle,
    )
    page.namespace["blk_submenu"] = menu
    page.namespace["submenuTitle"] = title
    directory = Directory(dirname)
    directory.namespace["blk_submenu"] = menu
    return [page, directory]
예제 #2
0
        ("|", "or"),
        ("(...)", "grouping"),
    ]
)
ns.filt_help = filt_help


def nav(page, current, state):
    if current.match(page, False):
        pre = '<li class="active">'
    else:
        pre = "<li>"
    p = state.application.getPage(page)
    return pre + '<a href="%s">%s</a></li>'%(model.UrlTo(page), p.title)
ns.nav = nav

pages = [
    Page("index.html", "Introduction"),
    Page("install.html", "Installation"),
    Page("mitmproxy.html", "mitmproxy"),
    Page("mitmdump.html", "mitmdump"),
    Page("howmitmproxy.html", "How mitmproxy works"),

    Page("ssl.html", "Overview"),
    Directory("certinstall"),
    Directory("scripting"),
    Directory("tutorials"),
    Page("transparent.html", "Overview"),
    Directory("transparent"),
]
예제 #3
0
ns.imgBanner = countershape.html.IMG(
    src=countershape.model.UrlTo("countershape.png"),
    width="280",
    height="77",
    align="right")


class ShowSrc:
    def __init__(self, d):
        self.d = os.path.abspath(d)

    def __call__(self, path):
        return countershape.doc.readFrom(os.path.join(self.d, path))


ns.readFrom = ShowSrc(".")

pages = [
    Page("index.md",
         title="Introduction",
         pageTitle="Introduction to Countershape"),
    Directory("intro"),
    Page("markup/markup.md",
         title="Text Formatting",
         pageTitle="Text Formatting Options"),
    Directory("markup"),
    PythonModule(name="../countershape", title="Source"),
    Page("admin.md", title="Administrivia", pageTitle="Novella Administrivia")
]
예제 #4
0
for i in filt.filt_rex:
    filt_help.append(("~%s regex" % i.code, i.help))
for i in filt.filt_int:
    filt_help.append(("~%s int" % i.code, i.help))
filt_help.sort()
filt_help.extend([
    ("!", "unary not"),
    ("&", "and"),
    ("|", "or"),
    ("(...)", "grouping"),
])
ns.filt_help = filt_help

pages = [
    Page("index.html", "docs"),
    Page("intro.html", "Introduction"),
    Page("interception.html", "Interception"),
    Page("clientreplay.html", "Client-side replay"),
    Page("serverreplay.html", "Server-side replay"),
    Page("sticky.html", "Sticky cookies and auth"),
    Page("anticache.html", "Anticache"),
    Page("filters.html", "Filter expressions"),
    Page("scripts.html", "External scripts"),
    Page("ssl.html", "SSL"),
    Directory("certinstall"),
    Page("library.html", "libmproxy: mitmproxy as a library"),
    Directory("tutorials"),
    Page("faq.html", "FAQ"),
    Page("admin.html", "Administrivia")
]
예제 #5
0
파일: index.py 프로젝트: uvbs/mitmproxy-1

def nav(page, current, state):
    if current.match(page, False):
        pre = '<li class="active">'
    else:
        pre = "<li>"
    p = state.application.getPage(page)
    return pre + \
        '<a href="%s">%s</a></li>' % (countershape.widgets.UrlTo(page), p.title)
ns.nav = nav
ns.navbar = countershape.template.File(None, "_nav.html")


pages = [
    Page("index.html", "Introduction"),
    Page("install.html", "Installation"),
    Page("certinstall.html", "About Certificates"),
    Page("howmitmproxy.html", "How mitmproxy works"),
    Page("modes.html", "Modes of Operation"),

    Page("mitmproxy.html", "mitmproxy"),
    Page("mitmdump.html", "mitmdump"),
    Page("config.html", "configuration"),

    Directory("scripting"),
    Directory("tutorials"),
    Page("transparent.html", "Overview"),
    Directory("transparent"),
]
예제 #6
0
""" % (klass, image, kaption)

        return url
            
ns.Image = Image

pages = [
    Page("index.md", 
        title="Overview",
        pageTitle="an Overview"
        ),
    Page("install.md", 
        title="Install",
        pageTitle="a quick Install"
        ),
    Directory("install"),
        
    Page(
        "client.md",
        title="Client",
        pageTitle = "Client Use"
    ),           
    Directory("client"),

    Page(
        "server.md",
        title="Server",
        pageTitle = "Server Configuration"
    ),
    Directory("server"),
    
예제 #7
0
파일: index.py 프로젝트: samtaufa/nomoa.bsd
        blogdesc="! the echo $? chamber", 
        base="null", 
        src="../posts")
       
blogindex = ns.blog.index("dev.html", "echo $?")
blogindex.namespace["blk_submenu"] = countershape.widgets.ExtendedParentPageIndex(
    '/dev.html',
    depth = 1,
    divclass = "navBarLineTwo",
    currentActive = True
)
blogindex.namespace["submenuTitle"] = "log"

#blogindex.layout = ns.tpl_bloglayout
blogindex.markup = markup.Markdown( extras=["code-friendly"] )
blogdir = Directory("dev")
blogdir.namespace["blk_submenu"] = blogindex.namespace["blk_submenu"]
blogdir.namespace["submenuTitle"] = blogindex.namespace["submenuTitle"]
blogdir.layout = ns.tpl_bloglayout
blogdir.markup = markup.Markdown( extras=["code-friendly"] )

pages = [    
]
     
pages += section(
            fname="index.mdtext", 
            dirname="about", 
            title="O'BSD",
            pageTitle="OpenBSD Guides"
    )
    
예제 #8
0
        ("&", "and"),
        ("|", "or"),
        ("(...)", "grouping"),
    ]
)
ns.filt_help = filt_help



pages = [
    Page("index.html", "docs"),
    Page("intro.html", "Introduction"),
    Page("install.html", "Installation"),
    Page("mitmproxy.html", "mitmproxy"),
    Page("mitmdump.html", "mitmdump"),
    Page("clientreplay.html", "Client-side replay"),
    Page("serverreplay.html", "Server-side replay"),
    Page("sticky.html", "Sticky cookies and auth"),
    Page("upstreamcerts.html", "Upstream Certs"),
    Page("replacements.html", "Replacements"),
    Page("reverseproxy.html", "Reverse proxy mode"),
    Page("anticache.html", "Anticache"),
    Page("filters.html", "Filter expressions"),
    Page("ssl.html", "Setting up SSL interception"),
    Directory("certinstall"),
    Directory("scripting"),
    Directory("tutorials"),
    Page("faq.html", "FAQ"),
    Page("admin.html", "Administrivia")
]