text additions or library for parsing email headers
text additions or library for parsing email headers
- Subject: text additions or library for parsing email headers
- From: MB <email@hidden>
- Date: Fri, 11 Apr 2008 19:22:20 +0200
The objective is to be able to compare 2 or more email messages in
applicatin PowerMail and determine they are duplicates, even though one
of them may have been taking a different route and have had some new
attribute lines added.
I need a library or a freely available addition that can meet (or help
me meet partially) these demands:
- To be able to parse a header string and split it up according all
possible attributes (From, To, Subject, "X-" and so on) and their
values, and doing this while removing excessive returns and space runs,
so logically only one complete header item per attribute line.*
- To remove some of these attributes as listed in a record, list or
similar source
- To concatenate together the remaining entries to a new header string
that, provided the header entries were all the same, except the ones
removed, in such a fashion that 2 messages with the exact same headers,
except for earlier removed returns and the removed attributes, would now
have identical header strings.
Any suggestions for such a library?
Alternative approaches are also welcome for consideration. To be able to
compare header strings that for the most part are similar and to have
some present attributes been given a higher score for possible duplicate
would be nice. Fuzzy logic in an applescript? The only limitation I must
have in place is whatever is used must be already in Tiger or later and
be able to add to the system at same or less effort as adding and using
the script itself.
*At the moment I using text paragraphs like this:
set theLines to the paragraphs of theHeaders (paragraphs being part of
the Text Suite subset in my target application PowerMail)
, which basically means the header is split at the returns, resulting in
incomplete header attributes.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden