Changeset 3772
- Timestamp:
- 08/29/08 18:01:44 (3 months ago)
- Files:
-
- trunk/deluge/scripts/wiki_docgen.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deluge/scripts/wiki_docgen.py
r3485 r3772 5 5 6 6 from deluge.core.core import Core 7 from deluge.ui.client import aclient 7 from deluge.ui.client import aclient, sclient 8 8 import pydoc 9 9 import inspect 10 10 import textwrap 11 sclient.set_core_uri() 12 print "\n\n" 11 13 12 14 … … 29 31 print("%s" % pydoc.getdoc(func)) 30 32 31 if True: #baseclient/core33 if 0: #baseclient/core 32 34 methods = sorted([m for m in dir(Core) if m.startswith("export")] 33 35 + ['export_add_torrent_file_binary'] #HACK … … 49 51 50 52 print("\n'''%s(%s): '''\n" %(method_name, ", ".join(params))) 51 print(" %s" % pydoc.getdoc(func))53 print("{{{\n%s\n}}}" % pydoc.getdoc(func)) 52 54 53 55 if False: #plugin-manager … … 61 63 print("\n'''%s(%s): '''\n" %(method_name, ", ".join(params))) 62 64 print("%s" % pydoc.getdoc(func)) 65 66 if 1: #possible config-values 67 print "=== config-values ===" 68 cfg = sclient.get_config() 69 for key in sorted(cfg.keys()): 70 print "%s:%s()" % (key, type(cfg[key]).__name__) 71 72 if False: #keys 73 print """== Notes == 74 * The available keys for get_torrent_status(id, keys) 75 {{{ 76 #!python 77 >>>sorted(sclient.get_status_keys())""" 78 print "\n".join(textwrap.wrap(str(sorted(sclient.get_status_keys())),100)) 79 print """}}}""" 80 81 82 83 84 print "\n\n" 85 86
