From 92966e7c48c754189b0578fc5202dd1d57d1dd7a Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 14 Jan 2014 17:47:33 +0100 Subject: add tutorial for transparent proxying, other minor docs improvements --- doc-src/index.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'doc-src/index.py') diff --git a/doc-src/index.py b/doc-src/index.py index 3333a1b9..e62c1709 100644 --- a/doc-src/index.py +++ b/doc-src/index.py @@ -1,11 +1,12 @@ -import os, sys +import os, sys, datetime import countershape from countershape import Page, Directory, PythonModule, markup, model import countershape.template sys.path.insert(0, "..") -from libmproxy import filt +from libmproxy import filt, version -MITMPROXY_SRC = "~/mitmproxy/mitmproxy" +MITMPROXY_SRC = os.path.abspath("..") +ns.VERSION = version.VERSION if ns.options.website: ns.idxpath = "doc/index.html" @@ -16,18 +17,20 @@ else: ns.title = countershape.template.Template(None, "

@!this.title!@

") -this.titlePrefix = "mitmproxy 0.10 - " +this.titlePrefix = "%s - " % version.NAMEVERSION this.markup = markup.Markdown(extras=["footnotes"]) ns.docMaintainer = "Aldo Cortesi" ns.docMaintainerEmail = "aldo@corte.si" -ns.copyright = u"\u00a9 mitmproxy project, 2013" +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) -ns.index_contents = file(mpath("README.mkd")).read() +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() -- cgit v1.2.3