<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1 +1,2 @@
 *.pyc
+.DS_Store
\ No newline at end of file</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,86 +1,108 @@
-import sys
-sys.path.insert(0, '..')
-import web
-import inspect
-
-modules = [
-    'web.application', 
-    'web.contrib.template',
-    'web.db',
-    'web.debugerror',
-    'web.form', 
-    'web.http', 
-    'web.httpserver', 
-    'web.net',
-    'web.session',
-    'web.template', 
-    'web.utils',
-    'web.webapi',
-    'web.webopenid',
-    'web.wsgi'
-]
-
-qstart = '&lt;code class=&quot;head&quot;&gt;'
-qend = '&lt;/code&gt;'
-
-def process_func(name, f):
-    print qstart + name + inspect.formatargspec(*inspect.getargspec(f)) + qend + ': '
-    print inspect.getdoc(f)
-    print
-    
-def process_class(name, cls):
-    bases = [b.__name__ for b in cls.__bases__]
-    if bases:
-        name = name + '(' + &quot;,&quot;.join(bases) + ')'
-        
-    print qstart + 'class ' + name + qend + ': '
-    print inspect.getdoc(cls)
-    print
-
-def process_storage(name, d):
-    print qstart + name + qend + ': '
-    print d['__doc__']
-    
-def process_mod(name, mod):
-    print '&lt;a name=&quot;%s&quot;&gt;&lt;/a&gt;' % name
-    print '##', name
-    print
-    
-    all = getattr(mod, '__all__', None)
-
-    for k, v in inspect.getmembers(mod):
-        if k.startswith('_'):
-            continue
-
-        if inspect.getmodule(v) == mod:
-            if inspect.isclass(v):
-                process_class(k, v)
-            elif inspect.isfunction(v):
-                process_func(k, v)
-
-        # specical case for generating docs for web.ctx and web.config
-        elif all and k in all and isinstance(v, (web.storage, web.threadeddict)) and hasattr(v, '__doc__'):
-            process_storage(k, v)
-            
-def print_css():
-    print 
-    print '&lt;style type=&quot;text/css&quot;&gt;'
-    print '    #content {margin-left: 20px;}'
-    print '    .head {margin-left: -20px;}'
-    print '    h2 {margin-left: -20px;}'
-    print '&lt;/style&gt;'
-    print
-
-def main():
-    for name in modules:
-        print '* &lt;a href=&quot;#%s&quot;&gt;%s&lt;/a&gt;' %(name, name)
-    print
-    
-    for name in modules:
-        mod = __import__(name, {}, {}, 'x')
-        process_mod(name, mod)
-
-    print_css()
-
-if __name__ == '__main__':
-    main()
+import sys
+sys.path.insert(0, '..')
+import web
+import inspect
+
+modules = [
+    'web.application',
+    'web.contrib.template',
+    'web.db',
+    'web.debugerror',
+    'web.form',
+    'web.http',
+    'web.httpserver',
+    'web.net',
+    'web.session',
+    'web.template',
+    'web.utils',
+    'web.webapi',
+    'web.webopenid',
+    'web.wsgi'
+]
+
+
+qstart = '&lt;code class=&quot;head&quot;&gt;'
+qend = '&lt;/code&gt;'
+
+func_start = '&lt;div style=&quot;margin-left:%dpx&quot;&gt;'
+func_end = '&lt;/div&gt;'
+
+tab_width = 20 #width for tabs in px
+
+def process_func(name, f, tablevel=1):
+    if tablevel != 1: print func_start % (tablevel * tab_width)
+    sys.stdout.write(qstart + name + inspect.formatargspec(*inspect.getargspec(f)) + qend)
+    doc = inspect.getdoc(f)
+    if not doc is None:
+        print &quot;: &quot;
+        print doc
+    print
+    if tablevel != 1: print func_end
+    print
+
+def process_class(name, cls):
+    bases = [b.__name__ for b in cls.__bases__]
+    if bases:
+        name = name + '(' + &quot;,&quot;.join(bases) + ')'
+    
+    sys.stdout.write(qstart + 'class ' + name + qend)
+    doc = inspect.getdoc(cls)
+    if not doc is None:
+        print ': '
+        print inspect.getdoc(cls)
+    print
+    methods = [(m, getattr(cls, m)) for m in dir(cls)
+				if not m.startswith('_') and inspect.ismethod(getattr(cls, m))]
+	#Possible todo: see if code is faster with the get method in the rendering
+	#loop.
+    for m in methods: process_func(m[0], m[1], 2)
+
+def process_storage(name, d):
+    print qstart + name + qend + ': '
+    print d['__doc__']
+
+def process_mod(name, mod):
+    print '&lt;a name=&quot;%s&quot;&gt;&lt;/a&gt;' % name
+    print '##', name
+    print '&lt;a href=&quot;#top&quot;&gt;Back to top&lt;/a&gt;'
+    print
+    
+    all = getattr(mod, '__all__', None)
+    
+    for k, v in inspect.getmembers(mod):
+        if k.startswith('_'):
+            continue
+        
+        if inspect.getmodule(v) == mod:
+            if inspect.isclass(v):
+                process_class(k, v)
+            elif inspect.isfunction(v):
+                process_func(k, v)
+        
+        # specical case for generating docs for web.ctx and web.config
+        elif all and k in all and isinstance(v, (web.storage, web.threadeddict)) and hasattr(v, '__doc__'):
+            process_storage(k, v)
+
+def print_css():
+    print
+    print '&lt;style type=&quot;text/css&quot;&gt;'
+    print '    #content {margin-left: %dpx;}'% (tab_width)
+    print '    .head {margin-left: -20px;}'
+    print '    h2 {margin-left: -20px;}'
+    print '&lt;/style&gt;'
+    print
+
+def main():
+    print '&lt;a name=&quot;top&quot;&gt;&lt;/a&gt;'
+    for name in modules:
+        print '* &lt;a href=&quot;#%s&quot;&gt;%s&lt;/a&gt;' %(name, name)
+    print
+    
+    for name in modules:
+        mod = __import__(name, {}, {}, 'x')
+        process_mod(name, mod)
+    
+    print_css()
+
+if __name__ == '__main__':
+    main()
\ No newline at end of file</diff>
      <filename>tools/makedoc.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4a679cc3b80cc8b1b38e3b18308b0f91918835c0</id>
    </parent>
  </parents>
  <author>
    <name>Colin Rothwell</name>
    <email>theboff@gmx.com</email>
  </author>
  <url>http://github.com/webpy/webpy/commit/4f184c4553ea7bc3ade5b76af9dc8d6fb623b8df</url>
  <id>4f184c4553ea7bc3ade5b76af9dc8d6fb623b8df</id>
  <committed-date>2008-11-19T08:46:16-08:00</committed-date>
  <authored-date>2008-11-19T08:46:16-08:00</authored-date>
  <message>makedoc now documents all methods

make doc documents all methods, even those wrapped in classes. Classes within classes are not supported, however.
It also adds a link to the top of the page after each modules name, to make browsing easier.
It also doesn't add the colon and none after undocumented items.</message>
  <tree>3f2dcde4029843e09eec0d9e81a8360669dd7fcf</tree>
  <committer>
    <name>Colin Rothwell</name>
    <email>theboff@gmx.com</email>
  </committer>
</commit>
