home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 35 / hot35.iso / ficheros / DINET / HTMST803.ZIP / HTMSTRIP.DOC < prev    next >
Text File  |  1998-03-30  |  60KB  |  1,264 lines

  1. HTMSTRIP.DOC                         1                         Mar 27, 1998
  2.  
  3. WIN95 AND WINNT NOTICE:  As with most  DOS-based  utilities,  this  program
  4. doesn't  understand  the  weird  subdirectories,  long  filenames,  invalid
  5. characters that  are  possible  under  Windows  95  and  Windows/NT.   Both
  6. operating systems alias long filenames into names like MYFILE~1.TXT and you
  7. will need to specify the aliased versions of file names  to  process  them.
  8. Under some file structure systems in NT, the program may not work at all.
  9.  
  10. The HTMSTRIP.EXE program attempts to  read  HTML  pages,  remove  the  HTML
  11. coding, and write the file out as something more useful.  Features of  this
  12. program:
  13.  
  14.   * Ideal way to prep HTML documents for later  retransmission  via  e-mail
  15.     (which doesn't support the fonts, pictures, etc).  Beats out Netscape's
  16.     Save As Text option hands down.
  17.   * Can be run across an entire  subdirectory  (for  example,  your  entire
  18.     cache subdirectory), and will only process the HTML documents  that  it
  19.     finds. (There are some options on this.)
  20.   * Removes all embedded HTML commands.
  21.   * Recodes the standard HTML  "entity  references"  (so  "©"  becomes
  22.     "(c)"). The actual replacements are coded in a  user-modifiable  lookup
  23.     file.
  24.   * Handles standard indent, heading, selection groups, menus, tables, etc.
  25.   * Supports most  of  what's  in  the  HTML  3.2  specification  and  some
  26.     additional 4.0 features.
  27.   * Reflows all text as appropriate.
  28.   * Can provide character-translation table to filter out  characters  that
  29.     only work under Windows.
  30.   * Can indicate bolding, underlining, etc with user-specified characters.
  31.   * Optionally,  will  replace  Link,  Image,  and  Input  references  with
  32.     user-definable text representations.
  33.   * Optionally, alerts you to possible errors in the HTML code itself.
  34.   * Supports ISO 8859/1 8-bit single-byte (Windows), 7-bit DOS  ASCII,  and
  35.     8-bit DOS ASCII character sets.
  36.   * Optionally creates a logfile of file activity.
  37.   * Pressing escape stops the program early.
  38.  
  39. HTML  codes  are  surrounded   within   <...>   indicators.    For   upward
  40. compatibility reasons, Web  browsers  ignore  any  codes  that  they  don't
  41. understand and just process the ones they can handle.
  42.  
  43. HTMSTRIP removes all HTML codes.  It also handles the standard HTML "&xxx;"
  44. "entity references" (for example, "©" is replaced by "(c)").  You  can
  45. add or  change  these  replacements  as  desired  by  using  the  INI  file
  46. (documented later).
  47.  
  48.  
  49. Quickie instructions:
  50.  
  51. Okay!  You hate to read.  I know that.  And there aren't any cute  pictures
  52. in this documentation and, like everything I write, it's way  too  long  to
  53. keep your attention for  long.   So,  let's  bottom  line  it;  what's  the
  54. quickest way to use this program without learning any of the options?
  55.  
  56.  
  57. HTMSTRIP.DOC                         2                         Mar 27, 1998
  58.  
  59. Let's presume you're running under  Windows.   Take  the  HTMSTRIP.EXE  and
  60. HTMSTRIP.INI files from the HTMSTymm.ZIP file and copy  them  to  the  same
  61. subdirectory somewhere.  (They should be in the same  subdirectory  already
  62. since that's how uncompressing them would  have  gone.)  This  subdirectory
  63. should be in your path.  If you're not sure what your path is, hop  to  DOS
  64. and type "SET".  There should be a line  shown  that  says  something  like
  65. "PATH=C:\;C:\DOS;C:\WINDOWS".  I wouldn't advise copying  HTMSTRIP.EXE  and
  66. HTMSTRIP.INI to your WINDOWS subdirectory.  Maybe your root?
  67.  
  68. Get on the Web and save the source of an HTML document to your  hard  disk.
  69. This is done from the Netscape Navigator by bringing up a page  and  saying
  70. "Save As...".  Remember the file name and what subdirectory you  saved  the
  71. document to.   Just  for  example's  sake,  let's  say  the  file  name  is
  72. "UPEPIS.HTM".
  73.  
  74. Hop to DOS.  (You can run HTMSTRIP from the Run option in Windows but  it's
  75. easier to explain this  way.)  Make  the  directory  where  you  saved  the
  76. document your default subdirectory.  (This is usually done with a series of
  77. "CD" commands in DOS.)
  78.  
  79. Now, type:
  80.  
  81.         HTMSTRIP
  82.  
  83. You didn't pass in any parameters so HTMSTRIP will request the name of  the
  84. file to process.  Enter the name of the HTML file.  In our case, this would
  85. appear like:
  86.  
  87.         Enter filespec to process? UPEPIS.HTM
  88.  
  89. Presuming you did everything correctly, the HTMSTRIP program will read  the
  90. HTML file and tell you it created a new file with  the  file  extension  of
  91. ".OUT" (in our case, "UPEPIS.OUT").
  92.  
  93. That was pretty easy.  Now, hop back into Windows and bring the new file up
  94. in your text editor (use Write or something else that uses  TrueType  fonts
  95. instead of NotePad).  With luck, you'll see the file looking similar to how
  96. it did when you were viewing it under your Web browser.  The difference  is
  97. that it's now a properly-formatted text document which fits on  the  screen
  98. and can be e-mailed to someone.
  99.  
  100. Hop back into DOS.  Type "HTMSTRIP /?".  You'll see there are  a  bunch  of
  101. other parameters that you can pass in.  If  you're  not  pleased  with  the
  102. output file that was created, you might want to read  the  quick  on-screen
  103. description of each option and then consult the HTMSTRIP.DOC file for  more
  104. instructions about anything that sounds interesting.   (Since  the  program
  105. doesn't alter the source HTML file, you can keep rerunning the program with
  106. different parameters to see how they affect things.) Chances are, you won't
  107. want to revise any of the system defaults at least initially.  If you  find
  108. yourself consistently needing to change some options,  you  might  want  to
  109. edit the HTMSTRIP.INI  file  to  specify  those  new  defaults.   Read  the
  110. BRUCEINI.DOC file for information on overriding defaults.
  111.  
  112. Note that the instructions tell you you can use  wildcards  for  the  input
  113. file name.  You can do something like "HTMSTRIP *.HTM" and it will  process
  114. every file with an ".HTM" extension in your default subdirectory.
  115.  
  116.  
  117. HTMSTRIP.DOC                         3                         Mar 27, 1998
  118.  
  119. HTML codes:
  120.  
  121. HTMSTRIP is also tuned to allow it  to  specially-handle  several  embedded
  122. HTML codes found through HTML version 3.2.  You can go to http://www.w3.org
  123. to get more information about the HTML  standards.   These  codes  are  the
  124. following:
  125.  
  126.                            HTML codes supported
  127.  
  128.                  Supported
  129. Element          Attributes   Description
  130.  
  131. <!-- ... -->                  Comments (skip)
  132. <A ...>...</A>                External link
  133.                  HREF=site      Start of hypertext link
  134.                  ID=anchor      Establishes target for hypertext links
  135.                  NAME=anchor    Establishes target for hypertext links
  136. <AREA>                        Client-side image hotspot
  137.                  HREF=site      Hypertext link
  138.                  ALT=text       What to display if text-only environment
  139. <B>..</B>                     Bold text
  140. <BASE ...>                    Establishing a root directory
  141.                  HREF=site      Prefix to add to unqualified sites
  142. <BLOCKQUOTE>...</BLOCKQUOTE>  Indented block of text (same as <BQ>...</BQ>)
  143. <BR>                          Forced line break
  144. <CAPTION>...</CAPTION>        Title for a table block
  145. <CENTER>...</CENTER>          Centering text block
  146. <DD>                          Term definition
  147. <DIR>...</DIR>                Directory list of items (obsolete)
  148. <DL>...</DL>                  Definition list block
  149. <DT>                          First term of definition list/glossary
  150. <EM>...</EM>                  Emphasize text
  151. <H1> to <H6>...</H1> to </H6> Heading items
  152. <HR>                          Horizontal rule
  153. <I>..</I>                     Italicize text
  154. <IMG ...>                     Image
  155.                  SRC=site       Location of the image
  156.                  ALT=text       What to display if text-only environment
  157. <INPUT ...>                   User input
  158.                  TYPE=CHECKBOX  Type of input -- shown as [_]
  159.                  TYPE=HIDDEN    Type of input -- suppress
  160.                  TYPE=RADIO     Type of input -- shown as (_)
  161.                  CHECKED        Makes [X] or (X)
  162.                  SIZE=n         Specifies length for input fields
  163.                  VALUE=text     Specifies default value for input fields
  164. <LI>                          Menu/Ordered/Unordered/Directory list item
  165. <MAP>...</MAP>                Client-side image map
  166. <MENU>...</MENU>              Menu listing block (obsolete)
  167. <OL>...</OL>                  Ordered listing block (numbering's skipped)
  168. <OPTION>                      Used for single/multiple choice menus
  169. <P>                           Paragraph indicator
  170. <PRE>...</PRE>                Preserve spacing block (preformatted text)
  171.  
  172. Table Continues...
  173.  
  174. HTMSTRIP.DOC                         4                         Mar 27, 1998
  175.  
  176.                      HTML codes supported (continued)
  177.  
  178.                  Supported
  179. Element          Attributes   Description
  180.  
  181. <SCRIPT>...</SCRIPT>          Java script blocks are ignored
  182. <SELECT>...</SELECT>          Block for single/multiple choice menu
  183.                  MULTIPLE       Allow for multiple selections
  184. <STRONG>..</STRONG>           "Strong" text (HTMSTRIP treats this tag
  185.                               the same as <B>..</B>)
  186. <TABLE>...</TABLE>            Table block
  187. <TD>...</TD>                  Table data (cell)
  188.                  ALIGN=spec     How to align the cell (default is LEFT)
  189.                  COLSPAN=n      How many columns to span with this cell
  190.                  ROWSPAN=n      How many rows to span with this cell
  191. <TH>...</TH>                  Table heading
  192.                  ALIGN=spec     How to align the cell (default is CENTER)
  193.                  COLSPAN=n      How many columns to span with this cell
  194.                  ROWSPAN=n      How many rows to span with this cell
  195. <TITLE>...</TITLE>            Title item
  196. <TR>...</TR>                  Table row
  197. <U>..</U>                     Underlining text
  198. <UL>...</UL>                  Unordered listing
  199.  
  200. If you run across other codes that become vital, let me know and  I'll  see
  201. about handling them somehow.
  202.  
  203.  
  204. How to get HTML files:
  205.  
  206. Some people who are using regular Web  browsers  like  Mosaic  or  Netscape
  207. don't realize that they're automatically saving HTML files  to  their  hard
  208. disk throughout every Web session.  That's because  just  about  every  Web
  209. browser saves the most-recently accessed files from the Web (including HTML
  210. source code, GIF's, and JPG's) on your hard disk and reads them from  there
  211. instead of requiring you to download them every  time  you  go  back  to  a
  212. previous page.  This is typically settable by you under  "Preferences"  and
  213. "Cache" on your Web browser.
  214.  
  215.  
  216. HTMSTRIP.DOC                         5                         Mar 27, 1998
  217.  
  218. I usually set my Web browser to have a huge cache,  maybe  10MB.   Anything
  219. beats downloading the same pages over again even at 28.8K.  And I make sure
  220. that I do not have anything specified like "clear cache at the end of every
  221. session".  Then I just go through  the  files  in  the  cache  subdirectory
  222. afterward and reprocess them.
  223.  
  224. Two disadvantages to a cache...  It takes up hard disk space but, hey,  the
  225. Web browser is typically in Windows so why are you surprised.   The  second
  226. disadvantage is that if the page actually  changes  between  sessions,  you
  227. typically won't notice the new page as long as it remains in your cache. If
  228. you think a page is still in cache and should have been changed but didn't,
  229. you can typically ask your  Web  browser  to  reload  the  page.   On  some
  230. browsers, this is shown as an arrow in the form of a circle.
  231.  
  232. HTMSTRIP can process  the  entire  cache  subdirectory.   It  automatically
  233. detects non-HTML files for you and processes accordingly.  It  creates  new
  234. text file versions of just the HTML pages it finds.
  235.  
  236. Another great way to get HTML pages is to use the URL-minder service at:
  237.  
  238.         http://www.netmind.com
  239.  
  240. This is a free service which automatically tells you whenever a Web  page's
  241. contents changes.  If you use the advanced features, you can have  the  Web
  242. page's HTML code sent to you as a file attachment (it's easier than dealing
  243. with the "embed" option too).  Then you can run HTMSTRIP on  the  resulting
  244. file.
  245.  
  246.  
  247. Specifying parameters:
  248.  
  249. Parameters for this program can be set in the  following  ways.   The  last
  250. setting encountered always wins:
  251.   - Read from an *.INI file (see BRUCEINI.DOC file),
  252.   - Through the use of an environmental variable  (SET  HTMSTRIP=whatever),
  253.     or
  254.   - From the command line (see "Syntax" below)
  255.  
  256. HTMSTRIP also allows you to define:
  257.   - How "entity references" (things like "®") are shown
  258.   - How "symbolic references" (things like "[input]" and "<B>") are shown
  259.   - Which characters should be filtered into other characters (things  like
  260.     showing "Æ" as "'" -- none of these should actually appear on Web pages
  261.     by the way)
  262.  
  263. These are explained in sections at the end of this documentation.
  264.  
  265.  
  266. HTMSTRIP.DOC                         6                         Mar 27, 1998
  267.  
  268. Syntax:
  269.  
  270.     HTMSTRIP [ filespec | (filelist) | @listfile ] [ /Cpath ] [ outfile ]
  271.       [ /EXT=.xxx ] [ /COPY=path ] [ /CREATE ] [ /ALL ] [ /ATTR=attribs ]
  272.       [ /WIDTH=n ] [ /FORCE ] [ /RULE=s ] [ /BORDER=c ] [ /BUFF=n ]
  273.       [ /SPACES ] [ /RSPACE ] [ /WARNINGS ] [ /-TABLE ] [ /-INDENT ]
  274.       [ /CPn ] [ /A=spec ] [ /IMG=spec | /IMGALT=spec ]
  275.       [ /MAP=spec | /MAPALT=spec ] [ /ALTONLY ] [ /HTTP=cc ] [ /-INPUT ]
  276.       [ /Linitfile ] [ /FILTER | /FILTER=filename ]
  277.       [ /LOG=logfile ] [ /T=temp_dir ] [ /MONO ]
  278.       [ /Iinitfile | /-I ] [ /-ENV ] [ /? ] [ /?&H ]
  279.  
  280. where:
  281.  
  282. "filespec" tells the routine which file or files are to be processed.   The
  283. specification can include path and wildcards if  desired.   Typically,  the
  284. file names are  *.HTM  files.   If  no  input  specification  (filespec  or
  285. @listfile) is provided, you'll be prompted for one.   If  no  extension  is
  286. provided, ".HTM" is presumed.  (If you want to process a  file  which  does
  287. not have an extension, include the trailing period on the file  name,  such
  288. as "HTMSTRIP HTTP_WWW." (with the period in there).
  289.  
  290. "(filelist)" allows you to specify multiple files to be processed from  the
  291. command line.  File names should be separated by spaces.  They may  include
  292. drive, path, and wildcard information.  Remember that a command line in DOS
  293. cannot exceed 127 characters so you're limited as  to  how  many  different
  294. file specifications you can provide in this fashion.
  295.  
  296. "@listfile" allows you to have a variety of file specifications saved in  a
  297. text file named "listfile".  Each line in the file should  consist  of  one
  298. file specification, each of which can  include  a  path  and  wildcards  if
  299. desired.  Blank lines and lines  beginning  with  semi-colons,  colons,  or
  300. quotes are ignored.  If no input specification (filespec or  @listfile)  is
  301. provided, you'll be prompted for one.
  302.  
  303. "/Cpath" specifies that the cache is found in  a  particular  subdirectory.
  304. This allows you to specify a default  location  in  your  *.INI  file  (see
  305. BRUCEINI.DOC) and just specify something like "A*.HTM"  for  the  files  to
  306. process.  Note, however, that if you don't use *.INI files, it's easier  to
  307. just pass in the input file path with the "filespec"  parameter  ("HTMSTRIP
  308. *.HTM /C\CACHE" and "HTMSTRIP \CACHE\*.HTM" are  the  same).   Defaults  to
  309. your current default path.  If the input filespec includes  drive  or  path
  310. information, this will override the /Cpath specification.
  311.  
  312. "outfile" is the name of the output file to create.  Is overwritten without
  313. prompting if it exists already.  If no output file name  is  provided,  the
  314. routine will use the infile  and  provide  an  extension  of  *.OUT.   (The
  315. default .OUT extension can be overridden using the /EXT=.xxx parameter.) An
  316. outfile cannot be specified if wildcards or  @listfile  are  used  for  the
  317. input file specification.
  318.  
  319. "/EXT=.xxx" allows you to specify a different default  file  extension  for
  320. the output file.  This parameter only matters  if  you  do  not  explicitly
  321. specify an output file name.  Initially defaults to "/EXT=.OUT".
  322.  
  323.  
  324. HTMSTRIP.DOC                         7                         Mar 27, 1998
  325.  
  326. "/COPY=path" specifies that the output files (for example,  BRUCE.OUT  when
  327. the input was BRUCE.HTM) are to be created in the  specified  subdirectory.
  328. By default, the program creates the output files in the same  path  as  the
  329. input files.  If the subdirectory does not exist, you will be prompted  for
  330. whether to create it or not based on the value of the /CREATE parameter.
  331.  
  332. "/CREATE" automatically creates the output subdirectory  if  /COPY=path  is
  333. specified.  The default is "/-CREATE"; if the subdirectory  is  not  there,
  334. the program prompts whether it should be created or not.
  335.  
  336. "/ALL" says that if the program encounters what it thinks is  just  a  text
  337. file, it should take the file and try to fix up CR/LF problems (Unix  files
  338. end with LF's instead of CR/LF which is what DOS needs) and that's it. This
  339. can be somewhat risky since it may misdiagnose a file but it should be safe
  340. if you're running it on your cache  subdirectory.   Initially  defaults  to
  341. "/-ALL" which means it won't process it unless it thinks it's an HTML file.
  342.  
  343. "/-ALL" says to skip files if the program thinks it's  not  an  HTML  file.
  344. This is initially the default.
  345.  
  346. "/ATTR=attribs" allows you to specify a combination of attributes that  you
  347. want considered.  You can specify  any  combination  of  R  (read-only),  H
  348. (hidden), S (system), or A (archive bit).  Precede  any  character(s)  with
  349. "-" to exclude instead of include.  Unlike with the DOS  DIR  command,  the
  350. inclusions and exclusions are subject to  "OR"  conditions;  /ATTR=HS  will
  351. retrieve any file that is either hidden or a system file or both.  You  can
  352. specify "/ATTR=ALL"  to  specify  that  all  files  are  to  be  processed.
  353. Initially defaults to /ATTR=-H-S (skip hidden or system files).
  354.  
  355. "/WIDTH=n" specifies the desired line length for wrapping  long  lines  and
  356. also for centering.  Initially defaults to "/WIDTH=80".
  357.  
  358. "/FORCE" says that the specified  width  must  be  adhered  to.   The  only
  359. exception to this is that tables may force a width expansion if  the  cells
  360. simply  can't  fit  on  the  page  otherwise.   Using  /FORCE  means   that
  361. <PRE>...</PRE> blocks may be wrapped (typically a no-no) and some words  in
  362. tables may get split up if the entire word can't fit in the  computed  cell
  363. width.  The latter is especially a  problem  if  there  are  lots  of  cell
  364. columns in a table; there isn't much room for  the  actual  data  when  the
  365. cells themselves take up so much space.  Initially defaults to "/-FORCE".
  366.  
  367. "/-FORCE" says that the desired widths can be ignored  if  table  cells  or
  368. <PRE>...</PRE>  blocks  would  look  more  natural  without  it.   This  is
  369. initially the default.
  370.  
  371.  
  372. HTMSTRIP.DOC                         8                         Mar 27, 1998
  373.  
  374. "/RULE=s" specifies that a string is to be repeated the width of the  line.
  375. This is used to separate sections.  The string can be:
  376.   * a single character (for example: /RULE=- ),
  377.   * multiple characters (for example: /RULE="- " ),
  378.   * it can contain decimal and hexadecimal characters
  379.     (like "/RULE=\066\097\116"--see BRUCEHEX.DOC),
  380.   * "/RULE=NULL" or "/-RULE" (both generate blank lines like "/RULE=\32")
  381.   * "/RULE" which picks a setting for you based on /BORDER=c:
  382.       * If /BORDER=S, is the same as "/RULE=\196" or "RULE=─"
  383.       * If /BORDER=D, is the same as "/RULE=\205" or "RULE=═"
  384.       * If other,     is the same as "/RULE=\045" or "RULE=-"
  385.   * Left out in which case the default "/RULE=-" is used
  386. Personally, if your  printer  supports  IBM  graphics  characters,  I  find
  387. "/RULE=\196" to be the most pleasing of the rule lines.
  388.  
  389. "/BORDER=c" specifies the type of border to use.  The possible choices  for
  390. "c" are:
  391.   D  -- double line around row and stub, single lines elsewhere
  392.   S  -- single line
  393.   T  -- text character line    -- this is the default
  394.   B  -- blanks (spaces)
  395.   N  -- none
  396.   DV -- double line is used around row and stub, lines are skipped in
  397.         horizontal rows within the table itself
  398.   SV -- same as DV except single line
  399.   TV -- same as DV except text lines
  400. Examples of the various border types:
  401.  
  402.      <D>ouble       <S>ingle        <T>ext         <B>lank        <N>one
  403.    ╔═══╦═══╤═══╗  ┌───┬───┬───┐  +---+---+---+
  404.    ║ 1 ║ 2 │ 3 ║  │ 1 │ 2 │ 3 │  | 1 | 2 | 3 |    1   2   3      1   2   3
  405.    ╠═══╬═══╪═══╣  ├───┼───┼───┤  +---+---+---+                   4   5   6
  406.    ║ 4 ║ 5 │ 6 ║  │ 4 │ 5 │ 6 │  | 4 | 5 | 6 |    4   5   6      7   8   9
  407.    ╟───╫───┼───╢  ├───┼───┼───┤  +---+---+---+
  408.    ║ 7 ║ 8 │ 9 ║  │ 7 │ 8 │ 9 │  | 7 | 8 | 9 |    7   8   9
  409.    ╚═══╩═══╧═══╝  └───┴───┴───┘  +---+---+---+
  410.  
  411.                       <DV>           <SV>           <TV>
  412.                   ╔═══╦═══╤═══╗  ┌───┬───┬───┐  +---+---+---+
  413.                   ║ 1 ║ 2 │ 3 ║  │ 1 │ 2 │ 3 │  | 1 | 2 | 3 |
  414.                   ╠═══╬═══╪═══╣  ├───┼───┼───┤  +---+---+---+
  415.                   ║ 4 ║ 5 │ 6 ║  │ 4 │ 5 │ 6 │  | 4 | 5 | 6 |
  416.                   ║ 7 ║ 8 │ 9 ║  │ 7 │ 8 │ 9 │  | 7 | 8 | 9 |
  417.                   ╚═══╩═══╧═══╝  └───┴───┴───┘  +---+---+---+
  418.  
  419. Note that the /BORDER=D,  /BORDER=DV,  and  /BORDER=SV  presume,  as  shown
  420. above, that the table has a one-column stub and a  one-row  column  header.
  421. This is normal for many tables but  not  all.   When  in  doubt,  stick  to
  422. something like /BORDER=S or /BORDER=T.
  423.  
  424. "/BUFF=n" specifies how many spaces to  position  on  either  side  of  the
  425. vertical bars in the tables.  Defaults to /BUFF=1.
  426.  
  427.  
  428. HTMSTRIP.DOC                         9                         Mar 27, 1998
  429.  
  430. "/SPACES" retains extra  vertical  spacing  between  sections.   There  are
  431. frequently lots of extra blank lines that appear in the output file  either
  432. due to specific HTML requests or to insure proper reformatting.  Specifying
  433. /SPACES allows these to stay there.
  434.  
  435. "/-SPACES" removes these extra blank lines.   This  also  tries  to  remove
  436. empty columns in tables as well as some blank  rows  in  tables.   This  is
  437. initially the default.
  438.  
  439. "/RSPACE" requires that a blank line appear  before  and  after  horizontal
  440. rule (<HR>) indicators.  Using this option with /SPACES may cause  multiple
  441. blank lines around horizontal rules.  Initially defaults to "/-RSPACE".
  442.  
  443. "/-RSPACE" doesn't force a blank line around  horizontal  rule  indicators.
  444. This is initially the default.
  445.  
  446. "/WARNINGS" displays on-screen warnings when HTMSTRIP finds either internal
  447. problems in the document or things it can't handle.  Realistically, they're
  448. not all that important because the program is working  around  them  anyway
  449. but you might want to use them to help make suggestions to  the  webmaster.
  450. If you create a logfile (using the "/LOG=filename" parameter), the warnings
  451. are automatically written out to that file independently of the "/WARNINGS"
  452. setting.  Initially defaults to "/-WARNINGS".
  453.  
  454. "/-WARNINGS" turns  off  the  warning  messages.   This  is  initially  the
  455. default.
  456.  
  457. "/TABLE" says to process text within table declaration sections  as  tables
  458. whenever the program can.  There are some maximum cell length limits in the
  459. program and some tabular text will be dumped as straight ASCII text anyway.
  460. This is initially the default.
  461.  
  462. "/-TABLE" says to  process  text  within  table  declarations  sections  as
  463. straight text, removing it from the tabular structure entirely.  There  are
  464. other cases where page authors  have  switched  to  tables  for  formatting
  465. purposes and, when you convert the resulting page, you're left with  mostly
  466. spaces.  Initially defaults to "/TABLE".
  467.  
  468. "/-INDENT" removes block indent sections from the output file.  By default,
  469. five    spaces    are    inserted    before    each    line    within     a
  470. <BLOCKQUOTE>...</BLOCKQUOTE> block.  These can be nested so you can end  up
  471. with a lot of white space in your document.   "/-INDENT"  turns  them  off.
  472. Initially defaults to "/INDENT".
  473.  
  474. "/INDENT" retains  the  <BLOCKQUOTE>...</BLOCKQUOTE>  indenting.   This  is
  475. initially the default.
  476.  
  477.  
  478. HTMSTRIP.DOC                         10                        Mar 27, 1998
  479.  
  480. "/CPn" specifies what character  pageset  to  use  when  processing  entity
  481. references.  For example, should the ° entity be displayed as the  word
  482. "degree", the 8-bit DOS character "°" or the Windows character "░".   (This
  483. setting does not impact things like tables and rulers, which you're setting
  484. yourself.) "n" can be 1, 2, or 3:
  485.  
  486.   /CP1 specifies that the program should use the 7-bit DOS  character  set.
  487.        This is the most universally recognized character set out there  and
  488.        should work for printing, e-mail, etc.  It does not  handle  foreign
  489.        characters or miscellaneous symbols like "£" so these are translated
  490.        into   rough    ASCII    equivalents.     Since    this    is    the
  491.        lowest-common-denominator font, it's initially the default for  this
  492.        routine.  Add /CP2 or /CP3 to your HTMSTRIP.INI file if you want  to
  493.        change on a regular basis.
  494.   /CP2 specifies that the program should use the 8-bit DOS  character  set.
  495.        This works within DOS applications but doesn't read correctly  under
  496.        Windows programs.
  497.   /CP3 specifies  that  the  program  should  use  the  ISO  8859/1   8-bit
  498.        single-byte graphic character set.  This set  works  within  Windows
  499.        applications but may not e-mail correctly.
  500.  
  501. "/A=spec" tells the program how to handle <A...> hypertext links.  See  the
  502. "How hypertext links (<A>)  are  displayed"  discussion  above.   Initially
  503. defaults to "/A=NONE".
  504.  
  505. "/A" is the same thing as "/A=FSITE".
  506.  
  507. "/-A" is the same thing as "/A=NONE".
  508.  
  509. "/IMG=spec" tells the program how to handle <IMG...> links.  These are used
  510. for embedded graphics.  "/IMG=spec" says to use the "src=" specification in
  511. place of any "alt=" specification.  See the "How image elements (<IMG>) are
  512. displayed" discussion below.  Initially defaults to "/IMG=NONE".
  513.  
  514. "/IMG" is the same thing as "/IMG=FSITE".
  515.  
  516. "/-IMG" is the same thing as "/IMG=NONE".
  517.  
  518. "/IMGALT=spec" is mutually exclusive with the "/IMG=spec" specification and
  519. again tells the program how to handle <IMG...> links.  "/IMGALT=spec"  says
  520. to use a "alt=" specification if one is provided before  falling  back  and
  521. using the "src=" specification.  If "/ALTONLY"  is  specified,  the  "src="
  522. specification will not be used at all.  See the "How image elements (<IMG>)
  523. are displayed" discussion below.  Initially defaults to "/IMGALT=NONE".
  524.  
  525. "/IMGALT" is the same thing as "/IMGALT=FSITE".
  526.  
  527. "/-IMGALT" is the same thing as "/IMGALT=NONE".
  528.  
  529.  
  530. HTMSTRIP.DOC                         11                        Mar 27, 1998
  531.  
  532. "/MAP=spec"  and  "/MAPALT=spec"  work  the   same   as   "/IMG=spec"   and
  533. "/IMGALT=spec" (except /MAP=SYMBOL and /MAPALT=SYMBOL  are  not  supported)
  534. but they apply to <AREA> specifications within a <MAP>...</MAP> block.  See
  535. the "How client-side imagemaps (<MAP> and <AREA>) are displayed" discussion
  536. below.  Initially defaults to "/MAP=NONE" (which is the same as "/-MAP").
  537.  
  538. "/MAP" is the same as "/MAP=FSITE".
  539.  
  540. "/ALTONLY" specifies that if an ALT=alias reference exists in  an  <IMG...>
  541. or <AREA...> link, then the alias should be embedded  in  the  output  text
  542. (appearing within brackets)  but,  otherwise,  all  <IMG...>  or  <AREA...>
  543. references are to be ignored  in  the  input  file.   See  the  "How  image
  544. elements (<IMG>) are displayed" and "How client-side Imagemaps  (<MAP>  and
  545. <AREA>)  are  displayed"  discussions   below.    Initially   defaults   to
  546. "/-ALTONLY".
  547.  
  548. "/-ALTONLY" allows <IMG...> and <AREA...> references to be added to  output
  549. file even if an ALT=alias reference is not specified.   This  is  initially
  550. the default.  See the "How image elements (<IMG>) are displayed"  and  "How
  551. client-side imagemaps (<MAP> and <AREA>) are displayed" discussions below.
  552.  
  553. "/HTTP=cc" specifies the two characters that are to appear around the  text
  554. substitution  in   /A=spec,   /IMG=spec,   /IMGALT=spec,   /MAP=spec,   and
  555. /MAPALT=spec items.   Initially  defaults  to  "/HTTP=[]";  the  site  name
  556. (typically) is preceded by " [" (including the leading space) and  followed
  557. by "]  "  (including  the  trailing  space).   If  only  one  character  is
  558. specified, it is the same as repeating it  so  "/HTTP=*"  is  the  same  as
  559. "/HTTP=**".  You can  also  specify  /HTTP=NULL  but  the  leading/trailing
  560. spaces will still be used.
  561.  
  562. "/-INPUT" skips any indication of the <INPUT> flags.  Initially defaults to
  563. "/INPUT".
  564.  
  565. "/INPUT" shows <INPUT> flags.   This  allows  the  "<INPUT>  =  5<@+>"  (or
  566. however you have it defined) from HTMSTRIP.INI to be  activated.   This  is
  567. initially the default.
  568.  
  569. "/L" says to read "&xxx;" entity references and  "<A>"  etc  symbol  lookup
  570. codes from your /Iinitfile file.  This is initially the default.
  571.  
  572. "/Linitfile" says to read the  "&xxx;"  entity  references  and  "<A>"  etc
  573. symbol lookup codes from the specified file "initfile".  Specifying another
  574. file is primarily useful if you want to have a  master  *.INI  file  and  a
  575. separate code lookup table.  Initially defaults to "/L".
  576.  
  577. "/-L" says to not process any entity references  or  symbol  lookup  codes.
  578. Initially defaults to "/L".
  579.  
  580.  
  581. HTMSTRIP.DOC                         12                        Mar 27, 1998
  582.  
  583. "/FILTER" specifies that the program is to replace specific  characters  in
  584. the input  file.   See  the  "Defining  Character-Translations"  discussion
  585. below.  When this parameter is in effect, the program looks  for  character
  586. translations in the entity reference  file  (/Linitfile),  which  typically
  587. defaults to your initialization file (/Iinitfile).  The  is  initially  the
  588. default.
  589.  
  590. "/FILTER=filename" specifies that  a  filter  is  to  be  applied  and  all
  591. character replacements are in  the  file  "filename".   See  the  "Defining
  592. Character-Translations" discussion below.
  593.  
  594. "/-FILTER" says to not bother removing the nonprintable characters from the
  595. output.  Initially defaults to "/FILTER".
  596.  
  597. "/LOG=logfile" specifies that the program should create a simple  log  file
  598. showing what files were processed  when  and  what  (if  any)  errors  were
  599. encountered.  If the logfile exists already, it will be appended to  (lines
  600. will be added to the end of it).  If no drive or  path  is  specified,  the
  601. file will be created in your default drive or path.  Initially defaults  to
  602. "/-LOG" (don't create a logfile).
  603.  
  604. "/-LOG" says to not create a log  file  at  all.   This  is  initially  the
  605. default.
  606.  
  607. "/LOG" is the same as "/LOG=HTMSTRIP.LOG".
  608.  
  609. "/T=temp_dir" specifies where to write the temporary files that the routine
  610. needs.  Examples are "/T=C:"  and  "/T=C:\TEMP".   If  not  specified,  the
  611. routine writes to the following in sequence:
  612.  
  613.   - the value of any TEMP, then TMP, environmental variable
  614.   - C:\TEMP
  615.   - C:\
  616.  
  617. "/MONO" (or "/-COLOR") does not try to override screen  colors.   Initially
  618. defaults to "/COLOR".
  619.  
  620. "/COLOR" (or "/-MONO") allows screen colors  to  be  overridden.   This  is
  621. initially the default.
  622.  
  623. "/Iinitfile" says to  read  an  initialization  file  with  the  file  name
  624. "initfile".  The file specification *must* contain a period.  If  no  drive
  625. or path information is specified, the  program  will  search  for  initfile
  626. beginning in your default subdirectory and then going throughout  your  DOS
  627. path.  The use of an initialization file is optional.   Initially  defaults
  628. to "/IHTMSTRIP.INI".
  629.  
  630. "/-I" (or "/INULL") says to skip loading  the  initialization  file.   Note
  631. that this also drops loading the file that translates things  like  "&xxx;"
  632. so you should specify /Linitfile if you drop the other file.
  633.  
  634.  
  635. HTMSTRIP.DOC                         13                        Mar 27, 1998
  636.  
  637. "/ENV" says to look for %var% occurrences in the command line  and  try  to
  638. resolve any apparent environmental variable references.   See  BRUCEINI.DOC
  639. for more information.  This is initially the default.
  640.  
  641. "/-ENV" says to skip resolving apparent %var% occurrences  in  the  command
  642. line.  Initially defaults to "/ENV".
  643.  
  644. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  645.  
  646. "/?&H" gives you a hexadecimal and decimal conversion table.
  647.  
  648.  
  649. Return codes:
  650.  
  651. HTMSTRIP returns the following ERRORLEVEL codes:
  652.  
  653.         0 = no problems, all files processed
  654.       251 = could not find a file to process
  655.       253 = operation aborted by pressing Escape
  656.       255 = syntax problems, or /? requested
  657.  
  658.  
  659.  
  660. HTMSTRIP.DOC                         14                        Mar 27, 1998
  661.  
  662. How hypertext links (<A>) are displayed:
  663.  
  664. Hypertext links are placed in an HTML page to indicate  that  if  the  user
  665. clicks in the defined "hot" area, they will be taken to an appropriate page
  666. (or another section of the same page).  A typical hypertext link  would  be
  667. something like:
  668.  
  669.         To enter Elsie's Picture Page, click
  670.         <a href="http://www.erols.com/waynesof/elsie.htm">here!</a>
  671.  
  672. Using a browser like Netscape Navigator  or  Internet  Explorer,  the  user
  673. would see this as:
  674.  
  675.         To enter Elsie's Picture Page, click here!
  676.  
  677. and "here!" would normally be underlined and perhaps be in red.
  678.  
  679. How HTMSTRIP reveals hypertext links is based on the /A=spec parameter. The
  680. values of "spec" are mutually exclusive:
  681.  
  682.       /A=FSITE    says to show the site name, using its full  url  address,
  683.                   and embed this name in the body of the text page
  684.       /A=FSITEFN  says to show the site name, using its full  url  address,
  685.                   and place this site name in a footnote section at the end
  686.                   of the text page
  687.       /A=SITE     says to show the site name, but only the part  after  the
  688.                   last "/" or "\", and embed this name in the body  of  the
  689.                   text page
  690.       /A=SITEFN   says to show the site name, but only the part  after  the
  691.                   last "/" or "\", and place this site name in  a  footnote
  692.                   section at the end of the text page
  693.       /A=SYMBOL   says to use the specified <A> symbol  (initially  defined
  694.                   as "(link)" in the HTMSTRIP.INI file)
  695.       /A=NONE     (or /-A) says that nothing is to be shown  for  hypertext
  696.                   links.  This is initially the default.
  697.  
  698. Given:
  699.  
  700.         To enter Elsie's Picture Page, click
  701.         <a href="http://www.erols.com/waynesof/elsie.htm">here!</a>
  702.  
  703. Setting             Yields
  704. -------             ------
  705. /A=FSITE            [http://www.erols.com/waynesof/elsie.htm]
  706. /A=FSITEFN          [1] http://www.erols.com/waynesof/elsie.htm (footnote)
  707. /A=SITE             [elsie.htm]
  708. /A=SITEFN           [1] elsie.htm       (footnote)
  709. /A=SYMBOL           (link)
  710. /A=NONE                                 (is not shown)
  711.  
  712.  
  713.  
  714. HTMSTRIP.DOC                         15                        Mar 27, 1998
  715.  
  716. How image elements (<IMG>) are displayed:
  717.  
  718. Image elements are put in HTML code to indicate that a graphical  image  is
  719. to be inserted at this point.  A typical  image  element  might  look  like
  720. this:
  721.  
  722.         <IMG SRC="../movies/Anaconda/assets/title.gif" border=0
  723.         alt="Anaconda - click to enter">
  724.  
  725. Presuming the Web browser has graphics enabled, the browser will  load  the
  726. title.gif graphic from the specified site (the  example  here  is  using  a
  727. relative reference to the site instead  of  an  absolute  one--don't  worry
  728. about it).
  729.  
  730. If the browser does not support graphics, the text displayed in the  "alt="
  731. parameter (in our case "Anaconda - click to enter") will be displayed.   If
  732. no "alt=" parameter is provided, some symbol like "(image)" will be  filled
  733. in instead.  You'll frequently see the "alt=" text  if  the  graphic  takes
  734. awhile to load; most browsers show the text to give  you  a  head's  up  of
  735. what's being loaded.  Under some of the newer  browsers,  the  "alt="  text
  736. will be displayed if you move your cursor over the image.
  737.  
  738. Note that unlike the "src="  specification,  the  "alt="  specification  is
  739. strictly optional under the HTML specifications.  Some images will have one
  740. defined, most won't.
  741.  
  742. How  HTMSTRIP  displays  these  links  is  based   on   three   parameters:
  743. "/IMG=spec", "/IMGALT=spec", and "/ALTONLY".
  744.  
  745. "/IMG=spec" and "/IMGALT=spec" are mutually exclusive.  The "spec" part  of
  746. them functions almost  identically  to  how  they  work  in  the  "/A=spec"
  747. parameter (above).
  748.  
  749. If "/IMG=spec" is used, the "SRC=" attribute is used exclusively.
  750.  
  751. If "/IMGALT=spec" is used, the "ALT="  attribute  is  used  if  it  exists,
  752. otherwise,  the  "SRC="  attribute  is  used  unless  "/ALTONLY"  is   also
  753. specified.
  754.  
  755. If "/IMGALT=spec" and "/ALTONLY" are used, then  the  "ALT="  attribute  is
  756. used.  If one does not exist in the  image  element,  a  symbol  (typically
  757. "(image)") is used instead.
  758.  
  759. The values of "spec" are mutually  exclusive  and  are  documented  in  the
  760. "/A=spec" section above.  Initially, the parameters default to  "/IMG=NONE"
  761. (and "/IMGALT=NONE") and "/-ALTONLY".  This results in nothing being  shown
  762. for image elements.
  763.  
  764.  
  765. HTMSTRIP.DOC                         16                        Mar 27, 1998
  766.  
  767. Given:
  768.  
  769.         <IMG SRC="../movies/Anaconda/assets/title.gif" border=0
  770.         alt="Anaconda - click to enter">
  771.  
  772. Setting             Yields
  773. -------             ------
  774. /IMG=FSITE          [../movies/Anaconda/assets/title.gif]
  775. /IMG=FSITEFN        [1] ../movies/Anaconda/assets/title.gif (footnote)
  776. /IMG=SITE           [title.gif]
  777. /IMG=SITEFN         [1] title.gif       (footnote)
  778. /IMG=SYMBOL         (image)
  779. /IMG=NONE                               (is not shown)
  780.  
  781. Setting             Yields (if "alt=" specification present)
  782. -------             ----------------------------------------
  783. /IMGALT=FSITE       [Anaconda - click to enter]
  784. /IMGALT=FSITEFN     [1] Anaconda - click to enter (footnote)
  785. /IMGALT=SITE        [Anaconda - click to enter]
  786. /IMGALT=SITEFN      [1] Anaconda - click to enter (footnote)
  787. /IMGALT=SYMBOL      [Anaconda - click to enter]
  788. /IMGALT=NONE                            (nothing shown)
  789.  
  790. Given an image element without an "alt=" specification:
  791.  
  792.         <IMG SRC="../movies/Anaconda/assets/title.gif">
  793.  
  794. If  /-ALTONLY  is  operating,  /IMGALT=spec  is  treated   identically   to
  795. /IMG=spec; the "src=" specification is used.  However, if  /ALTONLY  is  in
  796. effect:
  797.  
  798. Setting             Yields (if no "alt=" spec and /ALTONLY in effect)
  799. -------             --------------------------------------------------
  800. /IMGALT=FSITE                           (nothing shown)
  801. /IMGALT=FSITEFN                         (nothing shown)
  802. /IMGALT=SITE                            (nothing shown)
  803. /IMGALT=SITEFN                          (nothing shown)
  804. /IMGALT=SYMBOL      (image)
  805. /IMGALT=NONE                            (nothing shown)
  806.  
  807.  
  808.  
  809. HTMSTRIP.DOC                         17                        Mar 27, 1998
  810.  
  811. How client-side imagemaps (<MAP> and <AREA>) are displayed:
  812.  
  813. Client-side imagemaps are used for sites that display something like a  map
  814. and allow you to click on different parts of the map and go to a  different
  815. place.  As your mouse cursor moves over the  image,  it  typically  changes
  816. from an arrow to a hand  and  back  again  as  it  hits  these  pre-defined
  817. hotspots.  In general, imagemaps are relatively hard to set up and  they're
  818. not in wide use.
  819.  
  820. Here's an example of an imagemap taken from the ZDNet site:
  821.  
  822.   <MAP NAME="botnav">
  823.   <AREA SHAPE=RECT COORDS="0,12,83,26" HREF=http://www.zdnet.com/
  824.      ALT="ZDNet Home Page">
  825.   <AREA SHAPE=RECT COORDS="84,12,150,26" HREF=javascript:popup()
  826.      ALT="ZDNet Site Map">
  827.   <AREA SHAPE=RECT COORDS="151,12,246,26"
  828.      HREF=http://xlink.zdnet.com/cgi-bin/texis/xlink/xlink/welcome.html
  829.      ALT="Search ZDNet">
  830.   <AREA SHAPE=RECT COORDS="248,12,327,26"
  831.      HREF=http://xlink.zdnet.com/cgi-bin/texis/xlink/xlink?config=whatsnew
  832.      ALT="What's New on ZDNet">
  833.   <AREA SHAPE=RECT COORDS="328,12,383,26" HREF=/adverts/adinfo/
  834.      ALT="ZDNet Advertising Info">
  835.   <AREA SHAPE=RECT COORDS="384,12,468,26"
  836.      HREF=http://www.zdnet.com/cgi-bin/contact ALT="ZDNet Contact Us">
  837.   </MAP>
  838.   <img WIDTH=468 HEIGHT=26
  839.      SRC="http://www.zdnet.com/graphics/nav/botnav.gif"
  840.      border=0 align=top vspace=7 usemap="#botnav">
  841.  
  842. This imagemap says to bring in a graphic image ("botnav.gif") and  use  the
  843. separately-defined map ("botnav") to identify certain hotspots.
  844.  
  845. HTMSTRIP doesn't display graphics at all so you're not going to get a great
  846. feeling for how the imagemap would be  displayed  using  the  program.   It
  847. will, however, show you what links are called upon if that's what you  want
  848. it to do.  The way that it  handles  these  is  with  the  "/MAP=spec"  and
  849. "/MAPALT=spec" parameters.  They work very similarly to how "/IMG=spec" and
  850. "/IMGALT=spec" are handled including  how  /ALTONLY  affects  things.   The
  851. initial default for HTMSTRIP is "/MAP=NONE" which means the image maps  are
  852. skipped entirely.
  853.  
  854.  
  855. HTMSTRIP.DOC                         18                        Mar 27, 1998
  856.  
  857. Given:
  858.  
  859.   <MAP>
  860.   <AREA SHAPE=RECT COORDS="0,12,83,26" HREF=http://www.zdnet.com/index
  861.      ALT="ZDNet Home Page">
  862.   </MAP>
  863.  
  864. Setting             Yields
  865. -------             ------
  866. /MAP=FSITE          Map: {  [http://www.zdnet.com/index]  }
  867. /MAP=FSITEFN        [1] http://www.zdnet.com/index     (footnote)
  868. /MAP=SITE           Map: {  [index]  }
  869. /MAP=SITEFN         [1] index                          (footnote)
  870. /MAP=SYMBOL                (results in error message)
  871. /MAP=NONE                  (nothing shown)
  872.  
  873. Setting             Yields (if "alt=" specification present)
  874. -------             ----------------------------------------
  875. /MAPALT=FSITE       Map: {  [ZDNet Home Page]  }
  876. /MAPALT=FSITEFN     [1] ZDNet Home Page    (footnote)
  877. /MAPALT=SITE        Map: {  [ZDNet Home Page]  }
  878. /MAPALT=SITEFN      [1] ZDNet Home Page    (footnote)
  879. /MAPALT=SYMBOL             (results in error message)
  880. /MAPALT=NONE               (nothing shown)
  881.  
  882. Given an imagemap without an "alt=" specification:
  883.  
  884.   <MAP>
  885.   <AREA SHAPE=RECT COORDS="0,12,83,26" HREF=http://www.zdnet.com/index>
  886.   </MAP>
  887.  
  888. If  /-ALTONLY  is  operating,  /MAPALT=spec  is  treated   identically   to
  889. /MAP=spec; the "href=" specification is used.  However, if /ALTONLY  is  in
  890. effect:
  891.  
  892. Setting             Yields (if no "alt=" spec and /ALTONLY in effect)
  893. -------             --------------------------------------------------
  894. /MAPALT=FSITE       Map: {  }
  895. /MAPALT=FSITEFN     Map: {  }
  896. /MAPALT=SITE        Map: {  }
  897. /MAPALT=SITEFN      Map: {  }
  898. /MAPALT=SYMBOL             (results in error message)
  899. /MAPALT=NONE               (nothing shown)
  900.  
  901.  
  902.  
  903. HTMSTRIP.DOC                         19                        Mar 27, 1998
  904.  
  905. Defining entity references:
  906.  
  907. HTMSTRIP will process an entity reference definition file is one is  found.
  908. This table can be in your standard *.INI file (for  example,  HTMSTRIP.INI)
  909. if desired or it can be a separate  file  specified  using  the  /Linitfile
  910. parameter.
  911.  
  912. Entity references  are  how  non-standard  characters  like  the  copyright
  913. character are handled in HTML pages.  Entity references  are  indicated  as
  914. "&xxx;" where "xxx" is either a code or a number preceded by a pound  sign.
  915. The copyright symbol is indicated in HTML as "©".
  916.  
  917. A default HTMSTRIP.INI is provided with over 300 entity reference  lookups.
  918. To define or change these lookups, the INI file should include a series  of
  919. lines in the following format:
  920.  
  921.         &xxx; = _outstr1_outstr2_outstr3_
  922.  
  923. where "&xxx;" is the HTML sequence and "outstr1", "outstr2", and  "outstr3"
  924. is what you want to replace it with.   There  are  three  available  lookup
  925. strings to match the setting for the character pageset parameter ("/CPn"):
  926. * The first character(s) ("outstr1")  correspond  to  the  characters  used
  927.   under 7-bit DOS (/CP1).  Files created using this character  set  can  be
  928.   e-mailed to anyone and looks identical under DOS  and  Windows.   Foreign
  929.   characters  and  symbols  are  translated  into  fairly  boring,  generic
  930.   characters.
  931. * The second character(s) ("outstr2") correspond  to  the  characters  used
  932.   under 8-bit DOS (/CP2).  Files created using this character set look fine
  933.   under DOS but look sick under Windows.
  934. * The third character(s) ("outstr3")  correspond  to  the  characters  used
  935.   under the ISO 8859/1 8-bit  single-byte  graphic  character  set.   Files
  936.   created using this character set look fine under  Windows  but  look  bad
  937.   under DOS.
  938.  
  939. For example:
  940.  
  941.         Æ    = _AE_Æ_╞_
  942.  
  943. will use "AE" if /CP1 is in effect, "Æ" if /CP2 is in effect,  and  "╞"  if
  944. /CP3 is in effect.  Note that at least one of these "outstr" elements  will
  945. look incorrect to you if you're viewing this help  file  under  Windows  or
  946. DOS.  See the discussion about ENTITY.HTM below in order  to  see  how  the
  947. different character sets are viewed under different environments.
  948.  
  949. In cases where the characters are identical between all character sets, you
  950. can just include the lookup once:
  951.  
  952.         &      = &
  953.  
  954. The same lookup value will be  used  irregardless  of  what  character  set
  955. you're under.
  956.  
  957.  
  958. HTMSTRIP.DOC                         20                        Mar 27, 1998
  959.  
  960. The  "outstr"  portions  can  consist  of  regular  non-space  ASCII   text
  961. characters (like "A" or "z") as well as hexadecimal  values  (in  the  form
  962. &Hxx) or decimal values (in the form \nnn).  (See the  BRUCEHEX.DOC  file.)
  963. They can also be the word "NULL" which translates the string into  nothing.
  964. You cannot use a space or equal sign in "outstr"; use  the  hexadecimal  or
  965. decimal representations instead.  The table does not  have  to  be  in  any
  966. specified order.  Lines can end with "/*" followed  by  a  comment  if  you
  967. want.  Examples:
  968.  
  969.         ¢     = _cents_¢_ó_         /* Cent symbol
  970.         ©     = _(c)_(c)_⌐_         /* Copyright symbol
  971.         °      = _degree_°_░_        /* Degree symbol
  972.               = \032                /* Thick space
  973.  
  974. Remember that "&xxx;" entity references  (yes,  I  hate  that  phrase)  are
  975. case-sensitive in HTML.  "°" will not find "&Deg;".
  976.  
  977. There seems to be a trend of late to relax some of the  replacement  coding
  978. requirements in Web pages.  The ";" is now, apparently, becoming  optional.
  979. Numeric replacements (for example, " ") seem to no longer  require  the
  980. leading pound sign.  Therefore, HTMSTRIP looks for both of these iterations
  981. for any appropriate lookup.  "©" will find "©" and  "™"  will
  982. find "&153".  The lookup itself has to be entered in the  formally  correct
  983. way though.
  984.  
  985. You can see how these files will be processed under each character  pageset
  986. by testing out the ENTITY.HTM file that is provided with  the  HTMSTymm.ZIP
  987. file.  This contains all of the entity references defined  in  HTMSTRIP.INI
  988. as of March 1997.
  989.  
  990. To try all three of the character sets, issue the following commands:
  991.  
  992.         HTMSTRIP ENTITY.HTM ENTITY.DOS /CP1
  993.         HTMSTRIP ENTITY.HTM ENTITY.IBM /CP2
  994.         HTMSTRIP ENTITY.HTM ENTITY.WIN /CP3
  995.  
  996. Then view the resulting files under the DOS EDIT command as well  as  under
  997. the Windows Write program.
  998.  
  999.  
  1000. HTMSTRIP.DOC                         21                        Mar 27, 1998
  1001.  
  1002. Defining the Symbolic References:
  1003.  
  1004. You are also allowed to redefine the strings  that  are  used  for  several
  1005. symbolic references in the entity reference file.   For  example,  if  your
  1006. source code contains  an  <IMG>  (inline  image)  reference,  HTMSTRIP  can
  1007. indicate this by putting some text in place of  the  image.   (HTMSTRIP  is
  1008. text only so it's not going to put the actual image in  there.)  The  first
  1009. three replacements shown below are conditional based on other parameters:
  1010.  
  1011. * The  <A>  indicator  replaces  hyperlink  references  if   /A=SYMBOL   is
  1012.   specified.
  1013. * The <IMG> indicator replaces inline image references  if  /IMG=SYMBOL  or
  1014.   /IMGALT=SYMBOL is specified.
  1015. * The <INPUT> indicator replaces input fields if  /INPUT  is  left  as  the
  1016.   default.
  1017. * <I> replaces italics-on and </I> replaces italics-off.
  1018. * <U> replaces underline-on and </U> replaces underline-off.
  1019. * <B> replaces bold-on and </B> replaces bold-off.  It  also  replaces  the
  1020.   strong-on <STRONG> and strong-off </STRONG> tags favored under  the  HTML
  1021.   4.0 specification.
  1022. * <EM> replaces emphasis-on and </EM> replaces emphasis-off.
  1023. * <TITLE> ... </TITLE> indicates how to handle the document's title.
  1024. * <H1> ... </H1> indicates how to handle the level 1 headings.   Similarly,
  1025.   <H2> ... </H2> through <H6> ...  </H6>  indicates  how  to  handle  those
  1026.   levels of headings.
  1027.  
  1028. The default indicators are the following:
  1029.  
  1030.         Symbol               Meaning          Default Value
  1031.         <A>                  hyperlinks        -> (link)
  1032.         <IMG>                inline image      -> (image)
  1033.         <INPUT>              input fields      -> 5<@+>
  1034.         <I> and </I>         italics on/off    -> (null)
  1035.         <U> and </U>         underline on/off  -> (null)
  1036.         <B> and </B>         bold on/off       -> (null)
  1037.         <EM> and </EM>       emphasis on/off   -> (null)
  1038.         <TITLE> and </TITLE> document title    -> (null)
  1039.         <H1> through <H6>
  1040.           and </H1> thru </H6> level headings  -> (null)
  1041.  
  1042. You can redefine any and all of these entity references in the same  lookup
  1043. file.  These substitutions are specified more or  less  like  the  previous
  1044. substitutions.  For example:
  1045.  
  1046.         <A>      = (link)
  1047.         <IMG>    = (image)
  1048.         <INPUT>  = 5<@+>
  1049.         <U>      = _
  1050.         </U>     = _
  1051.         <B>      = *
  1052.         </B>     = *
  1053.  
  1054.  
  1055. HTMSTRIP.DOC                         22                        Mar 27, 1998
  1056.  
  1057. Unlike with the other lookups, the left  side  is  not  case  sensitive  so
  1058. "<a>=(link)" works just fine.  Hexadecimal  and  decimal  replacements  are
  1059. again acceptable (see BRUCEHEX.DOC file).  You might, for example, want  to
  1060. redefine some of them like this:
  1061.  
  1062.         <A>      = \251     /* Replaces with a √ symbol
  1063.         <IMG>    = \015     /* Replaces with a  symbol (little flash cube)
  1064.         <INPUT>  = ?        /* Replaces with a question mark
  1065.  
  1066. The replacements aren't always perfect.  Web browsers  don't  italicize  or
  1067. display in bold spaces so the following  will  look  perfectly  fine  under
  1068. Netscape or Internet Explorer:
  1069.  
  1070.         The<B> Minnow </B>was Gilligan's ship.
  1071.  
  1072. However, if you have the following in your INI file:
  1073.  
  1074.         <B>     = *
  1075.         </B>    = *
  1076.  
  1077. The text will show up as:
  1078.  
  1079.         The* Minnow *was Gilligan's ship.
  1080.  
  1081. Which makes  it  look  like  the  wrong  words  are  emphasized.   This  is
  1082. unfortunate but it's the way things work.
  1083.  
  1084. If you normally print the results of  everything  from  HTMSTRIP,  you  can
  1085. probably find the print codes that are appropriate for  your  printer  that
  1086. will change the text in the way you want.
  1087.  
  1088. For example, if you're using a Hewlett-Packard  LaserJet  printer,  printer
  1089. codes are shown in the User's  Manual  which  can  do  different  types  of
  1090. bolding, underlining, etc.  You have to make sure that  you  turn  off  the
  1091. settings with the </xx> option (e.g.  </B>) though.  The  following  should
  1092. work on  many  HP  LaserJets  (check  your  manual  and  replace  with  the
  1093. appropriate codes if not):
  1094.  
  1095.         <I>      = \027(s1S   /* Turns italicizing on
  1096.         </I>     = \027(s0S   /* Turns italicizing off (restores upright)
  1097.         <U>      = \027&d0D   /* Turns underlining on
  1098.         </U>     = \027&d@    /* Turns underlining off
  1099.         <B>      = \027(s2B   /* Turns demi-bolding on
  1100.         </B>     = \027(s0B   /* Turns bolding off
  1101.         <EM>     = \027(s1B   /* Turns semi-bolding on
  1102.         </EM>    = \027(s0B   /* Turns bolding off (restores normal weight)
  1103.  
  1104. Note that the  program  counts  all  characters  (including  these  special
  1105. print-setting characters which don't  themselves  print)  when  it  reflows
  1106. text.  Also note that, on the HP at least, underlining underlines spaces as
  1107. well as characters, including indents.
  1108.  
  1109. Any symbolic references that you do not  redefine  will  default  to  their
  1110. original values.
  1111.  
  1112.  
  1113. HTMSTRIP.DOC                         23                        Mar 27, 1998
  1114.  
  1115. The <INPUT> item is a bit of  a  special  case.   It  has  several  special
  1116. options, and they are all present in the default value.
  1117.  
  1118. <INPUT> is used to indicate that the HTML page prompted for,  typically,  a
  1119. bit of text.  In the actual HTML page, this might be coded as:
  1120.  
  1121.         <INPUT NAME=q size=45 maxlength=200 VALUE="">
  1122.  
  1123. Ignoring most of the parameter, the "size=45" parameter says that  the  Web
  1124. navigator is to present an input line to the user which is 45 characters in
  1125. length.  "VALUE=""" indicates that no default value is  provided  for  this
  1126. input.
  1127.  
  1128. The default symbolic reference for handling an <INPUT> request is:
  1129.  
  1130.         <INPUT>  = 5<@+>
  1131.  
  1132. Each item of the assignment is explained below:
  1133.  
  1134.         <INPUT>  specifies the <INPUT> replacement
  1135.         5        means the maximum input length (SIZE=x) to be provided
  1136.                  is 5 characters; the value can be any number between 1
  1137.                  and 255; this rule is sometimes waived (see below)
  1138.         < and >  are extra text characters that will appear
  1139.         @        says to fill in the default value (VALUE="" above) is
  1140.                  one is provided
  1141.         +        says to expand the input field based on an specified
  1142.                  length (SIZE=45 above); if no SIZE= is provided on the
  1143.                  page, a default of SIZE=5 will be used; expansion is
  1144.                  done using underscore characters
  1145.  
  1146. With the above settings, if the program encountered this:
  1147.  
  1148.         <INPUT NAME=q size=45 maxlength=200 VALUE="">
  1149.  
  1150. It would actually write out the input references as:
  1151.  
  1152.         <___>
  1153.  
  1154. Similarly, if the program encountered this:
  1155.  
  1156.         <INPUT TYPE=submit VALUE=Submit>
  1157.  
  1158. It would write out this:
  1159.  
  1160.         <Submit>
  1161.  
  1162. On the other hand, the program will expand the field beyond  the  specified
  1163. maximum length if "@" (value) is requested and it's too large to fit in the
  1164. specified field length.  If the program encountered this:
  1165.  
  1166.         <INPUT TYPE=TEXT VALUE="This is my sample" SIZE=10>
  1167.  
  1168. It would write out this:
  1169.  
  1170.         <This is my sample>
  1171.  
  1172.  
  1173. HTMSTRIP.DOC                         24                        Mar 27, 1998
  1174.  
  1175. Defining Character-Translations (The Filter Table):
  1176.  
  1177. HTMSTRIP allows you to translate specified characters as the text is  read.
  1178. This is useful on output for characters that are defined under Windows  but
  1179. that's about it.  This should not be an issue because HTML is  supposed  to
  1180. be platform independent; the Web designer (or the  software  used  for  the
  1181. page) should have been smart enough to insert the proper  entity  reference
  1182. instead.
  1183.  
  1184. For example, "DisneyÆs" shows up on the Disney site for some  reason.   The
  1185. filter table will translate this as "Disney's".  Also,  way  too  many  Web
  1186. designers use decimal 169 ("⌐", as in "⌐  1996")  as  a  copyright  symbol;
  1187. they're supposed to use the entity reference  ©  instead.   The  filter
  1188. table will translate this as "c 1996".
  1189.  
  1190. There is a default character-translation table built into the entity lookup
  1191. file (HTMSTRIP.INI).  This will typically be loaded  automatically  by  the
  1192. program.  You can update the translations in the lookup  file  or  you  can
  1193. create  your  own  filter  file   and   invoke   it   by   specifying   the
  1194. "/FILTER=filename" parameter.  In most cases, however, you will not need to
  1195. modify this table.
  1196.  
  1197. The filter table is an ASCII text file which consists of a series of  lines
  1198. in the following format:
  1199.  
  1200.         inchar = outchar
  1201.  
  1202. where "inchar" is the character to change from  and  "outstr"  is  what  to
  1203. change the character to.  Both portions can consist  of  regular  non-space
  1204. ASCII text characters (like "A" or "z") as well as hexadecimal  values  (in
  1205. the form &Hxx) or decimal values (in  the  form  \nnn).   Both  sides  must
  1206. reference a single character (exactly one character  is  always  translated
  1207. into exactly one character).  You cannot use  a  space  or  equal  sign  in
  1208. either  "inchar"   or   "outchar";   use   the   hexadecimal   or   decimal
  1209. representations instead.  The table does not have to be  in  any  specified
  1210. order.  Lines can end with "/*" followed by a comment if you want.
  1211.  
  1212. Hexadecimal and decimal equivalents are explained in BRUCEHEX.DOC.
  1213.  
  1214. Examples:
  1215.  
  1216.              a    = A     /* Translate lowercase "a" into capital "A"
  1217.              \032 = _     /* Translate space (decimal 032, &H20 too) into
  1218.                              underscore
  1219.              \027 = \032  /* Translate escape character into a space
  1220.  
  1221. Some leading characters in INI files are  treated  specially  within  Wayne
  1222. Software programs.   INI  lines  that  begin  with  any  of  the  following
  1223. characters may lead to odd results:  "[", "/", "&", "\", ";", ":", "<", and
  1224. ",".  To avoid problems, use hexadecimal  or  decimal  representations  for
  1225. these characters.  For example, use \047 or &H2F if you  want  to  override
  1226. the definition of "/".
  1227.  
  1228.  
  1229.  
  1230. HTMSTRIP.DOC                         25                        Mar 27, 1998
  1231.  
  1232. Author:
  1233.  
  1234. This program was written by Bruce Guthrie of Wayne Software.   It  is  free
  1235. for use and redistribution provided relevant documentation is kept with the
  1236. program, no changes are made to the program or documentation, and it is not
  1237. bundled with commercial programs or charged  for  separately.   People  who
  1238. need to bundle it in for-sale packages must pay a $50 registration  fee  to
  1239. "Bruce Guthrie" at the following address.
  1240.  
  1241. Additional information about this and other Wayne Software programs can  be
  1242. found in the file BRUCE.DOC which should be included in  the  original  ZIP
  1243. file.  The recent change  history  for  this  and  the  other  programs  is
  1244. provided in the HISTORY.ymm file which should be in the same ZIP file where
  1245. "y" is replaced by the last digit of the year and "mm"  is  the  two  digit
  1246. month of the release; HISTORY.611 came out in  November  1996.   This  same
  1247. naming convention is used in naming the ZIP file (HTMSTymm.ZIP)  that  this
  1248. program was included in.
  1249.  
  1250. Comments and suggestions can also be sent to:
  1251.  
  1252.                 Bruce Guthrie
  1253.                 Wayne Software
  1254.                 113 Sheffield St.
  1255.                 Silver Spring, MD 20910
  1256.  
  1257.                 e-mail: WayneSof@erols.com   fax: (301) 588-8986
  1258.                 http://www.geocities.com/SiliconValley/Lakes/2414
  1259.              or find through http://www.erols.com/waynesof
  1260.  
  1261. Please provide an Internet e-mail address on all correspondence.
  1262.  
  1263. 
  1264.