clpg@aluxp.UUCP (munro) (03/12/84)
[last entry may have gotten eaten - sorry if this is a second time for you] [also, thanks for the net.annouce advice about avoiding . on the first line] Has someone written a UNIX shell which would take (an uploaded) Wordstar file, run it through tr, sed, awk, or whatever, and come out with a troff compatible file? I.e., all the Wordstar underlining, superscripts, etc., would be translated into suitable troff commands. This seems like the type of thing Richard Conn could do before his morning coffee. If someone has such a beast, I'd sure like to get a copy. Thanks in advance, David Munro { ...some bighulkingmachine}!ihnp4!aluxp!clpg
david@varian.UUCP (03/14/84)
I have posted to net.sources a locally-written program called ws_nroff.c that does this (sort of). It was written several years ago here for the purpose of moving a few large WordStar files to UNIX and nroff; it was used once and the output fixed up by hand, and all further changes to those files were done on UNIX. The programmer who wrote it is no longer at Varian, but I am in touch with him, and he gave his OK for posting to the net; however, he didn't want his name on it, as it is not a finished product. Folks are welcome to use it as a starting base, and if anyone improves it, please send me the changes, and I'll see that the author gets them as well. The program carries the following caveat: This program is incomplete - many WordStar functions are not handled but just translated to comments - see the code below. In addition, there are problems with un-hyphenating hyphenated words and with indentation. There may be a problem with some cases of underlining. Output generated from this program should be inspected and corrected before feeding to nroff. If folks on the ARPANET who don't receive net.sources are interested, I imagine it could be posted to net.micro as well so that it will show up in INFO-MICRO, but I didn't want to fill up the list with long messages (it's about 500 lines long). If it gets cleaned up enough, it probably should end up on a USENIX tape. David Brown (415) 945-2199 Varian Instruments 2700 Mitchell Dr. Walnut Creek, Ca. 94598 {ihnp4,tektronix,hplabs,sytek,dual}!zehntel!varian!david {amd70,fortune}!varian!david ...!decvax!sytek!zehntel!varian!david ...!ucbvax!menlo70!sytek!zehntel!varian!david