![]() write ( 'usage: \n\t %s \n\n on Unix you can use pipe to c' 'onvert chm to ascii \n\t %s foo.chm | lynx -dump -stdin > foo.' 'txt \n or \n\t %s foo.chm | html2text -style pretty | foo.txt \n y' 'ou can also save the output as commepresed gzip file \n\t %s f' 'oo.chm | html2text -style pretty | gzip | foo.gz \n and read i' 't with zless: \n\t zless foo. close () # fix absolute path if nessesery for obj in nodes : if obj != '/' : obj = home_dir obj return nodes def usage (): """print usage on stderr.""" filename = basename ( argv ) # don't brake unix pipe, send usege to stderr stderr. _get_contents ( home_dir local ) parser. If your CHM file contains an eBook, you can open it in Calibre (multiplatform) or another eReader that supports the CHM format. ![]() When you do, the CHM file will appear within Microsoft HTML Help Executable. links : local, name = obj, obj if regx. In Windows, you can open a CHM file by double-clicking it. ![]() feed ( obj ) # sometimes the first page of archive contains link to its # Content Tree regx = re. home ) if not obj : raise ChmFileException, "Can't find Content Tree" parser. nodes else : # try to locate Table of Contents obj = self. RetrieveObject ( self, obj ) return html def _get_nodes ( self ): """return list of dictionaries with data extracted from TopicsTree.""" parser = LinksLocator () home_dir = self. ResolveObject ( self, path ) if obj != 0 : return None html = CHMFile. nodes : raise ChmFileException, "Can't find Content Tree" def _get_contents ( self, path ): """return html contents of file `path' in chm archive.""" obj = CHMFile. chm files binary data using any Hex Viewer, like Active Disk Editor we can see it starts with a signature ITSF (hex: 49, 54, 53, 46). LoadCHM ( self, filename ) != 1 : raise IOError, "Can't load File ' %s '" % filename self. _get_contents ( node ) def open ( self, filename ): if CHMFile. .CHM File Overview File Extension: CHM File Type Description: Compiled HTML Help File File Type Developer: Microsoft Corporation Primary Associated Software. open ( filename ) def _iter_ ( self ): """return generator over pages in Content Tree.""" for node in self. print page the output will be html content of compresed chm file """ def _init_ ( self, filename = None ): CHMFile. ![]() data = data class ChmFileException ( Exception ): pass class SimpleChmFile ( CHMFile ): """ SimpleChmFile is a wraper over CHMFile in witch you can iterate over pages eg.: > chm = SimpleChmFile('file.chm') > for page in chm. lnk ) def handle_data ( self, data ): if self. in_a = False # if link has an adress if self. links = def handle_starttag ( self, tag, attr ): if tag = 'object' : self. chm information on file-extensions.#!/usr/bin/env python from chm.chm import CHMFile from os.path import basename, exists, abspath from HTMLParser import HTMLParser from sys import argv, exit, stderr import re class LinksLocator ( HTMLParser ): """ LinksLocator is a class for retrieve name and path (Name and Local) from TopicsTree in chm (compresed html) archive file or simple html links """ def _init_ ( self ): HTMLParser. The file allows users to search and it can include tags making it an ideal format for a help manual. The type of documentation is typically help documentation that includes text, hyperlinks and even images. Type Name Description Perceived Type ContentType DLL/EXE File DLL/EXE Details Popularity 7z A CHM file has a full name of a Compiled HTML Help File and typically contains documentation in the form of a compressed HTML file. In the following table, you can find a list of file types information that is associated with. UniExtract Files., UniExtract Here, UniExtract to Subdir exe file.The 'Actions' list is taken from the context menu items added to Explorer by the specified program.The 'Popularity' column displays one of the following 4 values: Low, Medium, High, and Very High, which is determined according to the number of users that sent the specified record.ĮXE Name Product Name Description Company Actions Popularity 7zFM.exeĮxamine with FAR, Examine with FAR (Compare ), Convert to H2 with FAR The product name, description, and company name are taken from the version information of the. chm extension.This list is created by collecting extension information reported by users through the 'send report' option of FileTypesMan utility. In the following table, you can find a list of programs that can open files with. chm Extension - List of programs that can open.
0 Comments
Leave a Reply. |