* BBDB X-Face Gallery maker
@ 1997-06-08 6:36 Andrew J Cosgriff
0 siblings, 0 replies; only message in thread
From: Andrew J Cosgriff @ 1997-06-08 6:36 UTC (permalink / raw)
Cc: Gnus Beta Testers
[-- Attachment #1: Type: text/plain, Size: 245 bytes --]
If you've got the relevant support programs (see comments), here's a
script to snarf all your x-face headers from your bbdb and make a sort
of Rogue's Gallery like GIF out of them all.
suggestions/improvements/etc. welcome :)
Enjoy,
Andrew
[-- Attachment #2: make-x-face-list --]
[-- Type: text/plain, Size: 1898 bytes --]
#! /bin/sh
#
# make-x-face-list.sh - Make a "rogue's gallery" of X-Faces from your BBDB
#
# Author: Andrew J. Cosgriff <ajc@bing.wattle.id.au>
# Created: Sun Jun 8 15:22:42 1997
# Version: $Id: make-x-face-list,v 1.3 1997/06/08 06:35:47 ajc Exp ajc $
# Keywords:
#
########################################
#
### Commentary:
#
# I had one of those random dangerous Ideas. This is the result.
# You'll need the netpbm utilities and possibly a patched uncompface
# (see below). You'll also need the perl bbdb script (see
# http://www.cs.wustl.edu/~seth/projects/bbdb/)
#
### TO DO:
#
# I dunno. Make it look groovier, one way or another.
#
########################################
#
### History:
#
# 1.1 - Initial version
#
########################################
#
### Code:
#
COLMAX=4
TMPPREFIX=/tmp/xface.$$
bbdb -p 'email name lname' -r 'x-face' > $TMPPREFIX.bbdb
exec < $TMPPREFIX.bbdb
# exec < bbdb-out.txt
COL=0
ROW=0
while read email name
do
echo "- $email"
#
# If you haven't patched uncompface to handle -X (for xbm) (you can
# get the patch in the exmh source, at
# ftp://ftp.sunlabs.com/pub/tcl/exmh/), you'll have to change the next line to do
# uncompface | ikon2icon | icontopbm
#
bbdb -p x-face $email | sed -e 's@\\\\@\\@g' | uncompface -X | xbmtopbm > $TMPPREFIX.xface
echo $name | tr '\011' ' ' | pbmtext > $TMPPREFIX.name
pbmtext $email | pnmcat -tb -white $TMPPREFIX.xface $TMPPREFIX.name - > $TMPPREFIX.person
if [ -r "$TMPPREFIX.row$ROW" ]
then
pnmcat -lr $TMPPREFIX.row$ROW $TMPPREFIX.person > $TMPPREFIX.row.new && mv $TMPPREFIX.row.new $TMPPREFIX.row$ROW
else
mv $TMPPREFIX.person $TMPPREFIX.row$ROW
fi
COL=`expr $COL + 1`
if [ "$COL" -ge $COLMAX ]
then
COL=0
ROW=`expr $ROW + 1`
fi
done
pnmcat -tb $TMPPREFIX.row* | ppmtogif -interlace > xfaces.gif;
/bin/rm -f $TMPPREFIX.*
### make-x-face-list.sh ends here
[-- Attachment #3: Type: text/plain, Size: 219 bytes --]
--
- Andrew J. Cosgriff - (read X-headers for more info) ajc@bing.wattle.id.au
I used to be a FUNDAMENTALIST, but then I heard about the HIGH
RADIATION LEVELS and bought an ENCYCLOPEDIA!!
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-06-08 6:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-08 6:36 BBDB X-Face Gallery maker Andrew J Cosgriff
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).