Re: [MlMt] Grouping messages by pattern ?

2017-06-06 Thread Benny Kjær Nielsen

On 6 Jun 2017, at 16:13, Max Rydahl Andersen wrote:

one question - for now it seems I'm forced to edit the bundled 
specifiers.plist to add specifiers to i.e. "subject.body" ?


That's correct, but see the suggestion below.

i.e. I can't just add this to `~/Library/Application 
Support/MailMate/Resources/specifers.plist`:


It's `specifiers.plist`.

This should work:

~~~
{
parsers = {
invites = {
header = "subject";
specifierRegex = '(.*?):(.*?)@(.*)';
specifierCaptures = {
1 = { specifier = "invite-action"; };
2 = { specifier = "invite-title"; };
3 = { specifier = "invite-time"; };
};
};
};
}
~~~

It would be nice if you could extend `subject.body`, but that's not 
currently possible. The above should be robust as long as I don't change 
the format of the file :)


I have to add this to the bundled: 
`/Applications/MailMate.app/Contents/Frameworks/OakMIME.framework/Versions/A/Resources/specifers.plist`


As you know this is not a robust solution.

--
Benny
___
mailmate mailing list
mailmate@lists.freron.com
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Grouping messages by pattern ?

2017-06-06 Thread Max Rydahl Andersen

On 6 Jun 2017, at 15:19, Benny Kjær Nielsen wrote:


On 1 Jun 2017, at 8:01, Max Rydahl Andersen wrote:

By using mailbox name format `${subject.body/.*?:(.*?)@.*/$1/}` I can 
get to this:


...

I'm wondering if a "group by unique name" or something similar could 
be possible under sub mailboxes ?


For this to work, you need a custom specifier which parses the part of 
the subject line you need. That'll make it available in all parts of 
MailMate (including conditions and rules). I believe something similar 
has been done in the past. For example, read through [this 
thread](https://lists.freron.com/mailmate/2014-March/002229.html).


ha! that actually works.

one question - for now it seems I'm forced to edit the bundled 
specifiers.plist to add specifiers to i.e. "subject.body" ?


i.e. I can't just add this to `~/Library/Application 
Support/MailMate/Resources/specifers.plist`:


```
invites = {
headers = "subject.body";
specifierRegex = '(.*?):(.*?)@(.*)';
specifierCaptures = {
1 = { specifier = "invite-action"; };
2 = { specifier = "invite-title"; };
3 = { specifier = "invite-time"; };
};
   };
```

I have to add this to the bundled: 
`/Applications/MailMate.app/Contents/Frameworks/OakMIME.framework/Versions/A/Resources/specifers.plist`


```
subject = {
[...]
specifierCaptures = {
[...]
  4 = { specifier = "body"; type="noTabs"; parsers = ( "words", 
"invites" ); };

[...]
};
[...]
invites = {
specifierRegex = '(.*?):(.*?)@(.*)';
specifierCaptures = {
1 = { specifier = "invite-action"; };
2 = { specifier = "invite-title"; };
3 = { specifier = "invite-time"; };
};
   };
```

notice the `parsers` now have "invites".

/max
http://about.me/maxandersen
___
mailmate mailing list
mailmate@lists.freron.com
https://lists.freron.com/listinfo/mailmate


Re: [MlMt] Grouping messages by pattern ?

2017-06-06 Thread Benny Kjær Nielsen

On 1 Jun 2017, at 8:01, Max Rydahl Andersen wrote:

By using mailbox name format `${subject.body/.*?:(.*?)@.*/$1/}` I can 
get to this:


...

I'm wondering if a "group by unique name" or something similar could 
be possible under sub mailboxes ?


For this to work, you need a custom specifier which parses the part of 
the subject line you need. That'll make it available in all parts of 
MailMate (including conditions and rules). I believe something similar 
has been done in the past. For example, read through [this 
thread](https://lists.freron.com/mailmate/2014-March/002229.html).


--
Benny
___
mailmate mailing list
mailmate@lists.freron.com
https://lists.freron.com/listinfo/mailmate