CHM (Compiled Html Help) files can be aggregated using this tool. Content is simpler to search for because aggregating CHM files means all your relevant content is put in one single place, and the Search tab from the Html viewer provides access to all the content.
Download it here (74kb). Unzip the package and double-click.
System requirements : Windows 9X/NT/2000/XP. HTML Help Workshop component (3.5 MB). No other requirement.
This software product is copyright ARsT design, all rights reserved. It's free to use. Commercial use of this product is strictly forbidden.
One of the reasons why I wanted to develop this tool is that I have many CHM files on my hard drives. Over 800, actually. Of course, out of those 800 CHM files, only a bunch of them are useful in my everyday life. Actually, when it comes to searching useful information fro mpast MSDN magazines, that can be downloaded from the MS site as CHM files for each month, then I come into troubles.
The trouble is that whatever I am looking for I have say 4 years of MSDN Mag content, and I can't seach the content in it with a single action. 4 years of content is 48 CHM files. So if I need to look up a code snippet, an explanation, or anything related to a particular topic, I have to open by hand each of those 48 files, and for each being open, click on the Search tab, enter my keywords, wait for the search to finish, and then navigate the results. All this must be done over and over again.
Clearly, a time saver is highly need. Here comes CHM aggregator.
This tool lets you choose whatever combination of CHM files, whether from the same folder or not, give a new CHM file name to put the content into, and then off you go! CHM aggregator extracts the content from all selected individual CHM files, does some processing if required, and then compiles the whole content into a single CHM file.
When the process is finished, the CHM file is automatically opened.
Let's give a walkthrough to all this with a simple example. Let's take all MSDN magazines of year 2002 :
Start CHM aggregator. Click Next.
In step 2, if HTML Help workshop is not yet installed on your machine, then a download button appears. If so, make sure to download and install HTML Help workshop before you go on. You can download the component here[^] (3.5 mega-bytes). In the remainder of this section, we assume that HTML Help workshop is installed, so the paths for the compiler and the decompiler are filled with existing file names.
Click Next. In step 3, the last step before we are done with the UI, you can select all individual CHM files by clicking Add, then select one or more files (multiple selection is activated). At any moment, you can select one or more items and click Remove to remove one or more of your choices. You can also use the Up and Down button on the current selection to move it. The way it is ordered is the way it gets eventually compiled into the aggregate CHM file.
Before we are done, we need to give a name for the aggregate CHM file. Just click on the [...] button on the upper right-corner, then browse folders and enter a new name. When you return, the
Finish is enabled and you can push it.
What's done then is that we extract all the content from the individual CHM files. A modeless box shows the progression as in :
At any moment, the process can be aborted by clicking the close button. If so, the process erases all temporary work, and closes.
Once the extraction is completed, the compilation phases begins. The compiler from the HTML Help workshop component is a dos-based process, which is the reason why you see a window like this :
All the content displayed in that window are in fact the most granular elements of CHM files, topics. A topic is usually a single page from the HTML content.
Once the process is completed, the resulting CHM file is automatically opened. It's ready to use, as in our example :
In the pic above, it's great to be able to search content in a single place to look for but there is a minor glinch to it. As you can see in the topic hierarchy on the left, a tiny Subscribe CD entry seems to duplicated after each MSDN Magazine issue and so kind of takes the space for no reason.
CHM aggregator can solve the problem, by letting users define the topics they want to exclude. Doing so, the Subscribe CD entries don't appear anymore, as in :
CHM aggregator can remove useless topics from each individual CHM file. In the example above, the Subscribe CD topics are pretty much useless, but still fill up quite a bit of the useful space in the content bar on the left.
Each of those entries is named a topic.
CHM aggregator provides the ability to exclude topics, based on their names (or pattern).
In our example above, just start CHM aggregator again, reproduce Step 1 and 2 as explained in the previous section and then, in Step 3, just before you push the
Finish button, don't do it until you've clicked on the
When you click that button, the following dialog appears :
Before you can provide one or more topic names to exclude ( make sure to separate those with semi-colons:
Show topic logcheck box, then click
Okand then click
Finishjust like before.
This time, when the aggregation is completed, the log of all topic names appears in notepad. The topic names appear in the same order as topics in the resulting aggregate CHM file. You can copy one or more of those topic names in your clipboard if you will.
Once you have one or more topic names to be excluded, for instance in our example it's
SubscribeCD.htm, then just start again CHM aggregator, redo all steps, click on the
Advanced button, then fill the edit box with this topic name, as in :
Finish, and let the aggregation complete. Once finished, you should see this :
I have added a batch mode so CHM aggregator can be used without the UI, especially if you know that you are willing to aggregate all CHM files from a given folder into a big CHM files.
The command line is :
CHMAggregator.exe -compile <input CHM folder> <output CHM filename>
An example is :
CHMAggregator.exe -compile "c:\tmp chm" c:\bigchm.chm. This will aggregate all CHM files found in the
c:\tmp chm folder.Make sure to add quotes if folders or names have spaces.
Font, to simplify the navigation in the content
ARsT design - december 2003 - Stéphane Rodriguez.