[comp.sys.mac] WANTED: Program to translate Mac generic text to UNIX text

bushnel@ucscb.UCSC.EDU (60163000) (07/28/88)

Help:
        I need a utility (Mac or UNIX, but Mac preferred) that translates a
generic text file on the Macintosh to a file I can use in UNIX.  One nice
thing about the Mac is that it has a smart auto-wraparound so that I don't
have to hit "return" at the end of every line; the Mac takes care of that
automatically, without splitting up words.  Unfortunately, while vi has
auto-wraparound, it doesn't keep the words together.  If I try copying a
text file from the Mac directly to UNIX, each paragraph ends up as one line
in vi with the wraparound chopping words in half or worse.  A friend of
mine, running Bitcom on his XT-clone is always complaining that he loses
everything past 80 characters when I mail him messages typed on my Mac.
         I tried writing a short Pascal program to insert a real carriage
return or new-line character in place of the last white-space before the
right margin, but I gave up after I realized that it wasn't a trivial problem.
If anyone has a PD or Shareware program which does this, I would be most
appreciative.  I'm surprised this problem hasn't been mentioned before.  Have
I missed something?

				Bill Bushnell


		bushnel@ucscb.UCSC.EDU	(Bill Bushnell)

walter@garth.UUCP (Walter Bays) (07/29/88)

In article <4314@saturn.ucsc.edu> bushnel@ucscb.UCSC.EDU (Bill Bushnell) writes:
> I need a utility (Mac or UNIX, but Mac preferred) that translates a
> generic text file on the Macintosh to a file I can use in UNIX.  If I
> try copying a text file from the Mac directly to UNIX, each paragraph
> ends up as one line...

1) There's an option on many terminal emulators to wordwrap text lines
   uploaded.  Doesn't work with Kermit or XMODEM, or if you have the
   wrong emulator.
2) Use the "fmt" filter on UNIX.
-- 
------------------------------------------------------------------------------
My opinions are my own.  Objects in mirror are closer than they appear.
E-Mail route: ...!pyramid!garth!walter		(415) 852-2384
USPS: Intergraph APD, 2400 Geng Road, Palo Alto, California 94303
------------------------------------------------------------------------------

edmoy@violet.berkeley.edu (07/29/88)

In article <4314@saturn.ucsc.edu> bushnel@ucscb.UCSC.EDU (Bill Bushnell) writes:
>Help:
>        I need a utility (Mac or UNIX, but Mac preferred) that translates a
>generic text file on the Macintosh to a file I can use in UNIX.  One nice
>thing about the Mac is that it has a smart auto-wraparound so that I don't
>have to hit "return" at the end of every line; the Mac takes care of that
>automatically, without splitting up words.  Unfortunately, while vi has
>auto-wraparound, it doesn't keep the words together.  If I try copying a
>text file from the Mac directly to UNIX, each paragraph ends up as one line
>in vi with the wraparound chopping words in half or worse.  A friend of
>mine, running Bitcom on his XT-clone is always complaining that he loses
>everything past 80 characters when I mail him messages typed on my Mac.

There's a program that does exactly this.  It's called "Add/Strip", the
latest I've seen is version 2.12.  It is available from Compu$erve and
GEnie, or from the author (with source code in Turbo Pascal) for $6 ($5
if you supply the disk).  The address is:

	Jon Wind (A/S 2.12)
	7180 Montrose Road
	Woodbury, MN  55125

It's a handly program and well worht having.

Edward Moy				Principal Programmer - Macintosh & Unix
Workstation Support Services		Workstation Software Support Group
University of California
Berkeley, CA  94720

edmoy@violet.Berkeley.EDU
ucbvax!violet!edmoy

rdp@pbseps.UUCP (Richard Perlman) (07/29/88)

>In article <4314@saturn.ucsc.edu> bushnel@ucscb.UCSC.EDU (Bill Bushnell) writes:
>        I need a utility (Mac or UNIX, but Mac preferred) that translates a
>generic text file on the Macintosh to a file I can use in UNIX.  One nice
>thing about the Mac is that it has a smart auto-wraparound so that I don't
>have to hit "return" at the end of every line; the Mac takes care of that
>automatically, without splitting up words.  
>[etc, etc]

Try copying your document to the clipboard from inside your WP
program.  Then go on-line, start up vi and paste (send) the 
clipboard.  This works in VersaTerm and MacTerminal, I'm sure
other programs support it too.

A cleaner way is to enter the following UNIX command line:

stty -echo
cat > file_name
[paste clipboard contents]
^D
stty echo
vi file_name

You could easily build a shell for this, and if your Mac terminal
emulation program allows, even start the transfer procedure by
sending the correct escape sequence to the Mac.

BTW, this also works great with DG's CEO word processing.

-- 
Richard Perlman * pbseps!rdp@PacBell.COM || {ames,sun,att}!pacbell!pbseps!rdp
180 New Montgomery St. rm 602,  San Francisco, CA  94105  |*|  (415) 545-0233

rudolph@intelisc.UUCP (David Rudolph) (07/30/88)

In article <12695@agate.BERKELEY.EDU> edmoy@violet.berkeley.edu writes:
>In article <4314@saturn.ucsc.edu> bushnel@ucscb.UCSC.EDU (Bill Bushnell) writes:
>>Help:
>>        I need a utility (Mac or UNIX, but Mac preferred) that translates a
>>generic text file on the Macintosh to a file I can use in UNIX.  One nice
>>thing about the Mac is that it has a smart auto-wraparound so that I don't
>>have to hit "return" at the end of every line; the Mac takes care of that
>>automatically, without splitting up words.  Unfortunately, while vi has
>>auto-wraparound, it doesn't keep the words together.  If I try copying a
>>text file from the Mac directly to UNIX, each paragraph ends up as one line
>>in vi with the wraparound chopping words in half or worse.  A friend of
>>mine, running Bitcom on his XT-clone is always complaining that he loses
>>everything past 80 characters when I mail him messages typed on my Mac.
>
>There's a program that does exactly this.  It's called "Add/Strip", the
>latest I've seen is version 2.12.  It is available from Compu$erve and
>GEnie, or from the author (with source code in Turbo Pascal) for $6 ($5
>if you supply the disk).  The address is:
>
>	Jon Wind (A/S 2.12)
>	7180 Montrose Road
>	Woodbury, MN  55125
>
>It's a handly program and well worht having.

Or for a free solution, first upload to the Unix system, then run the file
throught "fmt" before going into vi.  This will give you lines with a max of
72 characters.  The only problem is that paragraphs must have 2 carriage
returns between them or they will be joined.
-- 
David Rudolph           CSnet: rudolph%isc.intel.com