inDIGESTion
inDIGESTion
- Subject: inDIGESTion
- From: Evan Francois <email@hidden>
- Date: Thu, 8 Nov 2001 07:44:41 -0500
`
Please excuse me if this topic has been covered before. I was abroad
all summer, and my inbox now holds over 400 emails (applescript-users,
MACSCRPT, and TidBITS) which are still unread. In fact... it's this
very overloaded condition which has given me the impetus to post this
message. Ironically, being a subscriber to this list (in its current
configuration) has necessitated my writing a script (included below).
It's been just over a year since the "new format" ruined my reading
pleasure (i.e., Easy View w/ setext), and -- although I tried to get
some discussion rolling -- it was drowned in a deluge of complaints
about headers. See Vol 02 #0005 message 9 and Vol 02 #0026 message 9
for my meager musings. (It appears that MACSCRPT also underwent some
sort of numbering change on July 25, but I see no improvement there).
Digest Viewer <
http://homepage.mac.com/lfp/digestviewer.html> looks
to be a capable alternative to Easy View. So that's some consolation.
But, the MAJOR pain in the cojones continues to be the ABSURD naming
convention employed in these mailings (TidBITS excluded). And now I
have literally hundreds of emails in Eudora's mailboxes, waiting for
me to rename them all by hand (so forced by their ill-chosen titles),
in order to save them to disk. Well, at least that **was** my weekly
routine. But ~finally~ I've written a script to undertake that task.
I don't know how many subscribers have already posted such a script...
nor if most readers even bother cataloging these digests as plain text
files on their HD. At any rate, it would sure be helpful if the names
of these emails were alphabetized and trimmed _beforehand_. Note how
nicely Mr. Engst names his TidBITS collection. But (I guess) there's
probably something in the "RFCs" which precludes anything so sensible
from ever transpiring here, right?!?
Right.
Evan
PS -- Only requirements are the Eudora client and Standard Additions.
It is presumed that all applescript-users digests were filtered into
a single mailbox (natch). Tested with Eudora 4.3.3 under Mac OS 9.1.
Tested only as a Finder applet (NOT tested from Eudora's script menu).
Not one line of error checking is provided (so all I can say is GIGO).
Bug reports (not likely) or suggestions/improvements are most welcome.
Thanks.
(*
AppleScript to rename applescript-users digests
from something clunky (and inconsiderate) like:
"applescript-users digest, Vol 1 #1 - 11 msgs" or
"applescript-users digest, Vol 999 #9999 - 9 msgs"
to a more convenient (alphabetized) and Finder
friendly format (31 chars max) filename like:
"applescript-users Vol 001 #0001" or
"applescript-users Vol 999 #9999"
*)
global subField
set subField to ""
tell application "Eudora"
-- Edit the following names to match your
-- corresponding mail folder and/or box...
set theFolder to (a reference to mail folder ,
"List Subscriptions") --<-----<< (if extant)
set theBox to (a reference to mailbox ,
"applescript-users" of theFolder) --<-----<<
set totalMess to count messages of theBox
open theBox -- (optional)
end tell
if totalMess > 0 then
repeat with anIndex from 1 to totalMess
tell application "Eudora"
set thisMess to (a reference to ,
(message anIndex of theBox))
set subField to field "Subject" of thisMess -- header
set subTitle to subject of thisMess -- filename
end tell
if subTitle contains "digest," then
-- it hasn't been renamed as yet...
set x to offset of "-" in subField
set y to offset of "V" in subField
set z to offset of "#" in subField
set base to (characters (x - 11) thru ,
(x + 6) of subField) as string
--> "applescript-users "
set temp to my GetTextRange(y, 4, 7, " ")
set vol to ("Vol " & ((characters -3 thru ,
-1 of ("000" & temp)) as string) & " ")
--> "Vol vvv "
set temp to my GetTextRange(z, 1, 5, " ")
set numb to ("#" & (characters -4 thru ,
-1 of ("0000" & temp) as string))
--> "#nnnn"
tell application "Eudora" to ,
set subject of thisMess to ,
(base & vol & numb)
end if --> "applescript-users Vol vvv #nnnn"
end repeat
end if
on GetTextRange(locus, min, max, term) -- )EF-2001.11.07
global subField
set span to 0
repeat with i from min to max + 1
set span to span + 1 -- word width
if ((character (locus + i) of ,
subField) = term) then ,
exit repeat
end repeat
return ((characters (locus + min) thru ,
(locus + min + span - 2) of subField)) ,
as string
end GetTextRange
--'--