[comp.sys.mac.apps] Unix lines <-> Mac paragraphs converter?

khaw@parcplace.com (Mike Khaw) (12/21/90)

I'm looking for Mac software, preferably free or shareware, that will

- Take a text file imported from Unix and remove the line breaks
between lines in a paragraph. I know how to filter files like this
on the Unix side, but sometimes you get a README or other doc file
as part of a BinHex and it was obviously not done on a Mac. For these
files, it would be much more convenient to be able to massage them
on the Mac instead of having to upload to Unix.

- Do the inverse (sort of); i.e., take a MacWrite or MS-Word doc
saved as TEXT-only, and break up the lines within each paragraph
so that vi won't choke (vi doesn't like lines with more than 256
characters in them).

Recommendations?
-- 
Mike Khaw
ParcPlace Systems, Inc., 1550 Plymouth St., Mountain View, CA 94043
Domain=khaw@parcplace.com, UUCP=...!{uunet,sun,decwrl}!parcplace!khaw

steve@violet.berkeley.edu (Steve Goldfield) (12/21/90)

In article <761@parcplace.com> khaw@parcplace.com (Mike Khaw) writes:
#>I'm looking for Mac software, preferably free or shareware, that will
#>
#>- Take a text file imported from Unix and remove the line breaks
#>between lines in a paragraph. I know how to filter files like this
#>on the Unix side, but sometimes you get a README or other doc file
#>as part of a BinHex and it was obviously not done on a Mac. For these
#>files, it would be much more convenient to be able to massage them
#>on the Mac instead of having to upload to Unix.
#>
#>- Do the inverse (sort of); i.e., take a MacWrite or MS-Word doc
#>saved as TEXT-only, and break up the lines within each paragraph
#>so that vi won't choke (vi doesn't like lines with more than 256
#>characters in them).
#>
#>Recommendations?
#>-- 
#>Mike Khaw
#>ParcPlace Systems, Inc., 1550 Plymouth St., Mountain View, CA 94043
#>Domain=khaw@parcplace.com, UUCP=...!{uunet,sun,decwrl}!parcplace!khaw

WriteNow has this facility built in. It's not free, but
it's the best I've seen.

Steve Goldfield

ramaley@csli.Stanford.EDU (Alan Ramaley) (12/21/90)

In <1990Dec21.003840.13327@agate.berkeley.edu> steve@violet.berkeley.edu (Steve Goldfield) writes:

>In article <761@parcplace.com> khaw@parcplace.com (Mike Khaw) writes:
>#>I'm looking for Mac software, preferably free or shareware, that will
>#>
>#>- Take a text file imported from Unix and remove the line breaks
>#>between lines in a paragraph...

Hmm.  I don't know of any really good way to do this.  In Microsoft Word 4.0 you can do a global "replace <return> with nothing", and that will kill all the returns.  Better a drastic solution than none at all, sez I.

>#>- Do the inverse (sort of); i.e., take a MacWrite or MS-Word doc
>#>saved as TEXT-only, and break up the lines within each paragraph
>#>so that vi won't choke (vi doesn't like lines with more than 256
>#>characters in them).

>WriteNow has this facility built in. It's not free, but
>it's the best I've seen.

>Steve Goldfield

You can do the same in Microsoft Word 4.0.  When you do your "save
as...", click on the options box (or maybe formats); you can specify
"text with line breaks", which chunks your text into lines exactly as
you've formatted it.

--Alan

lriggins@blackbird.afit.af.mil (L. Maurice Riggins) (12/21/90)

In article <761@parcplace.com> khaw@parcplace.com (Mike Khaw) writes:
|I'm looking for Mac software, preferably free or shareware, that will
 
|- Take a text file imported from Unix and remove the line breaks
|between lines in a paragraph. 

McSink will do this.

|- Do the inverse (sort of); i.e., take a MacWrite or MS-Word doc
|saved as TEXT-only, and break up the lines within each paragraph
|so that vi won't choke (vi doesn't like lines with more than 256
|characters in them).

McSink will do this also.  So will many word-processors.  With Microsoft
Works, for example, if you hold down the Option key while selecting
File -> Save As... [Text option checked], Works will put a CR at the end
of each line instead of just at the end of each paragraph.  Don't know
about other WP's
 
|Recommendations?

Yeah, McSink 6.5/7.0 or the latest commercial version, "Vantage."
The next line describes what it can't do with a text file:



-- 
Maurice      INTERNET:    lriggins@blackbird.afit.af.mil (129.92.1.2)

      Opinions expressed here do not reflect those of my employer nor
      constitute an official position of any U.S.Government agency.

clouds@ccwf.cc.utexas.edu (Kathy Strong) (12/21/90)

In article <761@parcplace.com> khaw@parcplace.com (Mike Khaw) writes:
>I'm looking for Mac software, preferably free or shareware, that will
>
>- Take a text file imported from Unix and remove the line breaks
>between lines in a paragraph...
>
>- Do the inverse (sort of); i.e., take a MacWrite or MS-Word doc
>saved as TEXT-only, and break up the lines within each paragraph
>so that vi won't choke (vi doesn't like lines with more than 256
>characters in them).
>
There's a really terrific little program called Add/Strip 2.0 that was
written specifically to clean up inter-platform text files. It will delete
CRs at ends of lines while leaving double CRs intact. It will strip or
add LFs. It'll turn X spaces into a tab, or tabs into X space. It'll strip
ASCII 0-8. It'll strip the high bit from WordStar documents (anyone remember
WS?) It'll strip trailing and/or leading spaces. It'll force lines to a
certain length without breaking words. It'll let you specify up to three 
additional replacements per operation. It even does case conversion, 
curly quotes, ellipses, and em-dashes. In short, it rules okay.

I have always been under the impression that this was shareware/PD... but
looking in the "About..." box, I don't see anything to that effect <blush!>
It's by Jon Wind of West Publishing Company. No address given; it's
dated 9/25/87. This little application (38K) is a real gem; I use it
all the time--does anyone know more about its provenance?

-- 
...........................................................................
:   Kathy Strong               :  "Try our Hubble-Rita: just one shot,     :
:  (Clouds moving slowly)      :   and everything's blurry"                :
:   clouds@ccwf.cc.utexas.edu  :                           --El Arroyo     :
:..........................................................................:

oberst@rumah.UUCP (Daniel J. Oberst) (12/21/90)

In article <16963@csli.Stanford.EDU>, ramaley@csli.Stanford.EDU (Alan Ramaley) writes:
> Hmm.  I don't know of any really good way to do this.  In Microsoft Word 4.0 
> you can do a global "replace <return> with nothing", and that will kill all 
> the returns.  Better a drastic solution than none at all, sez I.
Try this with any word processor:

Globally replace all <return><return> with a string like "PPPPP"
then replace all <return> with nothing, then replace "PPPPP" with
<return>.

McSink or its commercial version Vantage as well as MacIfy will also
handle these sorts of problems.

-----------------------------------------------------------------------
Dan Oberst
Cikgu Din di rumah ku.
'Dok buat guapa, Mat Salleh?

Garance_Drosehn@mts.rpi.edu (Garance Drosehn) (12/22/90)

In article <761@parcplace.com> khaw@parcplace.com (Mike Khaw) writes:
> I'm looking for Mac software, preferably free or shareware, that will
> 
> - Take a text file imported from Unix and remove the line breaks
> between lines in a paragraph. I know how to filter files like this
> on the Unix side, but sometimes you get a README or other doc file
> as part of a BinHex and it was obviously not done on a Mac. For these
> files, it would be much more convenient to be able to massage them
> on the Mac instead of having to upload to Unix.
> 
> - Do the inverse (sort of); i.e., take a MacWrite or MS-Word doc
> saved as TEXT-only, and break up the lines within each paragraph
> so that vi won't choke (vi doesn't like lines with more than 256
> characters in them).

For the second one, there's a DA called miniWRITER can do this.  It's 
shareware (cost is all of $12), and the current version is 1.6.  Or at 
least *my* version is 1.6, and I think that's current...  :-)

You can do that under the "Modify" option in the miniWRITER menu.  For the 
first thing you requested there's another option in the Modify that looks 
like it might do what you want (it says "Remove Returns"), but I've never 
tried it and I'm not sure it's exactly what you want.

Garance_Drosehn@mts.rpi.edu

lenh@isc-br.ISC-BR.COM (Len Humbird) (12/23/90)

>In article <761@parcplace.com> khaw@parcplace.com (Mike Khaw) writes:
...
>There's a really terrific little program called Add/Strip 2.0 

I remember this little baby. It's back in my *dusty* collection! It did 
the one thing but did it very well. A trubute to good program spec-ing.

This would be fine, but if you think you;ll need the kitchen sink, try 
McWherter's McSink DA.-- 
Len Humbird          | internet:  lenh@isc-br.com       | Phone:  509 927-5600
Technical  Writer    | uunet:     uucp!isc-br!lenh      | by land: Box TAF-C8
ISC-Bunker Ramo Corp.| compuserv: >INTERNET:lenh@isc-br |    Spokane, WA 99220
This company for rent| applelink: lenh@isc-br@internet# | flames: /dev/null