Skip to content

Changing existing Help indexes to be local only

Today Pierre Igot writes about problems with built-in Help in Pages and how it downloads some help over the network. He found that when he clicked on a link in the help, it took up to a minute to do anything, with no indication about what was happening (downloading content from the internet), how long it would take or any way to stop the action.

There are three options that a developer can use when creating a help index that change this behavior. The Help Book content can be Internet-only, Internet-primary, or local-primary. (See Internet-Based Help Book Content.)

I looked at the help index for Pages. It’s located at “/Applications/iWork ’08/Pages.app/Contents/Resources/English.lproj/Pages 3 Help/Pages 3 Help.helpindex”. This is just a binary typed stream that only contains standard objects, so it was easy to write a tool to read the file. I tweaked it so that it doesn’t show the bulk of the index data. Here’s what part of Pages’ help index looks like:


"SKI_PREFER_NETWORK_FILES" = 1;
"SKI_REMOTE_ROOT" = "http://helposx.apple.com/pageshelpr3/English/";
"SKI_USE_REMOTE_ROOT" = 1;
"SKI_VERSIONS" =     {
    "SKI_CORE_FOUNDATION" = 368;
    "SKI_FOUNDATION" = 567;
    "SKI_HELP_INDEXER" = 17;
    "SKI_SEARCH_KIT" = 147;
    "SKI_SYSTEM_BUILD" = 8P135;
};

This is pretty easy to understand, but with a little experimentation with Help Indexer I verified that the first three keys (SKI_PREFER_NETWORK_FILES, SKI_REMOTE_ROOT, SKI_USE_REMOTE_ROOT) are the only changes between the three different options. Removing the first two keys and changing the value of SKI_USE_REMOTE_ROOT to 0 changes it to a local-only version.

HelpIndexTool

This is the little tool I created. Running it with no arguments shows the usage. Running it with a single argument (the path the a help index) will display the contents of the file (excluding the actual index data). Running it with two arguments will create a local-only version of the help index at the path specified by the second argument.

So if you wanted to try this on the Pages help index, you would do:


./HelpIndexTool "/Applications/iWork '08/Pages.app/Contents/Resources/English.lproj/Pages 3 Help/Pages 3 Help.helpindex" ~/out.helpindex

And then backup the original file, and replace the original “Pages 3 Help.helpindex” with the out.helpindex file in your home directory. Relaunch Pages and it should be good to go.

You can download HelpIndexTool-2008-02-01.dmg here. It includes the project source and compiled tool (Universal).

If you have the developer tools installed, you could try just recreating the help index with Help Indexer, but there are other options that you’d want to make sure were the same as the original. In particular, you can specify the language for the stop words, or specify a custom file of stop words. My tool doesn’t change any of these other options.

Post a Comment

You must be logged in to post a comment.