Thu 11-December-2003

About TSFILT in General                          All rights reserved
=======================

   Ŀ
    Please do not distribute any part of this package separately. 
   

This package may be used and distributed freely for  NON-COMMERCIAL,
NON-INSTITUTIONAL,  PRIVATE  purposes, provided it is not changed in
any way. For ANY other usage, such as use at a  university,  contact
the author. Full business usage is not allowed.

The  programs  are  under  development. Comments and bug reports are
welcome.

The author shall not be liable to the user for any direct,  indirect
or  consequential loss arising from the use of, or inability to use,
any program or file howsoever caused. No warranty is given that  the
programs will work under all circumstances.

Timo Salmi
Professor of Accounting and Business Finance
Department of Accounting and Finance
Faculty of Business Studies
University of Vaasa
P.O. BOX 700, FIN-65101 Vaasa, Finland
mailto:ts@uwasa.fi WWW: http://www.uwasa.fi/~ts/


CONTENTS:

  1. Summary
  2. Program Abstracts


1. SUMMARY

Timo Salmi FILTer utilities, release 2.5 includes the following
*    *     ****                      * *
filter programs.

TSFILT25        Filters for textfiles by T.Salmi
Filename        Comment
--------        --------------------------------
ASC2IBM.EXE     toasc.exe in filter format
FILE_ID.DIZ     Brief characterization of tsfilt
FLMARG.EXE      Filter for adding a left margin
FLRMARG.EXE     Filter for a right margin
FLSUBS.EXE      Filter for string substitution
IBM2ASC.EXE     toibm.exe in filter format
IBM2LAT1.EXE    IBM PC Scandies to Latin1 chars
LAT12IBM.EXE    Latin1 IBM chars to PC Scandies
LOGFILT.EXE     Filters backspaces from logfiles
PC2UNIX.EXE     PC text eolns to Unix eolns
QUOTE.EXE       Quotes to messages
TOASC.EXE       8bit ibm to Scandinavian 7 ascii
TOASCI.EXE      8bit ibm to International 7ascii
TOIBM.EXE       7 ascii to Scandinavian 8bit ibm
TSFILTIN.TXT    Document (a readme)
TSFILTNW.TXT    News announcements about tsfilt
TSPROG.INF      List of programs from T.Salmi
U2PC.BAT        Change Unix eolns to MsDos eolns
UNIX2PC.EXE     Unix text eolns to PC eolns
UNIXTEST.TXT    For testing Unix to PC eolns
UNZIPTXT.BAT    Get text files from Unix zips
VAASAINF.TXT    Info: Finland, Vaasa, U of Vaasa
----            ------             ------  -----
0022



2. PROGRAM ABSTRACTS

ASC2IBM (Ver. 1.2a)  7-bit ASCII to Scandinavian 8bit IBM PC, a filter
===================        ***                        ***

ASC2IBM is a filter for changing 7-bit Scandinavian characters to
their 8-bit equivalents.

E.g. if you have a text file UNIX7.TXT, apply
TYPE UNIX7.TXT | ASC2IBM > PC.TXT
   or
ASC2IBM < UNIX7.TXT
   or
ASC2IBM < UNIX7.TXT > PC.TXT

This filter does the following conversions
  {  -->  
  |  -->  
  [  -->  
  \  -->  
  ]  -->  
  }  -->  


FLMARG (Ver. 1.2a)  Filter for adding a left margin
==================  * *                      ****

FLMARG is a true filter for inserting a left margin. E.g. if you
have a source text file source.txt, and want have a left margin of 8
characters wide, apply
TYPE SOURCE.TXT | FLMARG 8
      or
FLMARG 8 < SOURCE.TXT
This is filter is particularly useful when directing a file to the
printer, e.g.
TYPE SOURCE.TXT | FLMARG 8 > PRN
Using a negative margin can be used to strip characters from the
beginning of of the lines.


FLRMARG (Ver. 1.1a)  Filter for a right margin
===================  * *          *     ****

FLRMARG is a true filter for imposing a right margin on the output
from a text file.

Usage: FLRMARG RightMarginPosition [PadCharAscii] [/p(ad)] [/w(rap)]

E.g. if you have a source text file source.txt, and want have a
right margin at column 68 without padding and wrapping, apply
     TYPE SOURCE.TXT | FLRMARG 68
       or
     FLRMARG 68 < SOURCE.TXT
To direct the output to the printer with the right margin at 72,
with wrapping, without padding, apply
     TYPE SOURCE.TXT | FLRMARG 72 /w > PRN

If you use the padding /p option the default pad character is blank
(ascii 32). You can change the pad character by giving its ascii
value as the second parameter. If the /p switch is not on, a pad
character value has no effect.

Advanced usage: You can combine FLRMARG and FLMARG to extract
columns of text from a text file. E.g. for extracting the columns
3-10 from source.txt apply
     TYPE SOURCE.TXT | FLRMARG 10 | FLMARG -2


FLSUBS (Ver. 1.2a)  Filter for string substitution
==================  * *               ****

FLSUBS is a true filter for substituting a string of a text file
with another string. E.g. if you have a source text file source.txt
and want to alter every occurrence of the word "home" to "domicile"
apply
TYPE SOURCE.TXT | FLSUBS home domicile
or
FLSUBS home domicile < SOURCE.TXT
Also more complicated pipes are possible such as
TYPE SOURCE.TXT | FLSUBS home domicile | FLSUBS pc PC | MORE

The other programs in this set are not true filters but command-like
utilities for filtering text files.


IBM2ASC (Ver. 1.2a)  8bit IBM PC to Scandinavian 7 ASCII, a filter
===================       ***                      ***

IBM2ASC is a filter for changing 8-bit Scandinavian characters to
their 7-bit equivalents.

E.g. if you have a text file PC.TXT, apply
TYPE PC.TXT | IBM2ASC > UNIX7.TXT
   or
IBM2ASC < PC.TXT
   or
IBM2ASC < PC.TXT > UNIX7.TXT

This filter does the following conversions
    -->  {
    -->  |
    -->  [
    -->  \
    -->  ]
    -->  }
    -->  ~
    -->  ^


IBM2LAT1 (Ver. 1.1)  IBM PC characters to Latin1
===================  ***                  ***  *

IBM2LAT1 is a filter for changing 8-bit Scandinavian characters to
their 8-bit LATIN1 equivalents.

E.g. if you have a text file PC.TXT,
apply
TYPE PC.TXT | IBM2LAT1 > LATIN1.TXT
   or
IBM2LAT1 < PC.TXT
   or
IBM2LAT1 < PC.TXT > LATIN1.TXT

This filter is needed because of the Finnish computer centres'
decision at the beginning of 1995 to impose the 8-bit Latin1
character set. The set is different from the customary 8-bit IBM PC
character set. For example the conversion is necessary when I print
PC text with characters like a" and o" etc on the PostScript printer
in our local net.

The filter does the following, unlikely-looking conversions
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
    -->  
  "  -->  


LAT12IBM.EXE (ver 1.1)  Latin1 to IBM characters
======================

The same coversion, but the other way.



LOGFILT (Ver. 1.7)  Filters backspaces from logfiles
==================

LOG FILTer

Usage: LOGFILT SourceFile DestinationFile [/k] [/p] [/m] [/n]
/f = force overwrites, /k = keep date, /p = pause, /m = more,
/n = noise filter

or: LOGFILT ? for these instructions.

Performs an intelligent filtering of backspaces from a text file.

This program is needed e.g. if you use a communication program like
Procomm Plus, and you want to capture your chat with the SysOp in a
log file. If you make typing errors, and correct them, the
backspaces you use will be included in your log file. Furthermore,
there may be noise on the line flooding the log file with extra
characters. - You can save in your phone bills by reading the
messages in a BBS with fastscan and high speeds, and having a log
open. Then filter the potential noise from your log with LOGFILT.

The /f /p /m /n parameters in the brackets [] are optional. If you
are working with a single disk drive, /p allows to change the disk
by pausing after you have loaded LOGFILT. If you direct output to
the screen (that is to CON) the /m option causes pause at the end of
each screen. The /n option performs a simple noise control by
filtering the characters beyond ascii 125 (except ) and below
32. Noise control also filters out some strings which usually are
noise (at least on the author's configuration). These strings can be
seen by entering LOGFILT ?


PC2UNIX (Ver 1.2a)  PC text eolns to Unix eolns
==================

PC2UNIX is a true filter for changing PC end of lines (ascii 13, 10)
to Unix end of lines (ascii 10). This kind of filter is useful if
you transfer ascii data from a PC to a Unix machine.

E.g. if you have a text file pc.txt, apply
TYPE PC.TXT | PC2UNIX > UNIX.TXT
   or
PC2UNIX < PC.TXT
   or
PC2UNIX < PC.TXT > UNIX.TXT

A test switch can be used for batch programming. PC2UNIX /t returns
errorlevel==1 if the file looks like a non-text or non-MS-DOS file.
When the test switch is on, the conversion will not be made, that is
no output will be produced.

Errorlevel==1 is also returned if the input is not redirected, or if
the MS-DOS version is earlier than 2.0.


QUOTE (Ver. 1.1a)  Quotes to messages
=================

Usage: QUOTE [QuoteString] [/a(ppend a > )] [/b(lank insert)] [/h(elp)]

QUOTE is a true filter for appending a quote string at the beginning
of each line of input. E.g.. if you have a message file MESS.TXT,
and want it quoted, apply:
  TYPE MESS.TXT | QUOTE sender > NEWMESS.TXT

You must choose your quote string. E.g. QUOTE ts /a < MESSAGE.TXT
appends ts> at the beginning of each line.


TOASC (Ver. 1.6)  8-bit ibm TO Scandinavian 7-bit ASCii
================            **                    ***

Usage:
TOASC SourceFile [DestinationFile]
      [/f(orce overwrites)] [/k(eep date)] [/m(ore)] [/p(ause)]

or: TOASC ? for these instructions

The program performs a Scandinavian conversion of 8-bit ibm ascii
characters. It also converts the other 8-bit characters into their
nearest counterparts in the 7-bit character set. TOASC is intended
for text files only. The Scandinavian conversion is needed e.g. if
you have pre-prepared a Finnish message with an editor, and want to
upload your message into a bulletin board.

The /f, /p and /m parameters in the brackets [] are optional. If you
are working with a single disk drive, /p allows to change the disk
by pausing after you have loaded TOASC. If you direct output to the
screen (that is to CON), the /m option causes pause at the end of
each screen.

The Scandinavian (or rather the Finnish) conversions are { } | [ ] \
The entire translation table is given below.
c u e a { a } c e e e i i i [ ] E a A o | o u u y
\ U c L y P f a i o u n N a o ? + + . . i < > # #
# ! + + + + + + ! + + + + + + + + + - + + + + + +
+ + - + + + + + + + + + + + + + # # ! ! # a b G p
S s m t F T O d @ o e n = + > < ( ) / = o . . R n
2 .


TOASCI (Ver. 1.6)  8-bit ibm TO 7-bit ASCii International
=================

Usage:
TOASCI SourceFile [DestinationFile]
       [/f(orce overwrites)] [/k(eep date)] [/m(ore)] [/p(ause)]

or: TOASCI ? for these instructions

The program converts 8-bit ibm ascii characters into their nearest
counterparts in the 7-bit character set. TOASCI is intended for text
files only.

The /f, /p and /m parameters in the brackets [] are optional. If you
are working with a single disk drive, /p allows to change the disk
by pausing after you have loaded TOASCI. If you direct output to the
screen (that is to CON), the /m option causes pause at the end of
each screen.

The entire translation table is given below.
c u e a a a a c e e e i i i A A E a A o o o u u y
O U c L y P f a i o u n N a o ? + + . . i < > # #
# ! + + + + + + ! + + + + + + + + + - + + + + + +
+ + - + + + + + + + + + + + + + # # ! ! # a b G p
S s m t F T O d @ o e n = + > < ( ) / = o . . R n
2 .


TOIBM (Ver. 1.8)  7-ASCII TO 8-bit IBM PC characters
================           **      ***

Usage: TOIBM SourceFile [DestinationFile] [/k] [/p] [/m] [/v] [/c] [/o]
/f = force overwrites, /k = keep date, /p = pause, /m = more, /v = VAX,
/c = caret, /o = control

   or: TOIBM ? for these instructions

The program performs a Scandinavian conversion of 7-bit ascii
characters. It also can convert assorted VAX, caret, and control
characters into their Scandinavian counterparts. VAX and caret
translations were introduced in version 1.1.

TOIBM is intended for text files only.

The /f, /p and /m parameters in the brackets [] are optional. If you
are working with a single disk drive, /p allows to change the disk
by pausing after you have loaded TOIBM. If you direct output to the
screen (that is to CON), the /m option causes pause at the end of
each screen.

The applied Scandinavian (or rather the Finnish) translation table is
[ \ ] { | }
The /v option adds the following VAX character translations:
<IND> , <SSA> , <CCH> , <SS2> , <SS3> , <X99> ,
The /c option adds the following caret character translations:
^D , ^F , ^T , ^N , ^O , ^Y ,
The /o option adds the following control character translations:
     


UNIX2PC (Ver. 1.2a)  Unix text eolns to PC eolns
===================

UNIX2PC is a true filter for changing Unix end of lines (ascii 10)
to PC end of lines (ascii 13, 10). This kind of filter is useful if
you transfer ascii data from a Unix machine to a PC.

E.g. if you have a text file unix.txt, apply
TYPE UNIX.TXT | UNIX2PC > PC.TXT
   or
UNIX2PC < UNIX.TXT
   or
UNIX2PC < UNIX.TXT > PC.TXT

A test switch can be used for batch programming. UNIX2PC /t returns
errorlevel==1 if the file looks like a non-text file. When the test
switch is on, the conversion will not be made, that is no output
will be produced.

Errorlevel==1 is also returned if the input is not redirected, or if
the MS-DOS version is earlier than 2.0.


U2PC.BAT  Unix eolns to MS-DOS eolns, preserving the date/time stamp
========

The purpose of the U2PC batch is to convert the original Unix
textfile into an MS-DOS textfile, and preserve the date/time stamp
of the file in converting it.

To use U2PC you'll need at least MS-DOS version 3.30, TOUCH.EXE from
my TSUTLB collection and UNIX2PC from this TSFILT collection.

No wildcards allowed.


UNZIPTXT.BAT  Get text files from Unix zips
============

Unzips the files from a Unix Zip file and converts the unzipped text
files into MS-DOS format using U2PC.BAT. Wildcards and path names
allowed.
