aboutsummaryrefslogtreecommitdiffstats
path: root/doc-src/index.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-02-18 12:40:45 +1300
committerAldo Cortesi <aldo@nullcube.com>2011-02-18 12:40:45 +1300
commitcd4eea39348fc9d59d4f0cc3f71384f7c1c2b2e2 (patch)
treeae09d5a06c1d7f2ae6314fd5f96d6b506f454507 /doc-src/index.py
parent7769e5a898150451a52b5683c519ee04802310b8 (diff)
downloadmitmproxy-cd4eea39348fc9d59d4f0cc3f71384f7c1c2b2e2.tar.gz
mitmproxy-cd4eea39348fc9d59d4f0cc3f71384f7c1c2b2e2.tar.bz2
mitmproxy-cd4eea39348fc9d59d4f0cc3f71384f7c1c2b2e2.zip
First pass of script hooks for mitmdump.
Also stub out docs, improve mitmdump error handling.
Diffstat (limited to 'doc-src/index.py')
-rw-r--r--doc-src/index.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/doc-src/index.py b/doc-src/index.py
index 1ff22108..c34fcb78 100644
--- a/doc-src/index.py
+++ b/doc-src/index.py
@@ -1,7 +1,7 @@
+import os
import countershape
from countershape import Page, Directory, PythonModule, markup
-import countershape.grok
-
+import countershape.grok, countershape.template
this.layout = countershape.Layout("_layout.html")
ns.docTitle = "mitmproxy"
@@ -16,12 +16,25 @@ ns.sidebar = countershape.widgets.SiblingPageIndex(
)
ns.license = file("../LICENSE").read()
-ns.index_contents = file("../README").read()
-ns.example = file("../examples/stickycookies.py").read()
+ns.index_contents = file("../README.mkd").read()
+
+
+top = os.path.abspath(os.getcwd())
+def example(s):
+ d = file(os.path.join(top, s)).read()
+ return countershape.template.pySyntax(d)
+
+
+ns.example = example
+
+
pages = [
Page("index.html", "introduction"),
- Page("library.html", "library"),
+ Page("mitmproxy.html", "mitmproxy"),
+ Page("mitmdump.html", "mitmdump"),
+ Page("scripts.html", "scripts"),
+ Page("library.html", "libmproxy"),
Page("faq.html", "faq"),
Page("admin.html", "administrivia")
]