Subject: Re: Anyone have Reply-To patch?

From: "Gregory J. Atchity" <[email-masked]>
Date: Fri, 4 Mar 1994 12:47:21 -0600 (CST)

On Fri, 4 Mar 1994, David L Miller wrote:
> may well come as a side-effect of IMSP support.  Anything else you need?

   David, I really appreciate your incredibly prompt and curteous reply!
I imagine it is a bit disheartening to software developers when their
users always write in and say "I don't like this!" and "Why didn't you do
that?", as I myself have been known to do from time to time.  Your
enthusiasm is great.

   Thanks for the hint on the user-domain, that solves my problem nicely.

   And as for the addressbook, well, I have always kept and will continue
to keep one file with email, postal, and telephone information.  However,
I have no problem with keeping a separate addressbook and then converting
to what the mail program can use, that's what I've been doing.  That means
I cannot use the 'take address' feature of Pine, of course.

   My current vision of a 'perfect' addressbook is be one that:
- is a text file (Pine's is)
- is never sorted.  Mailer only modifies it by adding at the end.
    (ELM's is not sorted)
- has comments begin with '#' character. (ELM uses #)
- does NOT use a single tab or space as a separator.  Pine's single
    tabs make the addressbook ugly and hard to read.  (ELM's '=' is fine).

   I've recently rewritten the shell script I use to convert from ELM
addressbook format to .mailrc, and now to Pine's .addressbook.  I've
attached it in case anyone else would care to use it.  I won't guarantee
it'll work for everyone else, but it works great for me.  It requires an
'awk' program and 'sed'.

---
Greg Atchity ([email-masked] and [email-masked])
Iowa State University and Ames Laboratory - USDOE

#!/bin/csh
# Would run more efficiently under perl.

# Shell script to update my addresses in several formats
# Note it will completely overrwrite existing addressbooks/.mailrc
#
# ELM format:  <alias>  =  <name>  = <address1>, <address2>, ...
# PINE format: <alias> <tab> <name> <tab> <address>
#           or <alias> <tab> <name> <tab> ( <address1>, <address2>, ... )
# Mail format: alias <alias> <address1> <address2> ...
#
# ELM lets you continue if ending in comma. Pine lets you continue until ')'.
# Mail requires you use a continuation character '\'

# My input format is ELM
set input = ~/addresses
echo Source file: $input

# Requires Awk and Sed.  Plain old Awk will work fine.
set AWK=awk

# Stage 1: Update Elm list
set output = ~/.elm/aliases.text
echo Updating ELM aliases: $output
echo "# ELM alias file" > $output
echo "# Updated with $0 on `date`" >> $output
echo "#from $input" >> $output
echo "# Do NOT modify this file, modify $input and run $0" >> $output
echo "#" >> $output
cat $input >> $output
newalias

# Stage 2: Update Pine list
set output = ~/.addressbook
echo Updating PINE aliases: $output
echo "# PINE alias file" > $output
echo "# Updated with $0 on `date`" >> $output
echo "# from $input" >> $output
echo "# Do NOT modify this file, modify $input and run $0" >> $output
echo "#" >> $output
cat $input | \
    sed -e "s/  */ /g" \
        -e "s/ = /	/g" \
        -e "s/= /	/g" \
    | \
    $AWK ' \
        /^$/ {next} \
        /^#/ {next} \
        /,$/ {printf("%s",$0);next }  \
        { printf("%s\n",$0) } \
        '  \
    | \
    $AWK -F'	' ' \
        $3 ~ /,/ { \
           printf("%s\t%s\t\(%s\)\n",$1,$2,$3) \
           next \
        }  \
        { print $0 } \
' >> $output

# Stage 3: Update Mail aliases
set output = ~/.mailrc
echo Updating Mail aliases: $output
echo "# Mail alias file" > $output
echo "# Updated with $0 on `date`" >> $output
echo "# from $input" >> $output
echo "# Do NOT modify this file, modify $input and run $0" >> $output
echo "#" >> $output
cat $input | \
    sed -e "s/  */ /g" \
        -e "s/ = /	/g" \
        -e "s/= /	/g"  \
    | \
    $AWK ' \
        /^$/ {next} \
        /^#/ {next} \
        /,$/ {printf("%s",$0);next }  \
        { printf("%s\n",$0) } \
        '  \
    | \
    $AWK -F'	' '  \
      {printf("alias %14s %s\n",$1,$3)}' \
    | sed -e "s/, / /g" -e "s/,/ /g" \
>> $output

---

From: David L Miller <[email-masked]>
Date: Fri, 4 Mar 1994 11:45:48 -0800 (PST)

Greg,

The current proposed c-client API for IMSP (aren't acronyms wonderful ;)
includes driver-based addressbook support, much like the current mailbox
drivers.  This means that it will be quite easy for someone to write
additional drivers for other addressbook formats, like .mailrc, ELM, etc. 

Thanks for the scripts!  

--DLM

|\ |  |\/|  David L. Miller    [email-masked]  (206) 685-6240
|/ |_ |  |  Software Engineer, Pine Development Team   (206) 685-4045 (FAX)
University of Washington, Networks & Distributed Computing
4545 15th Ave NE, Seattle WA 98105, USA