5 :Author: Ollie Rutherfurd <oliver@rutherfurd.net>
13 rst2chm generates Microsoft (TM) HTML Help files from one or more
14 `reStructuredText`_ source files.
22 rst2chm.py OUTFILE INFILE [INFILE...]
31 rst2chm.py --title=rst2chm rst2chm.chm rst2chm.txt
37 rst2chm.py --title=Docutils
38 --default-topic=spec\rst\introduction.html
39 --stylesheet=tools\stylesheets\default.css
40 docutils.chm spec\rst\*.txt docs\*.txt *.txt
42 **Note that text is wrapped for display purposes only.**
48 When you run rst2chm, it does the following:
50 1. Reads through reST source files, and generates an HTML Help Contents
53 Each reST source file is treated as a `topic` and each section
54 within the file is treated as a section within that topic.
56 Topics are ordered in the order they were given on the command line,
57 however you may specify a default `topic` using the ``--default-topic``
58 command-line option. If no default topic is specified, the first
61 2. Converts reStructuredText files to HTML (*optional*).
63 rst2chm uses Docutil's HTML writer to generate HTML. If you wish
64 to use change the options, use a different writer, etc... you
65 may disable HTML generate using the ``--no-html`` command-line option.
67 3. Creates an HTML Help Project file (.hhp).
70 4. Uses HTML Help Compiler (hhc.exe), to create a CHM file.
72 rst2chm searches for "hhc.exe" using ``%PATH%`` environment variable
73 and lastly in ``C:\Program Files\HTML Help Workshop\hhc.exe``, which was
74 the default installation location on my machine. Alternatively, you may
75 use the ``--compiler`` command-line option to tell rst2chm where to find
78 5. Removes .hhc, .hhp, and HTML files (if rst2chm generated the HTML files).
80 To disable removal of these files, for debugging purposes, customization,
81 etc... use the ``--no-clean`` command-line option.
87 * Finish & test support for languages other than English.
88 * Allow a template to be used for project.hhp?
89 * Index (.hhk) support.
90 * Option to include extra HTML files?
96 `Python License <http://www.python.org/doc/Copyright.html>`_
102 * `Microsoft (TM) HTML Help Workshop`_
103 * `Docutils`_, version 0.3 or higher suggested
109 * Images sometimes aren't included (for example, tools\test.txt)
110 * Section links don't work for::
112 C:\sandbox\rst2chm>rst2chm.py --no-clean --stylesheet=rst2chm.css
113 sendkeys.chm ..\projects\SendKeys\trunk\doc\SendKeys.txt
115 * If input file is an absolute path, hhc compilation fails. This may be a
127 * Using Latin-1 (ISO-8859-1) for output encoding.
129 This fixes ``A^`` thingies appearing between section numbers
130 and titles in Docutils FAQ.
137 * Fixed StringIO hack in TOC generation.
150 Please send feedback to the author, Ollie Rutherfurd <oliver@rutherfurd.net> or
151 to the docutils-users lists <docutils-users@lists.sourceforge.net>.
154 .. _Microsoft (TM) HTML Help Workshop: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconHH1Start.asp
155 .. _reStructuredText: http://docutils.sourceforge.net/rst.html
156 .. _Docutils: http://docutils.sf.net/
158 .. :lineSeparator=\r\n:maxLineLen=80:mode=rest:noTabs=false:tabSize=4:wrap=none: