diff options
author | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2006-01-09 20:44:25 +0000 |
---|---|---|
committer | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2006-01-09 20:44:25 +0000 |
commit | d77fdfef70e08114f57cbef5d91707df8717ea9f (patch) | |
tree | 49444e3486c0c333cb7b33dfa721296c08ee4ece /sandbox/tibs/pysource2/pysrc2html.py | |
parent | 53cd16ca6ca5f638cbe5956988e88f9339e355cf (diff) | |
parent | 3993c4097756e9885bcfbd07cb1cc1e4e95e50e4 (diff) | |
download | docutils-0.4.tar.gz |
Release 0.4: tagging released revisiondocutils-0.4
git-svn-id: http://svn.code.sf.net/p/docutils/code/tags/docutils-0.4@4268 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'sandbox/tibs/pysource2/pysrc2html.py')
-rwxr-xr-x | sandbox/tibs/pysource2/pysrc2html.py | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/sandbox/tibs/pysource2/pysrc2html.py b/sandbox/tibs/pysource2/pysrc2html.py deleted file mode 100755 index 9aaf26782..000000000 --- a/sandbox/tibs/pysource2/pysrc2html.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python -"""pysrc2html - Read Python package/modules and output HTML documentation - -@@@ I'm not terribly happy with the name of this module, but it will do for -now (pydoc2html *might* be better?) - -:Author: Tibs -:Contact: tibs@tibsnjoan.co.uk -:Revision: $Revision$ -:Date: $Date$ -:Copyright: This module has been placed in the public domain. -""" - -__docformat__ = 'reStructuredText' - -import sys -from package import parse_package_or_module -import transform -from docutils.writers.html4css1 import Writer -from docutils.frontend import OptionParser - -usage = '%prog [options] [<package-directory> | <python-file> [html-file]]' -description = ('Generates .html documentation for the given Python package' - ' or module.') - -writer = Writer() - -option_parser = OptionParser(components=[writer], - usage=usage,description=description) - -settings = option_parser.parse_args(sys.argv[1:]) - -source_path = settings._source -target_path = settings._destination - -nodes = parse_package_or_module(source_path) - -# That then needs converting to a docutils tree -document = transform.make_document(nodes,settings) - -# And *that* wants converting to the appropriate output format -try: - target = open(target_path,"w") - writer.write(document,target) -finally: - target.close() |