From a33eeef0186c7240b80273b6e748880391771453 Mon Sep 17 00:00:00 2001 From: "gergely.erdelyi" Date: Wed, 25 Jun 2008 21:03:38 +0000 Subject: [PATCH] Added small script to generate function cross reference with epydoc --- build.py | 3 ++- tools/gendocs.py | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 tools/gendocs.py diff --git a/build.py b/build.py index 43c4113..9857597 100644 --- a/build.py +++ b/build.py @@ -104,7 +104,8 @@ SRCDIST_MANIFEST = [ "swig/typeinf.i", "swig/ua.i", "swig/xref.i", - "patches/ida51.patch" + "patches/ida51.patch", + "tools/gendocs.py", ] # Temporaty build files to remove diff --git a/tools/gendocs.py b/tools/gendocs.py new file mode 100644 index 0000000..7d57601 --- /dev/null +++ b/tools/gendocs.py @@ -0,0 +1,25 @@ +#------------------------------------------------------------ +# gendoc.py: Generate an API cross-reference for IDAPython +#------------------------------------------------------------ +__author__ = "Gergely Erdelyi " + +import epydoc.cli + +# This is a small hack to prevent epydoc from exiting the whole +# IDA process in case something goes wrong. +def exit(eval): + print "not exiting" +epydoc.cli.sys.exit = exit + +# Fill in the command-line arguments +epydoc.cli.optparse.sys.argv = [ 'epydoc', + '--no-sourcecode', + '-u', 'http://www.d-dome.net/idapython/', + '--navlink', 'IDAPython Reference', + '--no-private', + '--simple-term', + '-o', 'idapython-reference-%d.%d.%d' % (IDAPYTHON_VERSION[:3]), + '--html', + 'idc', 'idautils', 'idaapi' ] +# Generate the documentation +epydoc.cli.cli()