From ee60d12fc888ac51a5c08b48992eabb95e78a295 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 29 Feb 2008 18:34:47 +0000 Subject: [PATCH] version 0.4.39 --- src/libprs500/__init__.py | 2 +- src/libprs500/gui2/main.ui | 2 +- src/libprs500/manual/libprs500.qhp | 13 +++++++------ src/libprs500/manual/make.py | 25 +++++++++++-------------- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/libprs500/__init__.py b/src/libprs500/__init__.py index 4bd2dd0b7b..841953b836 100644 --- a/src/libprs500/__init__.py +++ b/src/libprs500/__init__.py @@ -13,7 +13,7 @@ ## with this program; if not, write to the Free Software Foundation, Inc., ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ''' E-book management software''' -__version__ = "0.4.38" +__version__ = "0.4.39" __docformat__ = "epytext" __author__ = "Kovid Goyal " __appname__ = 'libprs500' diff --git a/src/libprs500/gui2/main.ui b/src/libprs500/gui2/main.ui index 7de5423ce8..51da48a883 100644 --- a/src/libprs500/gui2/main.ui +++ b/src/libprs500/gui2/main.ui @@ -105,7 +105,7 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For help visit <a href="https://libprs500.kovidgoyal.net/wiki/WikiStart#Usage"><span style=" text-decoration: underline; color:#0000ff;">libprs500.kovidgoyal.net</span></a><br /><br /><span style=" font-weight:600;">libprs500</span>: %1 by <span style=" font-weight:600;">Kovid Goyal</span> %2<br />%3</p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For help visit <a href="http://libprs500.kovidgoyal.net/user_manual"><span style=" text-decoration: underline; color:#0000ff;">libprs500.kovidgoyal.net</span></a><br /><br /><span style=" font-weight:600;">libprs500</span>: %1 by <span style=" font-weight:600;">Kovid Goyal</span> %2<br />%3</p></body></html> Qt::RichText diff --git a/src/libprs500/manual/libprs500.qhp b/src/libprs500/manual/libprs500.qhp index 0a6fae7212..ebd45a7be1 100644 --- a/src/libprs500/manual/libprs500.qhp +++ b/src/libprs500/manual/libprs500.qhp @@ -10,13 +10,14 @@ libprs500 +
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/src/libprs500/manual/make.py b/src/libprs500/manual/make.py index a37f239d35..ee7cd17e44 100644 --- a/src/libprs500/manual/make.py +++ b/src/libprs500/manual/make.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai ## Copyright (C) 2008 Kovid Goyal kovid@kovidgoyal.net ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -92,6 +91,9 @@ def compile_help(): QCG = os.path.join(QTBIN, 'qcollectiongenerator') QTA = os.path.join(QTBIN, 'assistant') os.environ['LD_LIBRARY_PATH'] = QTLIB + for f in ('libprs500.qch', 'libprs500.qhc'): + if os.path.exists(f): + os.unlink(f) subprocess.check_call((QCG, 'libprs500.qhcp')) subprocess.call((QTA, '-collectionFile', 'libprs500.qhc')) @@ -148,7 +150,7 @@ def populate_cli(src): def populate_toc(src): soup = BeautifulSoup(open('start.html', 'rb').read().decode('UTF-8')) - sections = [] + sections = [('start.html', 'Start')] for a in soup.find(id='toc').findAll('a'): sections.append((a['href'], a.string)) @@ -158,7 +160,7 @@ def populate_gui(src): soup = BeautifulSoup(open('gui.html', 'rb').read().decode('UTF-8')) sections = [] for a in soup.find(id='toc').findAll('a'): - sections.append((a['href'], a.string)) + sections.append(('gui.html'+a['href'], a.string)) return populate_section('gui.html', sections, src) @@ -175,6 +177,7 @@ def qhp(): root.find('filterSection').find('toc').tail = '\n\n%8s'%' ' open('libprs500.qhp', 'wb').write(tostring(root, encoding='UTF-8')) + compile_help() def generate_cli_docs(): documented_cmds = [] @@ -249,15 +252,9 @@ def generate_cli_docs(): body += '

You can see usage for undocumented commands by executing them without arguments in a terminal

' open('cli-index.html', 'wb').write(template.replace('%body', body)) - - - - - -def create_html_interface(src='libprs500.qhp'): +def html(src='libprs500.qhp'): root = parse(src).getroot() - print toc = root.find('filterSection').find('toc') def is_leaf(sec): @@ -293,8 +290,7 @@ def all(opts): clean() generate_cli_docs() qhp() - create_html_interface() - compile_help() + html() if opts.validate: validate() @@ -321,7 +317,8 @@ if __name__ == '__main__': if func is None: print >>sys.stderr, 'Unknown target', sys.argv(1) sys.exit(1) - sys.exit(func(*fargs)) else: parser.print_help() - sys.exit(1) \ No newline at end of file + sys.exit(1) + sys.exit(func(*fargs)) + \ No newline at end of file