diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index 175782600b..ce78b04172 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -54,7 +54,7 @@ Added Throbber from Cliff Wells to the library and the demo. Windows installer prompts to uninstall old version first. -Added wxPython.lib.evtmgr by Rob Shecter, which is an easier, more +Added wxPython.lib.evtmgr by Robb Shecter, which is an easier, more "Pythonic" and more OO method of registering handlers for wxWindows events using the Publish/Subscribe pattern. @@ -70,6 +70,10 @@ implementation of allowing the user to split a window any number of times either horizontally or vertically, and to close the split off windows when desired. +Added helpviewer tool that displays HTML books similarly to how MS +HTMLHelp viewer does. Changed how the wxPythonDocs tarball is built +and added a script to launch the doc viewer. + diff --git a/wxPython/distrib/README.viewdocs.txt b/wxPython/distrib/README.viewdocs.txt new file mode 100644 index 0000000000..0518ab8685 --- /dev/null +++ b/wxPython/distrib/README.viewdocs.txt @@ -0,0 +1,16 @@ +wxPythonDocs +------------ + +The wxWindows docs can now be viewed on non-Win32 platforms with a +nice viewer modeled after the MS HTMLViewer. Simply execute the +viewdocs.py script located in this directory and you're all set. +(You'll need to first have wxPython installed and accessible via the +PYTHONPATH.) + +You can also add other HTML books to be displayed by the viewer simply +by dropping their .zip file here and tweaking viewdocs.py. The zip +file just needs to contain a .hhp file that defines the contents of +the book. See the docs on wxHtmlHelpController for details. + +If you'd still ike to view these docs in your regular browser you can +simply unzip each of the books into their own directory. \ No newline at end of file diff --git a/wxPython/distrib/makedocs b/wxPython/distrib/makedocs new file mode 100755 index 0000000000..872f7283f1 --- /dev/null +++ b/wxPython/distrib/makedocs @@ -0,0 +1,61 @@ +#!/bin/bash + +#---------------------------------------------------------------------- + +if [ -z $1 ]; then + echo "Please specify a version number on the command line." + exit 1 +fi + +if [ ! -d wxPython ]; then # TODO: make this test more robust + echo "Please run this script from the root wxPython directory." + exit 1 +fi + + +# **** Make a directory to build up a distribution tree +mkdir _distrib_bld +mkdir _distrib_bld/wxPythonDocs-$1 +cd _distrib_bld +mkdir wxPythonDocs-$1/wx +mkdir wxPythonDocs-$1/ogl + +WXDIR=../.. + +# **** Build the docs using tex2rtf +cp $WXDIR/docs/latex/wx/*.gif wxPythonDocs-$1/wx +$WXDIR/utils/tex2rtf/src/tex2rtf $WXDIR/docs/latex/wx/manual.tex wxPythonDocs-$1/wx/wx.htm -twice -html +cp wxPythonDocs-$1/wx/wx.htm wxPythonDocs-$1/wx/index.htm + +cp $WXDIR/contrib/docs/latex/ogl/*.gif wxPythonDocs-$1/ogl +cp $WXDIR/contrib/docs/latex/ogl/*.bmp wxPythonDocs-$1/ogl +$WXDIR/utils/tex2rtf/src/tex2rtf $WXDIR/contrib/docs/latex/ogl/ogl.tex wxPythonDocs-$1/ogl/ogl.htm -twice -html +cp wxPythonDocs-$1/ogl/ogl.htm wxPythonDocs-$1/ogl/index.htm + + +# **** zip the docs into "books" +cd wxPythonDocs-$1 +cd wx +zip ../wx.zip * +cd .. +rm -r wx + +cd ogl +zip ../ogl.zip * +cd .. +rm -r ogl + +cd .. +cp ../distrib/viewdocs.py wxPythonDocs-$1 +cp ../distrib/README.viewdocs.txt wxPythonDocs-$1/README.txt + +rm -f ../dist/wxPythonDocs-$1.tar.gz +tar cvf ../dist/wxPythonDocs-$1.tar wxPythonDocs-$1 +gzip -9 ../dist/wxPythonDocs-$1.tar + + +# **** Cleanup +cd .. +rm -r _distrib_bld + + diff --git a/wxPython/distrib/viewdocs.py b/wxPython/distrib/viewdocs.py new file mode 100755 index 0000000000..0a9c22aa54 --- /dev/null +++ b/wxPython/distrib/viewdocs.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +#--------------------------------------------------------------------------- + +import sys, os +from wxPython.tools import helpviewer + + +# Figure out the path where this app is located +if __name__ == '__main__': + basePath = os.path.dirname(sys.argv[0]) +else: + basePath = os.path.dirname(__file__) + + +# setup the args +args = ['', + '--cache='+basePath, + os.path.join(basePath, 'wx.zip'), + os.path.join(basePath, 'ogl.zip'), + ] + +# launch helpviewer +helpviewer.main(args) + +#--------------------------------------------------------------------------- diff --git a/wxPython/wxPython/tools/helpviewer.py b/wxPython/wxPython/tools/helpviewer.py index 06db66e4c4..16f5a37d1b 100644 --- a/wxPython/wxPython/tools/helpviewer.py +++ b/wxPython/wxPython/tools/helpviewer.py @@ -26,12 +26,12 @@ import sys, os #--------------------------------------------------------------------------- -def main(): - if len(sys.argv) < 2: +def main(args=sys.argv): + if len(args) < 2: print __doc__ return - args = sys.argv[1:] + args = args[1:] cachedir = None if args[0][:7] == '--cache': cachedir = os.path.expanduser(args[0].split('=')[1])