CHM Aggregator - preview page

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.


1) A simple walkthrough

Step 1 of 3, create or edit a new aggregate


Step 2 of 3, setting up the HTML compiler


Step 3 of 3, editing the aggregate


2) A typical scenario

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 :

We are going to compile all those CHM files into a single CHM file


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 :

Extracting the content from all the individual CHM files


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 :

Aggregating everything into one big CHM file


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 :

One big CHM file


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 :

One big CHM file without the useless Subscribe CD entries


3) Excluding topics

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 Advanced button.

When you click that button, the following dialog appears :

Adding a topic log to the CHM aggregation


Before you can provide one or more topic names to exclude ( make sure to separate those with semi-colons: ; )

, you must know those names. So check the Show topic log check box, then click Ok and then click Finish just 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 :

Excluding one or more topics


Click Ok, Click Finish, and let the aggregation complete. Once finished, you should see this :

One big CHM file without the useless Subscribe CD entries


4) More advanced stuff

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.


5) Technical features


ARsT design - december 2003 - Stéphane Rodriguez.