aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.sources/make7
-rw-r--r--[-rwxr-xr-x]examples/libpathod_pathoc.py (renamed from examples/pathoc.py)1
-rw-r--r--examples/test_context.py (renamed from .sources/examples_context.py)0
-rw-r--r--examples/test_setup.py (renamed from .sources/examples_setup.py)4
-rw-r--r--examples/test_setupall.py (renamed from .sources/examples_setupall.py)0
-rw-r--r--libpathod/templates/docs_libpathod.html22
-rw-r--r--libpathod/templates/examples_setup.html4
-rw-r--r--libpathod/templates/index.html22
-rw-r--r--libpathod/templates/libpathod_pathoc.html7
9 files changed, 37 insertions, 30 deletions
diff --git a/.sources/make b/.sources/make
index e0e9d2cc..1c8b1d69 100755
--- a/.sources/make
+++ b/.sources/make
@@ -1,4 +1,5 @@
#!/bin/sh
-pygmentize -f html ./examples_context.py > ../libpathod/templates/examples_context.html
-pygmentize -f html ./examples_setup.py > ../libpathod/templates/examples_setup.html
-pygmentize -f html ./examples_setupall.py > ../libpathod/templates/examples_setupall.html
+pygmentize -f html ../examples/test_context.py > ../libpathod/templates/examples_context.html
+pygmentize -f html ../examples/test_setup.py > ../libpathod/templates/examples_setup.html
+pygmentize -f html ../examples/test_setupall.py > ../libpathod/templates/examples_setupall.html
+pygmentize -f html ../examples/libpathod_pathoc.py > ../libpathod/templates/libpathod_pathoc.html
diff --git a/examples/pathoc.py b/examples/libpathod_pathoc.py
index 4c3fae52..ca53b08f 100755..100644
--- a/examples/pathoc.py
+++ b/examples/libpathod_pathoc.py
@@ -4,3 +4,4 @@ from libpathod import pathoc
p = pathoc.Pathoc("google.com", 80)
p.connect()
print p.request("get:/")
+print p.request("get:/foo")
diff --git a/.sources/examples_context.py b/examples/test_context.py
index f3da83cb..f3da83cb 100644
--- a/.sources/examples_context.py
+++ b/examples/test_context.py
diff --git a/.sources/examples_setup.py b/examples/test_setup.py
index 5366c9ef..2918a4dd 100644
--- a/.sources/examples_setup.py
+++ b/examples/test_setup.py
@@ -3,8 +3,8 @@ from libpathod import test
class Test:
"""
- Testing the requests module with
- a pathod instance started for
+ Testing the requests module with
+ a pathod instance started for
each test.
"""
def setUp(self):
diff --git a/.sources/examples_setupall.py b/examples/test_setupall.py
index c8948971..c8948971 100644
--- a/.sources/examples_setupall.py
+++ b/examples/test_setupall.py
diff --git a/libpathod/templates/docs_libpathod.html b/libpathod/templates/docs_libpathod.html
index 8d51ebba..aa404eed 100644
--- a/libpathod/templates/docs_libpathod.html
+++ b/libpathod/templates/docs_libpathod.html
@@ -1,7 +1,27 @@
{% extends "frame.html" %}
{% block body %}
-Foo
+<div class="page-header">
+ <h1>
+ libpathod
+ <small>Using pathod and pathoc in code.</small>
+ </h1>
+</div>
+<div class="row">
+ <div class="span6">
+
+ <p> Behind the pathod and pathoc command-line tools lurks
+ <b>libpathod</b>, a powerful library for manipulating and serving HTTP
+ requests and responses. The canonical documentation for the library is
+ in the code, and can be accessed using pydoc.</p>
+
+ </div>
+ <div class="span6">
+ <h1> pathoc </h1>
+
+ {% include "libpathod_pathoc.html" %}
+ </div>
+</div>
{% endblock %}
diff --git a/libpathod/templates/examples_setup.html b/libpathod/templates/examples_setup.html
index bde45840..b80ad379 100644
--- a/libpathod/templates/examples_setup.html
+++ b/libpathod/templates/examples_setup.html
@@ -3,8 +3,8 @@
<span class="k">class</span> <span class="nc">Test</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;</span>
-<span class="sd"> Testing the requests module with </span>
-<span class="sd"> a pathod instance started for </span>
+<span class="sd"> Testing the requests module with</span>
+<span class="sd"> a pathod instance started for</span>
<span class="sd"> each test.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">setUp</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
diff --git a/libpathod/templates/index.html b/libpathod/templates/index.html
index 9561fee1..4b52b6a5 100644
--- a/libpathod/templates/index.html
+++ b/libpathod/templates/index.html
@@ -66,26 +66,4 @@
</div>
</div>
-
-<div style="margin-top: 50px" class="row">
- <div class="span6">
- <div>
- <h1> <a href="/docs/test">libpathod.test</a> </h1>
-
- <p>Using pathod in your unit tests.</p>
-
- </div>
- </div>
- <div class="span6">
- <div>
- <h1> <a href="/docs/test">libpathod.test</a> </h1>
-
- <p>Using pathod in your unit tests.</p>
-
- {% include "examples_context.html" %}
-
- </div>
- </div>
-</div>
-
{% endblock %}
diff --git a/libpathod/templates/libpathod_pathoc.html b/libpathod/templates/libpathod_pathoc.html
new file mode 100644
index 00000000..f2737c01
--- /dev/null
+++ b/libpathod/templates/libpathod_pathoc.html
@@ -0,0 +1,7 @@
+<div class="highlight"><pre><span class="c">#!/usr/bin/env python</span>
+<span class="kn">from</span> <span class="nn">libpathod</span> <span class="kn">import</span> <span class="n">pathoc</span>
+
+<span class="n">p</span> <span class="o">=</span> <span class="n">pathoc</span><span class="o">.</span><span class="n">Pathoc</span><span class="p">(</span><span class="s">&quot;google.com&quot;</span><span class="p">,</span> <span class="mi">80</span><span class="p">)</span>
+<span class="n">p</span><span class="o">.</span><span class="n">connect</span><span class="p">()</span>
+<span class="k">print</span> <span class="n">p</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s">&quot;get:/&quot;</span><span class="p">)</span>
+</pre></div>