CHM project files
Brought to you by:
edloper
I'd like to add an option that will cause epydoc to
output the files needed for building a CHM file with MS
HtmlHelp Workshop.
There is probably a formal spec of the file format
somewhere at this site:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconHH1Start.asp
but it is fairly easy to get it right without even
knowing all the details about it. Attached is a script
that I fiddled with years ago that makes a set of files
for the Python docs.
Logged In: YES
user_id=943591
this is an api fix
Logged In: YES
user_id=1660798
Originator: NO
A simple chm project with the three relevant project files
------------------------------------------------------------------------------------------------------------
project.hhp
main project file you pass to the compioler with some (not all) options and file list
------------------------------------------------------------------------------------------------------------
[OPTIONS]
Compatibility=1.1 or later
Compiled file=project.chm
Contents file=project.hhc
Default Window=window
Default topic=foo.html
Display compile progress=No
Index file=project.hhk
Language=0x407 Deutsch (Deutschland)
[WINDOWS]
window=,"project.hhc","project.hhk","foo.html",,,,,,0x2120,,0x70307e,,,,,,,,0
[FILES]
foo.html
bar.html
a\foo.html
a\bar.html
[INFOTYPES]
---------------------------------------------------------------------------------------------------
project.hhc
table of contents containing the tree of files as <ul>'s. Each new <ul>
opens a folder with the first <li> being the index page of the folder.
---------------------------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft® HTML Help Workshop 4.1">
<!-- Sitemap 1.0 -->
</HEAD><BODY>
<OBJECT type="text/site properties">
<param name="ImageType" value="Folder">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="foo">
<param name="Local" value="foo.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="bar">
<param name="Local" value="bar.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="foo">
<param name="Local" value="foo.html">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="bar">
<param name="Local" value="bar.html">
</OBJECT>
</UL>
</UL>
</UL>
</UL>
</BODY></HTML>
-------------------------------------------------------------------------------------------------------------
project.hhk
index, containing the keywords. Keywords may be a flat or nested list of <ul>'s.
In case of duplicates (level ++ name) a popup lets the user select the topic
to jump to.
------------------------------------------------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<meta name="GENERATOR" content="Microsoft® HTML Help Workshop 4.1">
<!-- Sitemap 1.0 -->
</HEAD><BODY>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="foo">
<param name="Name" value="Some-foo">
<param name="Local" value="foo.html">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="foo">
<param name="Name" value="Another-foo">
<param name="Local" value="a\foo.html">
</OBJECT>
</UL>
</BODY></HTML>
------------------------------------------------------------------------------------------------------------
Rather exhaustive (inofficial) specs of the file formats can be found here:
*.hhp
-----------------------
http://chmspec.nongnu.org/latest/INI.html#INI_Preface
*.hhc, *.hhk
----------------------
http://chmspec.nongnu.org/latest/Sitemap.html
see:
http://chmspec.nongnu.org/
Logged In: YES
user_id=1660798
Originator: NO
Found two minor issues while playing around with Chms and epydoc.
1. microsofts compiler does not like the xml decls on top of each page.
It throws a warning for each page, but compiles ok.
2. would be good if html writer could add one or the other index page
to make it easier to get a nice table of contents. Namely a meta
index page for indices and a meta index page for trees to allow
for table of contents layouts like this one:
<package>
<module>
(...)
<package-indices>
term-index
bug-index
todo-index
identifier-index
<package-trees>
module-tree
class-tree