home *** CD-ROM | disk | FTP | other *** search
/ Creative Computers / CreativeComputers.iso / shareware / text / stripansi_v1.2 / stripansi.docs < prev    next >
Text File  |  1994-11-17  |  8KB  |  185 lines

  1.        ***************************************************************
  2.        *                   StripANSI Docs v1.2                       *
  3.        *                                                             *
  4.        *     Program and Documentation Written by Syd L. Bolton      *
  5.        *                                                             *
  6.        *       ⌐1991,92 Legendary Design Technologies Inc.           *
  7.        ***************************************************************
  8.  
  9. SUMMARY - WHAT's NEW IN 1.2
  10. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11.     V1.2 includes the following new features/additions:
  12.  
  13.         a) I received a letter from Robert Gould, who asked
  14.            if StripANSI could not just strip codes - but convert
  15.            them to standard ASCII.  Well, there's really only
  16.            one that would work, and that's INSERT {N} CHARS. Now,
  17.            under the new "SPECIAL" menu, if you have this conversion
  18.            turned on, a file that had the code (for example) to
  19.            "INSERT 5 CHARACTERS", it would be replaced with 5
  20.            spaces in the output file.  NOTE this is NOT 100% ANSI
  21.            compatible, but should work in many cases (I believe
  22.            Robert wanted to line up columns of numbers).
  23.  
  24.         b) While I was at it, I thought I might as well add an
  25.            option to convert TABS (ASCII 9) to actual SPACES.
  26.            The default is 8 spaces, but I've added a little
  27.            requester to let you change that.
  28.  
  29.         c) Perhaps it might even be useful to CONDENSE a file
  30.            (go the other way - convert spaces into tabs... just
  31.             a thought)
  32.  
  33.         d) The help option now has another page to accomodate
  34.            the new features.
  35.  
  36.         e) PROGRAMMING NOTES:
  37.                 I've documented the new features a little
  38.                 better in case you want to add your own
  39.                 conversions in the future.
  40.  
  41.         NOTE: Although the CLI version indicates 1.2, it DOES NOT
  42.               do the above features.  It's a little hard to
  43.               implement with so many command line switches.  I've
  44.               changed the version number in the program only to
  45.               be consistent with the rest of the package.
  46.  
  47. SUMMARY - WHAT's NEW IN 1.1
  48. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  49.     V1.1 includes the following new features/additions:
  50.  
  51.         a) Additional codes now stripped.  These include the
  52.            bell character (ASCII 7), and many others that
  53.            aren't true ANSI codes but can be found in many
  54.            files.
  55.  
  56.         b) The Workbench version now contains on-line help.
  57.            Here you will find a list of the new codes and
  58.            their ASCII values. Press HELP or use the menu.
  59.  
  60.         c) The CLI version includes a new switch called "TRUE".
  61.            When this is turned on, only true ANSI codes are
  62.            stripped.  Things like BELL's, BACKSPACES, and what
  63.            not are left alone.
  64.  
  65.         d) PROGRAMMING NOTES:
  66.              CLI VERSION: i) source changed to make it easier
  67.                      to add new codes (called extended)
  68.                       ii) re-compiled with Manx 5.2a
  69.  
  70.            WORKBENCH VERSION: i) gadgets code re-written into an
  71.                      array (as mentioned in 1.0).
  72.                       ii) report format changed to allow
  73.                       for more codes in the future.
  74.                       iii) re-compiled with Manx 5.2a
  75.  
  76. Introduction
  77. ~~~~~~~~~~~~
  78.     There are many times when capturing buffers from terminal
  79. programs that you may find the pretty (but sometimes annoying) use of
  80. ANSI codes to be undesireable.  In one case, I wanted to keep my own
  81. list of downloadable files from a certain BBS, but I wanted to weed
  82. out the menus, and other messages.  When loading my captured file into
  83. my text editor, I was appalled to see the screen cluttered with ANSI
  84. codes everywhere.  Search & replace just won't do here, since there are
  85. so many variations.  So, a program needed to be written to remove these
  86. codes for me.  Here is that program.
  87.  
  88. The Two Flavours of StripANSI
  89. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  90.  
  91.     StripANSI actually comes in two (2) different versions, each
  92. of which has a particular use for you, depending upon your system.
  93. They are:
  94.  
  95. CLI VERSION
  96. -----------
  97.     This is the smallest version of the program, intended to be used
  98. by people who don't like WIMP interfaces, but prefer command line ones.
  99. The usage of the program is simply:
  100.  
  101. StripANSI inputname outputname [REPORT,TRUE]
  102.  
  103.     Of course, the 'inputname' is the name of the ANSI-ridden file,
  104. 'outputname' is the name of the destination filename for the NEW, stripped
  105. file, and the optional 'REPORT' will generate a report about the number
  106. of ANSI entries, and their appropriate percentages. 'TRUE' is a new
  107. feature to V1.1, and allows you to specify that ONLY ANSI codes are
  108. removed, and NOT things like FORM FEEDS, CARRIAGE RETURNS, BELLS, etc.
  109.  
  110. WORKBENCH VERSION
  111. -----------------
  112.     This version of StripANSI has a full Intuition interface that allows
  113. more control over the conversion.  You have the ability to selectively turn
  114. on and off certain types of conversions.  The default is that ALL ANSI codes
  115. listed on the screen are to be stripped.  If you DON'T want one (or more) of
  116. these codes stripped, click on its gadget to highlight it.  There is also the
  117. ability to selectively generate a report, and all file handling is done
  118. through a file requester which makes the entire program 'point and click'.
  119.     In the latest release, V1.1, you have some new codes added that
  120. the program will strip.  Most of these are control codes that many dot-
  121. matrix printers support, and I have added their removal at the request
  122. of Robert Bromley from British Columbia.  Their codes are listed in the
  123. "OTHER CODES" section of the screen, and their actual ASCII values can
  124. be obtained by selecting HELP (another new feature, accessible by either
  125. selecting help from the menu, or pressing the HELP key on the keyboard).
  126.     Another new feature is called "INVERT" which will invert the status
  127. of all of the gadgets on the screen.  NOTE: Due to a bug in the operating
  128. system, clicking on this gadget repeatedly will cause the appearance of the
  129. gadgets to be incorrect - they will still function as you would expect and
  130. clicking on it several more times will correct the problem.  Coding wise,
  131. there are ways around this but they were too cumbersome to include at this
  132. point in time, and the problem exists both in 1.2/1.3 and 2.0.
  133.  
  134. ARP VERSION
  135. -----------
  136.     Originally, I had planned an ARP version as well.  Since the
  137. Workbench version is small enough, I have abolished this idea.
  138.  
  139. How It Works
  140. ~~~~~~~~~~~~
  141.     StripANSI is a very simple program.  A table of code names, and
  142. their equivalent 'ending' indicators was created.  When a CSI (Code
  143. Sequence Introducer) character is encountered in the input file, the
  144. program then searches the table to find a match for the 'ending'
  145. indicators.  When one is found, normal 'read in, write out' procedures
  146. continue, until another CSI is encountered.  By simply not writing the
  147. characters found between (and including) the CSI and ending character,
  148. we eliminate all ANSI codes in a file.
  149.     Currently, StripANSI will also eliminate any BACKSPACE (ASCII:8)
  150. characters, which often appear in terminal buffers when a mistake is
  151. made on the keyboard.  It will also eliminate FORM FEEDs (ASCII:12) which
  152. is often used to clear the screen.  NOTE: In v1.1, it will also strip
  153. various other codes, including the BELL (ASCII:7) and others.  For a
  154. complete list, ask for HELP in the program.
  155.  
  156. True ANSI?
  157. ~~~~~~~~~~
  158.     Since I do not actually have a valid ANSI table of codes
  159. (if someone can tell me where I can get a complete table, I would be
  160. most appreciative), I have only filtered the codes that the Amiga
  161. understands, as defined by the latest RKM, 'Libraries & Devices'.
  162. StripANSI will also remove any Amiga-specific (non-ANSI) codes, and
  163. these are preceeded by a '╗' character to indicate they are NON-ANSI.
  164.  
  165. Conclusions
  166. ~~~~~~~~~~~
  167.     Please test this program with files you have to make sure
  168. it works as it should, trying the report option as well.  Please
  169. realize the '%' indicators is not actually 100% accurate: this is
  170. because I did not want to introduce floating-point numbers (as this
  171. would increase program size unnecessarily) so the % will probably
  172. only add up to 99%, but this is okay, and not really a bug.
  173.  
  174.     Any problems, questions, or concerns should be directed to
  175. me either via E-MAIL, mail, fax, or voice.  THANKS FOR YOUR TIME!
  176.  
  177.     Syd Bolton
  178.     President
  179.     Legendary Design Technologies Inc.
  180.     25 Frontenac Avenue
  181.     Brantford, Ontario
  182.     N3R 3B7
  183.     (519)-753-6120 voicemail/fax - extension 5
  184.     (519)-754-1205 Probe BBS: Sysop: A.Antoszewski 24hrs, 2400, 8n1
  185.