Is there a program ?

Showing 1-2 of 2 messages
Is there a program ? Grant Mason 10/5/90 6:28 PM

Does anyone out there have a Unix or C program which can 'interrogate' the
actor/actress files?
What I want to be able to do is to type in an actor/actress' name and get out
a list of all the
films which they appeared in.   Similarly, typing in a film name would give a
list of all the
actors/actresses who were in that film.

Can anybody help ?  I'm not a programmer, so doing this myself is
impossible.....
If you can, please e-mail me directly (see below).

Cheers,

Grant


------------------------------------------------------------------------------
-
Grant Mason                           | " I used to wake Grant up with a
Centre for Speech Technology Research | crowbar on the back of the head. But
University of Edinburgh               | I recently found that this was too
far
80 South Bridge                       | from his brain and I wasn't getting
EDINBURGH                             | through to him any more. So now I
wake
--------------------------------------| him with a steel peg driven into his
 If I die tomorrow, does my mother    | skull with a mallet. "
 get a refund ??                      |
------------------------------------------------------------------------------
-
JANET : grant@uk.ac.ed.cstr   ARPA : grant%...@nsfnet-relay.ac.uk
UUCP : ...!uunet!mcsun!cstr!grant
------------------------------------------------------------------------------
-

Is there a program ? Colin Needham 10/8/90 3:31 AM
gr...@cstr.ed.ac.uk (Grant Mason) writes:
> Does anyone out there have a Unix or C program which can 'interrogate' the
> actor/actress files? What I want to be able to do is to type in an
> actor/actress' name and get out a list of all the films which they appeared
> in.  Similarly, typing in a film name would give a list of all the
> actors/actresses who were in that film.

> Can anybody help ?  I'm not a programmer, so doing this myself is impossible.

Well I can't provide you with exactly what you want, but I have a Unix
script which might be of some use. It is included at the end of
this posting as a shell archive. I use it as part of the process of
incorporating changes in the actors list.

Note: I am posting this message rather than mailing to give others the
opportunity of experimenting with the script. I am willing to act as a
coordinator if anyone has any suggestions or working programs.

The script (called 'explist') takes a list file as an argument and produces
what I term a list database on the standard output. The format of a list
database is simply:

 <name>|<title>

To get the kind of functionality you require, run the script over the various
lists and concatenate the databases into one file. The combined database
can then be searched using 'grep', 'awk' or some other text processor. It
shouldn't take too much effort to add a simple user interface to request
a name or title and format the output.

There is one problem with the script: the actress list has to be edited
before it is processed. The name fields for "Mary Elizabeth Mastrantonio"
and "Cassandra Peterson (aka Elivira)" occupy two lines and need to be
shortened (I suggest to "Mary Mastrantonio" and "Cassandra Peterson").
Also each of the following titles are split over two lines and should be
joined on to one:

"Adventures of Buckaroo Banzai Across the Eigth Dimension, The"
"Bionic Showdown: The Six Million Dollar Man and the Bionic Woman (TV)"
"End of the World in Our Usual Bed in a Night Full of Rain, The"
"Dealing: or The Berkley-to-Boston Forty-Brick Lost-Bag Blues"

The other lists do not split long titles and hence can be processed as
published.

Hope this helps,

Col

------------------------------------------------------------
"Look at it this way, in a hundred years who's gonna care ?"
   -- The Terminator
------------------------------------------------------------
Col Needham                |  Phone: +44 272 799910 x 24131
HP Labs                    |  c...@hplb.hpl.hp.com
Bristol                    |  c...@hplabs.hpl.hp.com
U.K.                       |  c...@otter.hpl.hp.com
------------------------------------------------------------

#---------------------------------- cut here ----------------------------------
# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by Colin Needham <cn@otter> on Sun Oct  7 22:40:55 1990
#
# This archive contains:
#        explist        
#
# Error checking via wc(1) will be performed.

LANG=""; export LANG
PATH=/bin:/usr/bin:$PATH; export PATH

echo x - explist
cat >explist <<'@EOF'
#!/bin/sh

# Author: Col Needham
#
# Usage: explist <list>
#
# Purpose: read in a list & produce a list database on the standard output

expand $1 | awk '/^[A-Z]/ {s1=substr($0,1,24)} /^[A-Z\t ]/ {print s1 "|" substr($0,25,80)}' | sed -e 's/ *|/|/' | grep -v '|$'
@EOF
set `wc -lwc <explist`
if test $1$2$3 != 947264
then
        echo ERROR: wc results of explist are $* should be 9 47 264
fi

chmod 777 explist

exit 0