Re: Automated handling of attached files with souper/yarn

Jon Duckworth (jond@biddeford.com)
Sat, 24 Aug 1996 01:07:38 -0400

-----BEGIN PGP SIGNED MESSAGE-----

Here in lists.yarn-list,
in article <BYQHy0r1J8zR089yn@ccs.covici.com>,
covici@ccs.covici.com (John Covici) wrote:
>on Wed, 21 Aug 1996 18:13:35 -0700 dsparks@pobox.com (Dave Sparks) in
></Q7GyYD2igMN091yn@pobox.com> wrote:
[. . .]
>>I'm looking for a way to automate the process. Currently I use
>>souper to get my mail and Yarn to process it. What I was thinking
>>of doing is setting up a filter in yarn to put the e-mail with file
>>attaches into a "folder", then process that folder later. My
>>question is, is a "folder" under Yarn just an ASCII file? And once
>>I process it, how can I delete the messages in it?
>
>A folder is NOT an ASCII file, so to process you will need to write a C
>or PERL program or something like that.

Well, actually, each folder is an ASCII file, with each message
delineated by a 4-byte big-endian block. So you could use REXX to
figure out how many messages there are (decode the 4-byte block, which
tells you the number of bytes in the message [remember: LFs for
end-of-lines! not CRLFs!]), strip out the 4-byte block, and use the
message however you want to.

The folder base is actually documented in Simple Offline USENET Packet
Specification 1.2 (linked to from <URL:http://www.vex.net/yarn/>) as
type 'B' (or 'b', as they're the same, but one's for news and the
other's for mail . . .). A code snippet (in REXX) for *making*
big-endian 4-byte block is in Tim Meddleton's SoupPost (at
<URL:http://www.io.org/~tm/bells2.html>, I think), but I've not delved
into big-endian math to figure out to decode them yet.

>If you no longer need the folder just delete it, expire will only work
>on the news base.
>
> John Covici
> covici@ccs.covici.com

Jon
- --
Jon Duckworth -- jond@biddeford.com -- http://www.biddeford.com/~jond/
PGP Public Key: 1024/E06DD431 on http://www.pgp.net/pgp/

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMh6ePu7yj4bgbdQxAQEq3wQAp2oVapUztXTakXNkOqmmBLUPrpW/HQ7E
QPPE7C2zEtP2lBzx8lBqFh22aPIoGa2bajwRKl9mNBGDVUwP9Ox7y9+RW11dS1Yc
Dih07cbTStBenj7qKfzgquFXhONSrP5KKwV3wo0Uug8KAhc3re8Pb9GD+eq/uTGz
l5cTwui4FXk=
=VRca
-----END PGP SIGNATURE-----