No Next Item No Next Conference Can't Favor Can't Forget Item List Conference Home Entrance    Help
View Responses


Grex Info Item 128: Looking for the format for the "fortune" database
Entered by popcorn on Thu Mar 24 15:44:53 UTC 1994:

This item text has been erased.

25 responses total.



#1 of 25 by kami on Thu Mar 24 19:03:54 1994:

I didn't know about he "fortune" program.  How does it work?


#2 of 25 by remmers on Thu Mar 24 19:09:25 1994:

If it uses the same format as the fortune program on my linux system,
the fortune data file has a header structure that's a table of offsets
for the various fortune strings.  This is to enable random access to
the strings.

There is a program called "strfile" that creates such a data file from
a plain ascii file containing the strings.  The program doesn't seem to
be on grex, and I don't have source, but I imagine it can be ftp'd from
somewhere.


#3 of 25 by remmers on Thu Mar 24 19:09:58 1994:

(kami slipped in.  Type  !fortune  at the next prompt.)


#4 of 25 by popcorn on Fri Mar 25 12:20:44 1994:

This response has been erased.



#5 of 25 by popcorn on Fri Mar 25 12:21:31 1994:

This response has been erased.



#6 of 25 by popcorn on Fri Mar 25 12:28:02 1994:

This response has been erased.



#7 of 25 by rcurl on Fri Mar 25 14:40:22 1994:

I've always tried to live by that prescription.


#8 of 25 by popcorn on Sat May 7 22:53:38 1994:

This response has been erased.



#9 of 25 by remmers on Mon May 9 00:26:36 1994:

Re-read my response #2.


#10 of 25 by popcorn on Mon May 9 11:05:19 1994:

This response has been erased.



#11 of 25 by remmers on Mon May 9 15:01:11 1994:

An archie search turned up gatekeeper.dec.com:
/contrib/src/dco/fortune/src/strfile.


#12 of 25 by popcorn on Tue May 10 02:09:12 1994:

This response has been erased.



#13 of 25 by orinoco on Wed Apr 12 23:54:17 1995:

if you're still looking, popcorn, i *finally* got it compiled (thanx to remmers
for help) .... try !/u/orinoco/strfile to run it....


#14 of 25 by orinoco on Wed Apr 12 23:59:38 1995:

...just a few questions......one, what do you use as a delimiter between
strings, and two, how do you *run* the durn thing after you've changed your
file into 1's and 0's?


#15 of 25 by orinoco on Thu Apr 13 00:28:01 1995:

Ok, i'm back again, answering my own questions.
According to a comment in the uncompiled program, you use two consecutive
linesconsisting of just a % as a delimiter.   But i tried that, and it diedn't
work.  Rather, when I tried to run !fortune using my file, it just gave me the
whole file in one chunck, %'s and all.


#16 of 25 by scg on Thu Apr 13 00:58:16 1995:

What does strfile do?


#17 of 25 by davel on Thu Apr 13 01:43:38 1995:

(Valerie's conscientious about FWing, & I'm pretty sure she reads *everything*
here.)

I took a glance at that comment, & I think you've got it wrong.  The
delimiter is any line beginning with two %s, if I understand it.


#18 of 25 by anemone on Thu Apr 13 17:29:45 1995:

yeah, what *does* strfile do?


#19 of 25 by popcorn on Fri Apr 14 05:02:00 1995:

This response has been erased.



#20 of 25 by orinoco on Sat Apr 15 19:41:17 1995:

no, a line beginning w/two %'s doesn't work either.


#21 of 25 by davel on Sun Apr 16 21:38:28 1995:

Daniel, I tried compiling, setting up a test file, & running.  The
message from strfile appears to indicate that it did in fact use
lines beginning %% as delimiters (the string count & that "shortest string"
message fits this).  I tried running fortune on my file, & got the
results you report, though.  I suspect that fortune expects some kind
of format for the strings it uses, since its options include things like
"offensive fortunes only" etc., but I don't have any inside info.


#22 of 25 by popcorn on Mon Apr 17 13:40:33 1995:

This response has been erased.



#23 of 25 by davel on Tue Apr 18 01:36:01 1995:

There seems to be just one, according to the man & according to what
seems to be in the games/lib dir - but the others could be hidden.
However, I really do think that this is likely given what happens.  I
could well be wrong.

Somewhere we must have the source for fortune, surely?  Not that *I*
want to go digging through it!


#24 of 25 by orinoco on Thu Apr 20 01:40:33 1995:

yeah..source file is /usr/local/grexsrc/strfile/strfile.c....compiled version
is /home/orinoco/strfile


#25 of 25 by davel on Thu Apr 20 12:15:27 1995:

Nope, Daniel, I meant the source for fortune.  I glanced through the source
for strfile, but I don't want to dig into it too much, either.

Response not possible - You must register and login before posting.

No Next Item No Next Conference Can't Favor Can't Forget Item List Conference Home Entrance    Help

- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss