Man Page

db2qthelp is a DocBook to QtHelp converter.

Synopsis

db2qthelp [-h] [-c FILE] [-i INPUT] [-d DESTINATION] [-a APPNAME]
          [--css-definition CSS_DEFINITION] [--generate-css-definition]
          [--qhp-template QHP_TEMPLATE] [--generate-qhp-template]
          [-Q QT_PATH] [-X XSLT_PATH] [--version]

Description

db2qthelp is implemented in Python. It is started on the command line.

db2qthelp processes the input given using the --input <INPUT> (or -i <INPUT> for short). If a .xml document is given, it will be converted into HTML chunks using xsltproc, first. If a folder is given, db2qthelp assumes it will include already chunked HTML output will collect these files. If a .html document is given, db2qthelp assumes it a single HTML document generated by xsltproc and will split it into chunks internally.

db2qthelp stores intermediate and final files into the folder “qtdocs”. The output folder can be set using the option --destination <FOLDER> (or -d <FOLDER> for short).

The application name can be set using the option --app-name <APP_NAME> (or -s <APP_NAME> for short), the default is “na”.

db2qthelp adds a style sheet to the HTML chunks. A custom style sheet file can be set using the option --css-definition <CSS_DEFINITION>. The used default can be exported by setting the option --generate-css-definition. The written file will be named as given in the option --css-definition, or “template.css” by default. After writing the file, db2qthelp will end.

The used .qhp template can be exported using the option --generate-qhp-template. It will be named “template.qhp” per default, or as defined by the option --qhp-template <QHP_TEMPLATE>. Again, db2qthelp will end after writing the file. Use --qhp-template <QHP_TEMPLATE> to define a qhp template to load.

The options --xslt-path <XSLT_PATH> (or -X <XSLT_PATH> for short) and --qt-path <QT_BINARIES_PATH> (or -Q <QT_BINARIES_PATH> for short) set the paths to the xsltproc and the QT Help executables, respectively.

Per default, db2qthelp will write the generated files to the folder qtdocs. You may choose a different output folder using the --destination <FOLDER> (or -d <FOLDER> for short) option.

db2qthelp options can be stored in a configuration file which is read using the option --config <CONFIG_FILE> (or -c <CONFIG_FILE> for short). The option --help prints the help screen. The option --version prints the version information.

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.

Command line arguments

The script can be started on the command line with 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