Dec 102017
 
Remove Ansi codes from text files.
File A_OUT101.ZIP from The Programmer’s Corner in
Category Word Processors
Remove Ansi codes from text files.
File Name File Size Zip Size Zip Type
ANSIOUT.DOC 5480 2149 deflated
ANSIOUT.EXE 15328 8860 deflated

Download File A_OUT101.ZIP Here

Contents of the ANSIOUT.DOC file








ANSIOUT
Version 1.01
19 July 1990


Purpose: To remove ANSI code from text files.

Disclaimer: No guarantee is made as to suitability or operation of this
program. The user assumes all responsibility and, by
using, agrees to hold the author blameless for any effects,
either direct or incidental, from the use of this program.

In other words, don't sue me. It works for me, but the risk is yours.

---------------------------------------------------------------------

ANSIOUT is hereby generously donated into the public domain. No
payment is requested, and no fee may be charged for its distribution
beyond a reasonable nominal charge to cover disk duplication.

--------------------------------------------------------------------

The need for ANSIOUT arose when I changed terminal software. My old
software would strip out ANSI codes from a color BBS when doing screen
captures and when logging in general; my new software left the codes
in. Not a big deal, but the "[37m" sort of stuff got on my nerves.
Being lazy, I looked for a program that would strip out the ANSI codes.
All I found was a version in BASIC, which worked fine, but I lack a
BASIC compiler and got tired of running the interpreter just to perform
this simple task. So I wrote my own in C. No, the source code is not
available. While I write a few programs from time to time, I am no
programmer, and do not care to suffer the humiliation of criticism.

--------------------------------------------------------------------

Usage is astoundingly simple (although the following explanation will
not convince anyone of that), and is as "bulletproof" as I could make
it. Start the program by typing

ANSIOUT

and pressing the return key. You will be prompted for the input file
name, and then the output file name. Paths are supported, if your
version of DOS supports them, and if it doesn't you really ought to
think about upgrading.

If the input file isn't found, the program terminates. Likewise, if
the output file can't be created (you specified a non-existent disk
drive, for example), the program terminates. If a problem develops
while writing the output file (the disk fills up, for example), the
program terminates. If a file exists that has the same name as what
you specify for an output file name, the program terminates. If you
enter an empty carriage return for either the input or output file
name, the program terminates. Maybe I should have called it





TERMINATOR, but the name was already used.

Anyhow, assuming you enter valid input and output filenames, you are
then presented with the input file size, and a running count of the
output file size for your amusement. When the input file has been
completely examined and stripped, and the output file created - you
guessed it, the program terminates.

If you prefer, you may also run the program by entering

ANSIOUT inputfile outputfile

thereby skipping the prompts. Or you can enter

ANSIOUT inputfile

and the program will only prompt for the output file name.

If you specify PRN for the output file, no disk file will result, but
your printer will leap into action, printing the stripped version of
the file.

If you run out of time, patience, or enthusiasm while the program is
running, a graceful exit can be had by the mere touch of the ESC key.

All in all, I have probably spent more time writing the program (and
this rambling missive) than will ever be saved by its use. That is what
laziness gets me. Nevertheless, here it is. Use it in good health.
I do not anticipate any further revisions, unless I am made aware of
some serious bug. After all, windows and mice have their place, but
that place is not here, and this version does all that I expect of it.

If you have any questions, comments, or words of enthusiastic glowing
praise, contact me at this address:

Jerry P. Kelly
167 Cherry St. Unit 129
Milford, CT 06460

If you have an uncontrollable urge to send money, track down the
original BASIC version that inspired this effort, and send it to that
author instead. Of course, if you absolutely insist on sending me a
check, rest assured I will cash it.


=====================================================================
REVISION HISTORY

Ver. 1.00 - The first and positively last version that will ever exist.

Ver. 1.01 - Ahem. The second and positively (?) last version that will

ever exist. Fixed a bug that caused "unpredictable
results" if the file size exceeded 32k. Now you can
cheerfully strip ANSI out of files up to 4.3 gigabytes.





Also added ESCape feature if you change your mind while the
program is running.



 December 10, 2017  Add comments

Leave a Reply