From e93b343ac4917979f912afe5a2f0bbc8be0b28d7 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 1 Jan 2013 16:35:52 +1300 Subject: Docs and Readme - Don't keep a full duplicate readme just for pypi. Pypi really needs to learn to read markdown. - Style and content adjustments --- doc-src/02-docstyle.css | 5 +++++ doc-src/_layout.html | 4 ++-- doc-src/index.html | 3 +++ doc-src/index.py | 25 +++++-------------------- doc-src/install.html | 2 +- doc-src/intro.html | 4 ---- 6 files changed, 16 insertions(+), 27 deletions(-) create mode 100644 doc-src/02-docstyle.css delete mode 100644 doc-src/intro.html (limited to 'doc-src') diff --git a/doc-src/02-docstyle.css b/doc-src/02-docstyle.css new file mode 100644 index 00000000..ad2235e7 --- /dev/null +++ b/doc-src/02-docstyle.css @@ -0,0 +1,5 @@ +.terminal { + color: #c0c0c0; + font-size: 1em; + background: #000000; +} diff --git a/doc-src/_layout.html b/doc-src/_layout.html index d2d73249..826279ef 100644 --- a/doc-src/_layout.html +++ b/doc-src/_layout.html @@ -17,7 +17,7 @@
-

@!pageTitle!@

+

@!this.title!@

$!body!$
diff --git a/doc-src/index.html b/doc-src/index.html index 8b137891..79687ec6 100644 --- a/doc-src/index.html +++ b/doc-src/index.html @@ -1 +1,4 @@ +@!index_contents!@ + + diff --git a/doc-src/index.py b/doc-src/index.py index 5b6fcc5e..9684306b 100644 --- a/doc-src/index.py +++ b/doc-src/index.py @@ -6,37 +6,24 @@ sys.path.insert(0, "..") from libmproxy import filt MITMPROXY_SRC = "~/git/public/mitmproxy" - -if ns.options.website: - ns.title = countershape.template.Template(None, "

@!this.title!@

") - this.layout = countershape.Layout("_websitelayout.html") -else: - ns.title = countershape.template.Template(None, "

@!this.title!@

") - this.layout = countershape.Layout("_layout.html") - +this.layout = countershape.Layout("_layout.html") +this.titlePrefix = "mitmproxy 0.9 - " this.markup = markup.Markdown() + ns.docMaintainer = "Aldo Cortesi" ns.docMaintainerEmail = "aldo@corte.si" -ns.copyright = u"\u00a9 mitmproxy project, 2012" - -ns.index = countershape.widgets.SiblingPageIndex('/index.html', divclass="pageindex") +ns.copyright = u"\u00a9 mitmproxy project, 2013" def mpath(p): p = os.path.join(MITMPROXY_SRC, p) return os.path.expanduser(p) -ns.license = file(mpath("LICENSE")).read() ns.index_contents = file(mpath("README.mkd")).read() - - -top = os.path.abspath(os.getcwd()) def example(s): d = file(mpath(s)).read() extemp = """
%s
(%s)
""" return extemp%(countershape.template.Syntax("py")(d), s) - - ns.example = example filt_help = [] @@ -73,10 +60,8 @@ def nav(page, current, state): return pre + '%s'%(model.UrlTo(page), p.title) ns.nav = nav - pages = [ - Page("index.html", "docs"), - Page("intro.html", "Introduction"), + Page("index.html", "Introduction"), Page("install.html", "Installation"), Page("mitmproxy.html", "mitmproxy"), Page("mitmdump.html", "mitmdump"), diff --git a/doc-src/install.html b/doc-src/install.html index 0968cd66..6f4bc530 100644 --- a/doc-src/install.html +++ b/doc-src/install.html @@ -13,7 +13,7 @@ sudo pip install mitmproxy ## From Source - When installing from source, you will need to install the -[dependencies](@!urlTo("intro.html")!@) by hand. +[dependencies](@!urlTo("index.html")!@) by hand. - Then run the following command from the base of the source distribution:
diff --git a/doc-src/intro.html b/doc-src/intro.html
deleted file mode 100644
index 79687ec6..00000000
--- a/doc-src/intro.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
-@!index_contents!@
-
-
-- 
cgit v1.2.3