https://github.com/dkrajzew/db2qthelp
A DocBook to QtHelp converter.
https://github.com/dkrajzew/db2qthelp
docbook documentation qt qthelp
Last synced: 5 months ago
JSON representation
A DocBook to QtHelp converter.
- Host: GitHub
- URL: https://github.com/dkrajzew/db2qthelp
- Owner: dkrajzew
- License: gpl-3.0
- Created: 2023-01-03T20:44:17.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-08-24T13:30:44.000Z (10 months ago)
- Last Synced: 2026-01-08T15:28:27.214Z (6 months ago)
- Topics: docbook, documentation, qt, qthelp
- Language: HTML
- Homepage:
- Size: 164 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/dkrajzew/db2qthelp/blob/main/LICENSE)
[](https://pypi.org/project/db2qthelp/)

[](https://pepy.tech/projects/db2qthelp)
[](https://pepy.tech/projects/db2qthelp)
[](https://coveralls.io/github/dkrajzew/db2qthelp?branch=main)
[](https://db2qthelp.readthedocs.io/en/latest/?badge=latest)
__db2qthelp__ — a DocBook book to QtHelp project converter
# Introduction
__db2qthelp__ converts a [DocBook](https://docbook.org/) [book](https://tdg.docbook.org/tdg/4.5/book.html) to a [QtHelp](https://doc.qt.io/qt-5/qthelp-framework.html) project. It is written in [Python](https://www.python.org/) and started on the command line.
__db2qthelp__ is in an early stage of development. It works well for me but it may work with my setup only. I try to make it usable nonetheless, so let me know if something does not work. Thanks.
# Usage
Given that your [xsltproc](https://gitlab.gnome.org/GNOME/libxslt) together with your [DocBook](https://docbook.org/) look-up paths are set up and that the [Qt](https://www.qt.io/) applications needed to build [Qt](https://www.qt.io/) Help files are in your executable path, you may convert your [DocBook](https://docbook.org/) book into [Qt](https://www.qt.io/) Help files like this:
```console
db2qthelp.py -i userdocs.xml
```
That's all 😃. You'll get a .qch and a .qhc file you may use directly in your [Qt](https://www.qt.io/) Help widget…
## Options
The script has the following options:
* **--config *<FILE>*** / **-c *<FILE>***: Reads the named configuration file
* **--input *<INPUT>*** / **-i *<INPUT>***: Defines the DocBook HTML document to parse
* **--destination *<DESTINATION>* / **-d *<DESTINATION>***: Sets the output folder
* **--appname *<APPNAME>*** / **-a *<APPNAME>***: Sets the name of the application
* **--css-definition *<CSS_DEFINITION>***: Defines the CSS definition file to use
* **--generate-css-definition**: If set, a CSS definition file is generated
* **--qhp-template *<QHP_TEMPLATE>***: Defines the QtHelp project (.qhp) template to use
* **--generate-qhp-template**: If set, a QtHelp project (.qhp) template is generated
* **--qt-path *<QT_PATH>*** / **-Q *<QT_PATH>***: Sets the path to the Qt binaries
* **--xslt-path *<XSLT_PATH>*** / **-X *<XSLT_PATH>***: Sets the path to xsltproc
* **--help** / **-h**: show this help message and exit
* **--version**: show program's version number and exit
## Examples
```shell
db2qthelp -i userdocs.xml
```
Generates Qt Help files by processing the DocBook book ```userdocs.xml```. The default CSS style sheets will applied, the used binaries are assumed to be in the path.
```shell
db2qthelp -i userdocs/ --css-definition my_style.css
```
Will collect the HTML files located in the folder ```userdocs```, apply the CSS located in ```my_style.css```, and build the Qt Help files from all files found in the given folder.
## Documentation
* The complete documentation is located at
* The github repository is located at:
* Discussions are open at
* The issue tracker is located at:
* The PyPI page is located at:
* The code documentation (pydoc) is located at:
## Installation
The current version is 0.4.0. You may install the latest release using pip:
```console
python -m pip install db2qthelp
```
Or download the [latest release](https://github.com/dkrajzew/db2qthelp/releases/tag/0.4.0) from github. You may as well clone or download the [db2qthelp git repository](https://github.com/dkrajzew/db2qthelp). There is also a page about [installing db2qthelp](install.md) which lists further options.
## License
**db2qthelp** is licensed under the [GPLv3 license](https://raw.githubusercontent.com/dkrajzew/db2qthelp/refs/heads/main/LICENSE).
# Examples / Users
**db2qthelp** was used to generate the in-app help for the following applications:
* [PaletteWB](https://www.palettewb.com), an MS Windows application for editing color palettes;
* [ShaderWB](https://www.krajzewicz.de/blog/shaderwb.php), an MS Windows application for developing GLSL shaders.
# ChangeLog
## db2qthelp-0.4.0 (24.08.2025)
* code
* added support for direct processing of [DocBook](https://docbook.org/) books
* added suport for processing chuncked [xsltproc](https://gitlab.gnome.org/GNOME/libxslt) HTML output
* moved to argparse / configparser
* refactoring
* deployment
* added installation as a directly callable console script
* tests
* added coveralls integration ()
* improved tests ()
* docs
* reworked documentation
* added automatic [readthedocs](https://db2qthelp.readthedocs.io/) docs building ([](https://db2qthelp.readthedocs.io/en/latest/?badge=latest))
* moved to GPLv3
## db2qthelp-0.2 (07.01.2023)
* Initial checkin
* Adding configuration options
* Adding a documentation
* Adding first tests
# Summary
Well, have fun. If you have any comments / ideas / issues, please submit them to [db2qthelp's issue tracker](https://github.com/dkrajzew/db2qthelp/issues) on github.