Post Reply 
LIF<->TEXT perl utilities
05-16-2015, 10:13 PM
Post: #1
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).


.zip  lifperlutils.zip (Size: 2.15 KB / Downloads: 14)
Find all posts by this user
Quote this message in a reply
01-19-2017, 08:44 PM
Post: #2
RE: LIF<->TEXT perl utilities
(05-16-2015 10:13 PM)cruff Wrote:  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).
Hi,

I found your programs on this forum - but no idea how to use them. I have a Macbook Pro. It seems that this would be a simple version for converting Basic files in text instead of doing this with the transform program on the HP71. I'm right? Can you give me a practical example please? I tried some variations but not successful maybe I misunderstand the syntax.

best regards
Erwin
Find all posts by this user
Quote this message in a reply
01-20-2017, 10:50 PM
Post: #3
RE: LIF<->TEXT perl utilities
(01-19-2017 08:44 PM)Erwin Wrote:  I found your programs on this forum - but no idea how to use them. I have a Macbook Pro. It seems that this would be a simple version for converting Basic files in text instead of doing this with the transform program on the HP71. I'm right? Can you give me a practical example please? I tried some variations but not successful maybe I misunderstand the syntax.

I thought these were like the LIFUTILS liftext and textlif.
https://rawgit.com/bug400/lifutils/maste...eadme.html
Find all posts by this user
Quote this message in a reply
01-21-2017, 07:49 PM
Post: #4
RE: LIF<->TEXT perl utilities
(01-19-2017 08:44 PM)Erwin Wrote:  It seems that this would be a simple version for converting Basic files in text instead of doing this with the transform program on the HP71.

As Dave said, all they do is transform a Unix text file to or from the LIF text file format. They do not perform tokenization/detokenization of Basic programs. If you have a Basic program on your Mac, you could use text2lif to produce the LIF text file equivalent, which you could place in your 71B, but then the 71B will still need to perform the transformation.

Take a look at this thread about how I used them to transfer files.
Find all posts by this user
Quote this message in a reply
01-21-2017, 08:03 PM
Post: #5
RE: LIF<->TEXT perl utilities
(01-21-2017 07:49 PM)cruff Wrote:  
(01-19-2017 08:44 PM)Erwin Wrote:  It seems that this would be a simple version for converting Basic files in text instead of doing this with the transform program on the HP71.

As Dave said, all they do is transform a Unix text file to or from the LIF text file format. They do not perform tokenization/detokenization of Basic programs. If you have a Basic program on your Mac, you could use text2lif to produce the LIF text file equivalent, which you could place in your 71B, but then the 71B will still need to perform the transformation.

Take a look at this thread about how I used them to transfer files.

Thank you both, very interesting the other thread ... playing around with my FRAM71B too :-) but for now I write on a calibration program for the 3421A DATA-ACQ (actual only partly solved).

regards Erwin
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)