[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Responding to calendar requests

From: Robert Elz
Subject: Re: [Nmh-workers] Responding to calendar requests
Date: Thu, 25 Apr 2013 00:37:33 +0700

    Date:        Wed, 24 Apr 2013 11:36:49 -0400
    From:        Ken Hornstein <address@hidden>
    Message-ID:  <address@hidden>

  | I mean, yeah, that would work; that's sorta what I did.  But ... it
  | kinda sucks, doesn't it?  Shouldn't we do better?

I used to do a lot of semi-automated e-mail processing - processing hundreds
of messages a day, sending replies.  Not calendar, nothing anyone here will
have ever seen before (or again) I expect.  But if the calendar format
processing part of it is tractable (I have no idea, never looked) the rest
of it is easy.

I suspect your problem is the "I've always viewed wrappers to programs like
repl as working around deficiencies." attitude - that's wrong - building upon
existing tools is the unix way, and MH has always provided a good base to
build upon for things like this.

Here's one script I used sometime in the ancient past as an example ...

cd $(mhpath +assignments)
ls "$@" | grep '^[1-9]' | sort -n | while read filename
        test -f "$filename" || continue

        echo -n "$filename"
        repl -nowhatnowproc -form replcomps.received +assignments "$filename" &&
        send -nopush -draftf +drafts -draftm last &&
        echo ''

What that's doing is unimportant, and what's in replcomps.received I no
longer remember (I probably don't have it any more) the point is the
basic strategy of using repl to automate processing messages - the
format file could be built on the fly, the draft could have extra processing
done on it after reply has built the basic template (doing the address
processing, etc), ...

As for how to say yes or no (accept or decline) - that could be an arg to
the script (this one takes a set of message numbers, obviously, and
processes them all one after another, in just the same way - which is what
I needed, but wouldn't be useful for your purpose).   Or you could have
different scripts (accept & decline would be suitable names if it is
something that you expect to be doing a lot of).   Whatever is easier.

The point is that wrapper scripts is exactly the right solution for this
kind of task.


ps: oh yes, I remember this one now, it isn't quite as ancient as I thought
(I wondered why I still had just this one script when all the rest seem to
have been relegated to /dev/null) - this one was used more recently to
handle acknowledging receipt of student assignments - they e-mail their
submission, and need to be told it arrived, this script made that easy,
automation was needed given that there tends to be a deluge of submissions
just about the deadline...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]