home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / html_txt.zip / READ.ME < prev   
Text File  |  1999-03-11  |  9KB  |  217 lines

  1. 9 March 1998. Daniel Hellerstein. danielh@econ.ag.gov
  2.               HTML_TXT.CMD : An HTML to text converter
  3.  
  4. HTML_TXT, ver 1.09, is a freeware program that will convert HTML documents to 
  5. text files.  It is written in REXX for OS/2, but also works under other
  6. flavors of REXX (in particular, Regina REXX).
  7.  
  8. Features include:
  9.     Supports UL, OL, DL, and MENU lists.
  10.     Supports nested TABLES, with several forms of tabular output
  11.     FORM elements supported, including SELECT, TEXTAREA, and CHECKBOX.
  12.     Hierarchical outline can be created from H1, H2, ..., H7 headings.
  13.     Highly configurable; emphasis style, list bullets, outline numbering
  14.       style, table writing options, and many other features are
  15.       readily modified by changing user configurable parameters.
  16.     Moderately efficient (table intensive 60k file in 10 seconds on a P166)
  17.     Run from command line, or from a simple keyboard (non-gui) interface.
  18.     Can be used as an "addon" for the SRE-http web server.
  19.  
  20. Installation:
  21.  
  22.   1) unzip HTML_TXT.ZIP to an empty temporary directory.
  23.  
  24.   2) Then....
  25.     OS/2 Users:
  26.        Just copy HTML_TXT.CMD to any directory (for example, to a
  27.        directory in your PATH).
  28.        Note that HTML_TXT runs a bit better with, but does NOT require, 
  29.        the REXXUTIL.DLL procedure library.
  30.  
  31.        Or... you can use HTM_TXT2.CMD; the "faster but less complete"
  32.        version. If so, in these instructions just substitute HTM_TXT2.CMD
  33.        for HTML_TXT.CMD
  34.   
  35.     DOS users (using REGINA REXX):
  36.        See instructions below (you'll use the HTML_TXT.CM2 file).
  37.  
  38.   3) HTML_TXT.HTM is the manual (HTML_TXT.TST is the "HTML_TXT'ed" version of
  39.      HTML_TXT.HTM).
  40.  
  41. Installation as an SRE-http addon:
  42.  
  43.    HTML_TXT can be used as an SRE-http addon; just copy HTML_TXT.CMD
  44.    to your GoServe/SRE-http "addon" directory (say, D:\GOSERVE\ADDON).
  45.  
  46.    You should also copy HTMLCVT.SHT to a WWW-accessible directory
  47.    HTMLCVT.SHT contains a FORM that provides a nice front-end to
  48.    HTML_TXT. Do note that when used as an SRE-http addon, your results
  49.    will depend on what the URL's server would return to a generic (Mozilla
  50.    2.0 compatible, with no frame capability) user-agent.
  51.  
  52.    ** Information on SRE-http can be obtained from:  **
  53.    **   http://rpbcam.econ.ag.gov/srehttp            **
  54.  
  55. Usage:
  56.  
  57.    Assuming you installed HTML_TXT.CMD in x:\HTML_TXT>, from an
  58.    os/2 command prompt you can enter:
  59.       x:\HTML_TXT>HTML_TXT file.htm file.txt
  60.    which will convert the HTML document "file.htm" into an equivalent
  61.    text (ascii), and save the results as "file.txt".
  62.  
  63.    Or, enter HTML_TXT at a command prompt, and answer the queries.
  64.  
  65.    Although the defaults work well in most cases, there are a number of
  66.    parameters you might want to modify.  You can change them by editing 
  67.    HTML_TXT.CMD with your favorite text editor, look for the "user 
  68.    configurable parameters" section. 
  69.  
  70.    Although there is some rudimentary help available from within HTML_TXT,
  71.    you should see HTML_TXT.HTM for usage details.  
  72.  
  73.  
  74. Possible future additions:
  75.    1) WIDTH and HEIGHT attribute of <IMG> 
  76.    2) A "WordPerfect tables" output mode
  77.  
  78.  
  79. The Quick Version
  80.  
  81.    If you are converting less complex HTML documents, or are less
  82.    concerned with the quality of the conversion, then HTM_TXT2 (the 
  83.    "quicker" version) of HTML_TXT might be useful.  For longer
  84.    pages, HTM_TXT2 can be up to 50% faster.  The penalty is that 
  85.    HTM_TXT2 does not support several features, such as  ROWSPAN and  
  86.    CAPTIONs in tables.  In addition, HTM_TXT2 can not be run 
  87.    as an SRE-http addon.
  88.   
  89.    HTM_TXT2 does support tables (with autosizing), and most of the
  90.    other HTML_TXT features -- thus, in many cases it will be quite
  91.    adequate.  On the other hand, if you are only converting documents on an
  92.    occassional basis, a 50% improvement on a few seconds is probably 
  93.    not that big a deal!
  94.  
  95. A note on other HTML to Text converts.
  96.    
  97.    I created HTML_TXT mostly because I couldn't find a decent HTML to text 
  98.    converter -- one that was both stable and full featured. Nevertheless,
  99.    others may better suit your needs. You can try:
  100.  
  101.   * hobbes.nmsu.edu contains a few other OS/2 converters, such as 
  102.     HTML2TXT ( :{ the name I wanted to use)
  103.  
  104.   * a rather complete list of converters (for all platforms) can be found at 
  105.           http://www.hypernews.org/HyperNews/get/www/html/converters.html
  106.  
  107.   * YAHOO lists some other converters; try: 
  108.      http://search.yahoo.com/bin/search?p=text+%2Bhtml+%2Bconvert
  109.  
  110.  
  111. Disclaimer:
  112.  
  113.    This is freeware that is to be used at your own risk -- the 
  114.    author and any potentially affiliated institutions disclaim all 
  115.    responsibilties for any consequence arising from the use, misuse, or abuse 
  116.    of this software (or pieces of this software).
  117.  
  118.    You may use this (or subsets of this) program as you see fit,    
  119.    including for commercial purposes; so long as  proper attribution
  120.    is made, and so long as such use does not in any way preclude 
  121.    others from making use of this code.
  122.  
  123.    
  124.           ---------------------------------------------------
  125.  
  126.          Running HTML_TXT with the REGINA REXX interpreter
  127.  
  128. HTML_TXT was designed to be run under OS/2 (either classic
  129. or object REXX).  However, it has  been tested under DOS, using 
  130. the "Regina DOS REXX interpreter" (which is freeware).
  131.  
  132. This section briefly describes how to install HTML_TXT to
  133. run under Regina REXX for DOS.  Note that REGINA comes in
  134. several other flavors (UNIX, Windows, etc.); and it is 
  135. quite likely that HTML_TXT will also work under these
  136. flavors of Regina REXX.
  137.  
  138. First, you can obtain Regina REXX from:
  139.   http://www.lightlink.com/hessling/
  140. You might have to go down a few links, but as of July  1998 you'll
  141. end up at an FTP site from which you can get RX08EVCP.ZIP
  142. (regina rexx, ver .08e, extended memory VCPI; you can also
  143. try the DPMI memory version, but I couldn't get it to work).
  144.  
  145. Note that you'll need EMX.EXE to run this VCPI version of Regina.
  146. You can get EMX (0.9c) from hobbes (http://hobbes.nmsu.edu) --
  147. note that the EMX.EXE that comes with the OS/2 version of EMX will also
  148. work under DOS.  Or; you can try http://rpbcam.econ.ag.gov/regvcp.zip.
  149.  
  150. Second, for the VCPI version of REGINA to work, you must have EMM386.SYS
  151. (or EMM386.EXE) installed in your CONFIG.SYS.  You probably do -- 
  152. check for a line that looks like:
  153.      DEVICE=C:\DOS\EMM386.EXE 
  154. in your C:\CONFIG.SYS file.
  155.  
  156. Assuming you have obtained Regina REXX, and EMM386 support is installed,  to
  157. install HTML_TXT you should:
  158.  
  159. 1) Create a "HTML_TXT" directory on your hard disk.
  160.    For example (lower case is what you type at a DOS prompt):
  161.       D:>md html_txt
  162.  
  163. 2) Assuming you've unzipped HTML_TXT.ZIP, copy HTML_TXT.CM2 to this directory.
  164.  
  165.    HTML_TXT.CM2 is a version of HTML_TXT.CMD; it's been modified to be more stable
  166.    under REGINA REXX (it's a bit less recursive). You might want to rename
  167.    this to be HTML_TXT.CMD (we give it the .CM2 extension to differentiate
  168.    it from the OS/2 version).
  169.    
  170. 3)  Copy REXX.EXE and EMX.EXE to this directory.
  171.  
  172. 4) You can also copy HTML_TXT.HTM (the manual) and HTML_TXT.TST to this directory.
  173.  
  174.  
  175. That's it. HTML_TXT can now be run; just type (at a DOS prompt) 
  176.      REXX HTML_TXT.CM2
  177.  
  178. For example:
  179.        D:\HTML_TXT>rexx HTML_TXT.CM2
  180.  
  181.  *  A series of prompts will guide you.  It's a primitive user
  182.     interface -- you'll have to remember the name of the html
  183.     file you want to convert. Also, several options are a bit flakey
  184.     when run under Regina REXX (options that work fine under OS/2!)
  185.     However, the default settings should produce acceptable output.
  186.  
  187.  *  HTML_TXT has been tested under plain vanilla dos -- it might, or might not, 
  188.     work under other systems.
  189.  
  190.  * As a test, you can convert HTML_TXT.HTM (the manual). It should be nearly
  191.    identical to HTML_TXT.TST.
  192.  
  193.  * Version 1.08 of HTML_TXT.CMD contains a few runtime options (for allowing
  194.    users to change parameter values) that are NOT in HTML_TXT.CM2 (the 
  195.    concern being that there may be compatability problems with).
  196.   
  197.  
  198. CAUTION:
  199.  
  200.    Most, but not all, of HTML_TXT's features are available under
  201.    Regina REXX. In particular, some screen io options are not supported.
  202.  
  203.    More importantly, on rare occasions Regina REXX will sometimes inexplicably
  204.    drop portions of nested tables (it might be stack problem?). To be
  205.    safe, you might want to set (in HTML_TXT.CM2) TABLENESTMAX=0 (nested 
  206.    tables will be displayed as lists).
  207.  
  208.    Note that HTML_TXT.CMD will run under Regina REXX -- however the "nested 
  209.    table problems" are much worse.  But perhaps by the time you 
  210.    try HTML_TXT, a newer version of Regina REXX will have solved these
  211.    problems?
  212.  
  213.  
  214.  
  215.  
  216.  
  217.