aboutsummaryrefslogtreecommitdiffstats
path: root/doc-src/index.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc-src/index.py')
-rw-r--r--doc-src/index.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/doc-src/index.py b/doc-src/index.py
index b7ab9995..e6064e3a 100644
--- a/doc-src/index.py
+++ b/doc-src/index.py
@@ -1,6 +1,8 @@
-import os, sys, datetime
+import os
+import sys
+import datetime
import countershape
-from countershape import Page, Directory, PythonModule, markup, model
+from countershape import Page, Directory, markup, model
import countershape.template
sys.path.insert(0, "..")
from libmproxy import filt, version
@@ -23,18 +25,18 @@ ns.docMaintainer = "Aldo Cortesi"
ns.docMaintainerEmail = "aldo@corte.si"
ns.copyright = u"\u00a9 mitmproxy project, %s" % datetime.date.today().year
+
def mpath(p):
p = os.path.join(MITMPROXY_SRC, p)
return os.path.expanduser(p)
-with open(mpath("README.mkd")) as f:
- readme = f.read()
- ns.index_contents = readme.split("\n", 1)[1] #remove first line (contains build status)
def example(s):
d = file(mpath(s)).read().rstrip()
extemp = """<div class="example">%s<div class="example_legend">(%s)</div></div>"""
return extemp%(countershape.template.Syntax("py")(d), s)
+
+
ns.example = example
@@ -73,6 +75,7 @@ def nav(page, current, state):
ns.nav = nav
ns.navbar = countershape.template.File(None, "_nav.html")
+
pages = [
Page("index.html", "Introduction"),
Page("install.html", "Installation"),