LIF<->TEXT perl utilities
05-16-2015, 10:13 PM
Post: #1
 cruff Member Posts: 159 Joined: Dec 2013
LIF<->TEXT perl utilities
I wrote these two conversion perl scripts to aid playing with my 71B and its new FRAM71. I have tested these on OS X, and they should run on Linux or other Unix platforms without change. Windows users may need to add an appropriate binmode setting, which I can't test as I "don't do Windows". :-)

This first one is text2lif, which takes a Unix style file and converts it to a TEXT LIF file. The command line synopsis is:
Code:
text2lif  [-o outfile] [-s suffix] file [...]

The second is lif2text, which does the reverse. The command line synopsis is:
Code:
lif2text [-o outfile] [-s suffix] file [...]

For both, if outfile is "-", the output is written to stdout. By default, text2lif will add a '.t71' suffix, unless overridden with the -s option. By default, lif2text will strip the suffix if the input file has one, otherwise will add a suffix, either '.txt' or the one specified by the -s option. Both will attempt to not clobber the input file(s).