• 用windows命令解压chm文件


    Windows里有这样一个工具:hh.exe。
    hh.exe最重要的功能就是用来关联CHM文件,当你运行一个chm文件的时候,系统就是用这个工具来打开的。

    其实它还有另外一个功能——解压CHM文件
    在CMD中运行以下命令:
    hh.exe -decompile <解压目录> <CHM文件路径>

    例如我想把JDKAPI16.CHM解压到当前目录的javadoc子目录中,可以这样:
    hh.exe -decompile phpdoc php7.chm

    解压后两个文件:

    index.hhk     关键字定义文件对应chm的索引查找项

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <HTML>
    <HEAD>
    </HEAD><BODY>
    <OBJECT TYPE="text/site properties">
    </OBJECT>
    <UL>
        <LI> <OBJECT type="text/sitemap">
          <param name="Keyword" value="t1">
          <param name="Name" value="Topic 1">
          <param name="Local" value="page_1.html">
          </OBJECT></LI>
        <LI> <OBJECT type="text/sitemap">
          <param name="Keyword" value="t2">
          <param name="Name" value="Topic 2">
          <param name="Local" value="page_2.html">
          </OBJECT></LI>
        <LI> <OBJECT type="text/sitemap">
          <param name="Keyword" value="t3">
          <param name="Name" value="Topic 3">
          <param name="Local" value="page_3.html">
          </OBJECT></LI>
    </UL></BODY></HTML>

    content.hhc    目录项   列出chm目录显示的标题以及真实文件地址

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
    <HTML>
    <HEAD>
    <meta name="GENERATOR" content="CHM Editor">
    </HEAD><BODY>
    <OBJECT type="text/site properties">
    <param name="Window Styles" value="0x800027">
    <param name="ImageType" value="Folder">
    </OBJECT>
    <UL>
      <LI> <OBJECT type="text/sitemap">
        <param name="Name" value="Chapter I">
        <param name="ImageNumber" value="1">
        </OBJECT>
      <UL>
        <LI> <OBJECT type="text/sitemap">
          <param name="Name" value="Topic 1">
          <param name="Local" value="page_1.html">
          <param name="ImageNumber" value="11">
          </OBJECT>
        <LI> <OBJECT type="text/sitemap">
          <param name="Name" value="Topic 2">
          <param name="Local" value="page_2.html">
          <param name="ImageNumber" value="11">
          </OBJECT>
        <LI> <OBJECT type="text/sitemap">
          <param name="Name" value="Topic 3">
          <param name="Local" value="page_3.html">
          <param name="ImageNumber" value="11">
          </OBJECT>
        <UL>
          <LI> <OBJECT type="text/sitemap">
            <param name="Name" value="新主题">
            <param name="Local" value="page_4.html">
            <param name="ImageNumber" value="11">
            </OBJECT>
        </UL>
      </UL>
    </UL>
    </BODY></HTML>
  • 相关阅读:
    [LeetCode] 1072. Flip Columns For Maximum Number of Equal Rows
    [LeetCode] 1730. Shortest Path to Get Food
    [LeetCode] 1005. Maximize Sum Of Array After K Negations
    [LeetCode] 1286. Iterator for Combination
    [LeetCode] 390. Elimination Game
    [LeetCode] 1940. Longest Common Subsequence Between Sorted Arrays
    [LeetCode] 794. Valid TicTacToe State
    [LeetCode] 1162. As Far from Land as Possible
    [LeetCode] 2022. Convert 1D Array Into 2D Array
    [LeetCode] LeetCode 2021勋章
  • 原文地址:https://www.cnblogs.com/lichihua/p/11762484.html
Copyright © 2020-2023  润新知