

You can make CHM help files from a set of HTML files. The compiled file will have the extension "CHM" and when run, it will look something like this little example, which compiles a simple web site: Print("Operation completed successfully.You have probably seen it as part of many software applications. Ln_command = "ln -s " + target + " " + name + "_index.html" Print("Error: \"" + target + "\" does not exist. Target = pwd + "/" + name + "/index.html" Exiting.")Ĭommand = "extract_chmLib " + file + " " + name Name = file # Just the fileName part, withOUT the extension fileName/index.html, with the symbolic link name being fileName_index.html")įile = sys.argv # Full input parameter (fileName.chm) "symbolic link in your current folder to. ".html files by creating a directory named \"fileName\" right where you are, then it will also create a\n"

This will automatically convert the fileName.chm file to\n" Print("Usage: `./chm2html.py fileName.chm`. If (sys.argv="-h" or sys.argv="h" or sys.argv="help" or sys.argv="-help"): # print("argument = " + sys.argv) # print 1st argument DEBUGGING fileName/index.html, with the symbolic link name being Then it will also create a symbolic link right there to. html files by creating a fileName directory where you are,

This will automatically convert the fileName.chm file to. make a symbolic link to this target in ~/bin: `ln -s ~/GS/dev/shell_scripts-Linux/chm2html/chm2html.py ~/bin/chm2html`

USAGE/Python command format: `./chm2html.py fileName.chm` format: `extract_chmLib book.chm outdir` (this is my first ever python shell script to be used as a bash replacement) html, using the command shown here, with a few extra features (folder names, shortcuts, etc): myFile/index.html.Ĭhm2html.py file: get the latest version of this file on GitHub here from my eRCaGuy_dotfiles repo: #!/usr/bin/python3 myFile, then it creates a symlink called. Log out of Ubuntu then log back in, or reload your paths with source ~/.bashrc.Make a symlink to chm2html.py in your ~/bin directory: ln -s ~/path/to/chm2html.py ~/bin/chm2html.Create a ~/bin directory if you don't already have one: mkdir ~/bin.Make it executable: chmod +x chm2html.py.Copy and paste the below script into a file chm2html.py.Let's make a command called chm2html Here's a nice script I wrote. chm file, but I can also use my Chrome browser to search the pages for text, easily print, etc. outdir/index.html to view the converted html files! Yaaay! Much better. In short: sudo apt-get install libchm-bin Dv3500ea has a great chm2pdf answer, but I prefer to read them as html files.
