From 18cb97fb87033cdfffa31bd1fad192121d9f4620 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 20 Dec 2002 06:24:14 +0000 Subject: [PATCH] The viewdocs script can now find additional .zip books automatically. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/distrib/README.viewdocs.txt | 7 ++++--- wxPython/distrib/viewdocs.py | 8 +++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/wxPython/distrib/README.viewdocs.txt b/wxPython/distrib/README.viewdocs.txt index e9cf69a140..de7b3f7ee9 100644 --- a/wxPython/distrib/README.viewdocs.txt +++ b/wxPython/distrib/README.viewdocs.txt @@ -8,9 +8,10 @@ viewdocs.py script located in this directory and you're all set. 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. +by dropping their .zip file here, viewdocs.py will find them +automatically and add them to the list. 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/viewdocs.py b/wxPython/distrib/viewdocs.py index 0a9c22aa54..efcd59b523 100755 --- a/wxPython/distrib/viewdocs.py +++ b/wxPython/distrib/viewdocs.py @@ -1,7 +1,7 @@ #!/usr/bin/env python #--------------------------------------------------------------------------- -import sys, os +import sys, os, glob from wxPython.tools import helpviewer @@ -19,7 +19,13 @@ args = ['', os.path.join(basePath, 'ogl.zip'), ] +# add any other .zip files found +for file in glob.glob(os.path.join(basePath, "*.zip")): + if file not in args: + args.append(file) + # launch helpviewer helpviewer.main(args) #--------------------------------------------------------------------------- +