[MlMt] Resend-Help with a script to create an event from an email

Torsten Grust torsten.grust at uni-tuebingen.de
Fri Dec 6 16:35:17 EST 2013


On 6 Dec 2013, at 10:16, Benny Kjær Nielsen wrote (with possible 
deletions):

> On 6 Dec 2013, at 9:01, Torsten Grust wrote:
>
>> I too use BusyCal and would love to create calendar entries from with 
>> MailMate.
>> However, as fas as I can tell (I do hope somebody proves me wrong), 
>> BusyCal
>> does not have an AppleScript dictionary, effectively rendering it 
>> non-scriptable.
>> That's a siginifcant obstacle to a tight integration with MailMate 
>> (with any
>> other application, for that matter).
>
> Busycal has an alternative to using AppleScript based on a custom URL 
> scheme (similar to what is often done on iOS and what MailMate does 
> for the `mailto:` URL scheme): 
> https://support.busymac.com/blog/23829-busycal-url-handler

Ah, yes.  That's a good entry point.  Thanks for the pointer.

> Now, I'm not sure exactly how you want this to work, but it's 
> certainly possible to create a command which based on the currently 
> selected message (or selected text in the message) can create an event 
> in BusyCal/iCal/Fantastical (3 more bundles to be created).

How would a command receive the currently *selected* text (as opposed to 
the entire
message text)?  In the current commands, a mechanism like

	environment   = 'MM_FROM=${from} ...'

makes the `From:` address available in the environment.  Would the 
selected text
be communicated in a similar fashion?

> The main problem, of course, is to convert text to event data. I could 
> perhaps implement a feature where MailMate can be told to analyze the 
> message (or selected text) with the data detectors in Mac OS X (10.7+) 
> before calling the external script. This could help find dates, 
> addresses, and phone numbers I believe. (Making no promises, just 
> thinking out loud.)

Well, BusyCal as well as Fantastical come with quite sophisticated date 
parsers
that are exposed via the URL scheme and AppleScript, respectively.  It 
could be an
option to simply rely on these (for now).

Cheers,
   --Torsten

-- 
| Torsten "Teggy" Grust
| Torsten.Grust at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20131206/4689fff2/attachment.html>


More information about the mailmate mailing list