问题
I have created a chm
file using HTML Help workshop
and it works fine in Windows. However the chm viewer
used in Linux
is not so good and I prefer not to use it in Linux
. I am also restricted from using any other viewers in Linux. So I thought of decompiling the chm
and create HTML
files which can be used in Linux. However on decompiling, the hhc
file generated, though contains the HTML
tags, does not display properly in the browser.
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Main">
<param name="Local" value="Main.html">
</OBJECT>
The above code just displays only a bullet and nothing else. Is there a way by which the data in the param tags
can be used. Like it displays Main
as a link to Main.html
.
NOTE: I don't want to use browser in Windows, so avoiding chm file as such is not a solution. Also I will have to make changes in multiple places if I use chm in Windows and separate HTML file for Linux. So the option I am thinking of is to use the HTML
files generated by decompiling the chm in Linux.
回答1:
You know, .hhc files contain the Table of Contents (TOC) for an HTMLHelp file (CHM), i.e. the entries displayed in the left pane of the CHM viewer window. It's compiled into the CHM file.
An .hhc file is referred to as a sitemap file. Sitemap is a file format developed and proposed by Microsoft to the World Wide Web Consortium. Sitemap files control many navigation features for CHM files, such as the table of contents and index panes.
Please note HTMLHelp and all this is about 20 years old! The .hhc sitemap file was not standardised (standardized) by W3C e.g. as HTML5 and is a old proprietary Microsoft file format today.
I'd recommend using a so called web-based help under LINUX. If you really have permanent updates of your help topic content you'll need to survey your workflow.
Some thoughts (as I understand your needs):
- Low budget and the man's way by using HTMLHelp Workshop (use of tools recommended e.g. like FAR HTML
- Think about single-sourcing - one source of topics and different target formats (e.g. CHM, web-based (uncompressed help) on a server)
- Think about your CHM file as a compiled web, create the HTML topics in structured folders like a web page (best use case for the wizards of FAR HTML)
- Create a CHM file from source
- Create a uncompressed web based help from source by uploading the web to Intranet or Internet (HTML files, images, ...), completed by a handmade Table of Contents derived from the .hhc file
But, don't decompile. Have single-sourcing in mind - I'd recommend using a time saver tool like mentioned above. To see what I mean navigate to following links:
Example 1: Uncompressed help - a bit dated
Example 2: FAR Web help created using FAR HTML.
For further information go to Overview and scroll down to uncompressed help.
来源:https://stackoverflow.com/questions/46823171/hhc-file-of-chm-to-html