Skip to main content

A DocBook book to QtHelp converter

Project description

License: GPL PyPI version test Downloads Downloads Coverage Status Documentation Status

db2qthelp — a DocBook book to QtHelp project converter

Introduction

db2qthelp converts a DocBook book to a QtHelp project. It is written in Python 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 together with your DocBook look-up paths are set up and that the Qt applications needed to build Qt Help files are in your executable path, you may convert your DocBook book into Qt Help files like this:

db2qthelp.py -i userdocs.xml

That's all 😃. You'll get a .qch and a .qhc file you may use directly in your Qt 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

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.

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

Installation

The current version is 0.4.0. You may install the latest release using pip:

python -m pip install db2qthelp

Or download the latest release from github. You may as well clone or download the db2qthelp git repository. There is also a page about installing db2qthelp which lists further options.

License

db2qthelp is licensed under the GPLv3 license.

Examples / Users

db2qthelp was used to generate the in-app help for the following applications:

  • PaletteWB, an MS Windows application for editing color palettes;
  • ShaderWB, an MS Windows application for developing GLSL shaders.

ChangeLog

db2qthelp-0.4.0 (24.08.2025)

  • code
    • added support for direct processing of DocBook books
    • added suport for processing chuncked xsltproc HTML output
    • moved to argparse / configparser
    • refactoring
  • deployment
    • added installation as a directly callable console script
  • tests
    • added coveralls integration (test)
    • improved tests (test)
  • docs
    • reworked documentation
    • added automatic readthedocs docs building (Documentation Status)
  • 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 on github.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

db2qthelp-0.4.0.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

db2qthelp-0.4.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file db2qthelp-0.4.0.tar.gz.

File metadata

  • Download URL: db2qthelp-0.4.0.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for db2qthelp-0.4.0.tar.gz
Algorithm Hash digest
SHA256 aa7ddb94caa8c66c7c4ed41a14bfe972039d9a2dcbc31daaf2c6186abef93401
MD5 ed622114e0d6c6f53641663e618b26a5
BLAKE2b-256 8a830feda3a406ad6bb54c4ce7d4393a15bd1817b67027b8bd7ea64928e556ac

See more details on using hashes here.

File details

Details for the file db2qthelp-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: db2qthelp-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for db2qthelp-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 834e90190fdb7c1e644694c1634d0758cddae7d1864b7291b5aad82c62736794
MD5 9ef9c48ca722aeffe413d405addd196d
BLAKE2b-256 9af76763ecbaa66cc54edb529eff71e78dc1a658716dc9b8769fc94d960db233

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page