Re: How to convert plain ASCII text file to RTF?

From: tinyurl.com/uh3t (rem642b_at_Yahoo.Com)
Date: 01/01/05


Date: Sat, 01 Jan 2005 12:26:34 -0800


> From: Lars Eighner <eighner@io.com>
> > ... I tried:
> > % tar x text2rtf.tar
> > tar: /dev/sa0: Cannot open: Permission denied
> you're telling it to make a tape archive of file x and file
> text2rtf.tar

Hmm, I was just trying to adapt the example in the man pages:
     To extract all the C sources and headers from an archive named
     backup.tar, type
           tar xf backup.tar '*.[ch]'
Notice there's no - before the xf there. Is there some reason why no -
is needed there but it's needed to do what I want? Or is that a typo in
the man pages?

> when you alread have ungzipped it you can
> tar -xvf somefile.tar

OK, here's what I did thanks to your help:
% tar -xvf text2rtf.tar
text2rtf.folder/
text2rtf.folder/.DS_Store
text2rtf.folder/COPYING.txt
text2rtf.folder/main.c
text2rtf.folder/makefile
text2rtf.folder/README.txt
Then I copied the command line from the makefile to the shell, which
worked, then ran the compiled program with stdin and stdout redirected,
and it seemed to work. So as Steven J Masta said earlier, it just puts
a header at the top, puts /par before each line (making each line of
text a separate paragraph, bletch but I can manually remove some of
them to make it a little less ugly), and } at the end.

Now before I start messing with the rtf syntax, I wonder if there's any
program on FreeBSD Unix that will let me view a RTF file rendered over
a VT100 dialup, or alternately if there's any program on my RedHat
GNOME Linux laptop that would let me view the rendered file.



Relevant Pages

  • Re: FasterCSV - varying headers
    ... user's headers as if they followed my original specifications exactly. ... 2: Product Price ... # The following is a simple menu selection for columns. ... puts "d: Done" ...
    (comp.lang.ruby)
  • Re: Tcl - Soap - Loosing My Mind
    ... (See XML Output) ... lappend headers SOAPAction PAASServer:SimpleEcho ... append xml $soapyxml ... puts "@@@@@@@@@@@@5 XML@@@@@@@@@@@@@@@@@@@@@@" ...
    (comp.lang.tcl)
  • Tcl - Soap - Loosing My Mind
    ... (See XML Output) ... lappend headers SOAPAction PAASServer:SimpleEcho ... append xml $soapyxml ... puts "@@@@@@@@@@@@5 XML@@@@@@@@@@@@@@@@@@@@@@" ...
    (comp.lang.tcl)
  • FasterCSV - varying headers
    ... programming in general. ... user's headers as if they followed my original specifications exactly. ... attr_accessor:clientid ... puts "What is the client ID?" ...
    (comp.lang.ruby)
  • Re: Oh nugger
    ... >sleepers and "proper" old gooey tarry ones. ... It's not so much the tar that puts me off them but the thought of ...
    (uk.media.radio.archers)