Re: Suse 10.2- lost X server



Vahis wrote:

http://www.science.uva.nl/~robbert/zappa/quote/

I wonder if a random output from there could be pasted to a sig?

First you must clean up the 'database' and understand that what you get
will be plain text, so get rid of all the HTML stuff, like <BR>

Next you need to determine what way to go. You can use the program
'fortune' which means you must make a dat file, but it also means you
can use an already well known program. Once you have made the .dat file,
you can run it like `fortune zappa` or `fortune -s zappa` to have a sig
that is no longer then 4 lines.

Next you can use the perl script to add the signature. You can do this
also in several ways. The easy way out is to have crontab edit the
signature file you are actualy using. That is what I do. Each day at
00:00 a new signature is copied.
The script I use is:
DIR=/home/houghi/.signature
FILE=$DIR/sig.slrn
DATE=`date +%d`
rm $FILE
ln -s $FILE.$DATE $FILE

Yeah, I know, it could have been written in a oneliner like
ln -fs ~/signature/sig.slrn.`date +%d` ~/signature/sig.slrn

Yet that is not random. To do that, you an use also the perl script that
comes with it on the page you gave me.

The trick however is not so much as to show the random quote. That you
can do with both fortune, once you made the file into a fortune
database, with the perl script, with something you made yourself or with
whetever.

The trick is in showing a random one each time you need it. This will
depend on the newsreaders ability. Some newsreaders happily accept a
program as a signature file. Then you just point to that program and you
are done. Very easy to use `fortune -s zappa` that way.

However there are programs that only accept a file as input. Then it
becomes a bit tricker. What you need is (and here people are going to
correct me and tell me how it is done for real. I never got the hang of
it.) a named pipe.

http://www2.linuxjournal.com/article/2156
http://debid.vlsm.org/share/LDP/abs/html/contributed-scripts.html#FIFO
and most likely a lot of other places. Basicaly it is a file that
re-fills with new data once you have read it

houghi
--
Let's not be too tough on our own ignorance. It's the thing that makes
America great. If America weren't incomparably ignorant, how could we
have tolerated the last eight years? -- Frank Zappa, in 1988
.



Relevant Pages

  • Re: Suse 10.2- lost X server
    ... First you must clean up the 'database' and understand that what you get ... you can run it like `fortune zappa` or `fortune -s zappa` to have a sig ... Next you can use the perl script to add the signature. ... signature file you are actualy using. ...
    (alt.os.linux.suse)
  • Re: Help me out with a mailing lsit manager
    ... from a pre-created database. ... IIRC you can set up custom "sayings" databases in fortune so you can ... 'messages' (Knowledge Base articles) need to be fully HTML formatted ... with a suggestion yet). ...
    (uk.comp.os.linux)
  • Re: multiple users simultaneous access to a MS Access database
    ... James A. Fortune wrote: ... the wording somewhere, but I thought it prudent to ask: ... Is the database application split into Front End / Back End or is ...
    (comp.databases.ms-access)
  • Re: multiple users simultaneous access to a MS Access database
    ... James A. Fortune wrote: ... wording somewhere, but I thought it prudent to ask: ... Is the database application split into Front End / Back End or is ...
    (comp.databases.ms-access)
  • Re: motd question
    ... You could make it a FIFO and put a Perl script or something at the ... would generate a `fortune' message every time someone read motd. ...
    (freebsd-questions)