View Single Post
Old 11-07-2016, 09:14 AM   #35
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,742
Karma: 24031403
Join Date: Dec 2010
Device: Kindle PW2
@DiapDealer & @KevinH: I found out that it's relatively easy to generate a Qt help file from the user guide without any code changes, except for converting non-ASCII characters to HTML entities.

All you'd have to do is, unpack the user guide, copy a Qt help project file to the OEBPS folder and run the Qt help compiler.

To generate the help file:

1. Unpack the updated user guide epub file.
2. Copy sigilhelp.qhp to the OEBPS folder.
3. Go to the OEBPS folder and run the following command:
Code:
qhelpgenerator sigilhelp.qhp -c -o sigilhelp.qch
To preview the Qt help:

1. Open Qt Assistant.
2. Select Edit > Preferences.
3. Select Documentation > Add > sigilhelp.qch

(I created a Qt help file and attached it and the help project file.)

Note that the existing user guide contains the following non-ASCII characters that need to be converted to entities before running the help compiler:

copy, mdash, rarr, ldquo, rdquo, rsquo, rarr and ge

I used DiapDealer's ShadyCharacters plugin to convert them to entities. Here's my plugin preferences file:

Spoiler:
Code:
{
  "matrix": {
    "ge": [
      "0x2265",
      "≥"
    ],
    "zwj": [
      "0x200D",
      "*"
    ],
    "shy": [
      "0x00AD",
      "*"
    ],
    "zwnbsp": [
      "0xFEFF",
      ""
    ],
    "nbsp": [
      "0x00A0",
      "*"
    ],
    "rdquo": [
      "0x201D",
      "”"
    ],
    "thinsp": [
      "0x2009",
      " "
    ],
    "rsquo": [
      "0x2019",
      "’"
    ],
    "rarr": [
      "0x2192",
      "→"
    ],
    "nnbsp": [
      "0x202F",
      " "
    ],
    "mdash": [
      "0x2014",
      "—"
    ],
    "wj": [
      "0x2060",
      "⁠"
    ],
    "ndash": [
      "0x2013",
      "–"
    ],
    "ldquo": [
      "0x201C",
      "“"
    ],
    "copy": [
      "0x00A9",
      "©"
    ]
  }
}


(Not all of the entries in the list were actually used.)

and here's the corresponding Sigil.ini section:

Spoiler:
Code:
preserve_entity_codes=\xa9\x2014\x2019\x201c\x201d\x2192\x2265\xa0
preserve_entity_names="©", "—", "’", "“", "”", "→", "≥", " "


I don't know how difficult it would be to add Qt help viewer support to Sigil, but it couldn't hurt to investigate this idea.
Attached Files
File Type: zip sigilhelp.zip (6.97 MB, 254 views)

Last edited by Doitsu; 11-07-2016 at 01:30 PM.
Doitsu is offline   Reply With Quote