creecros / Mailmagik

Kanboard Plugin - Send emails to Kanboard and convert to tasks or comments
MIT License
22 stars 3 forks source link

Extracting task attributes from the subject #13

Closed alfredbuehler closed 1 year ago

alfredbuehler commented 1 year ago

I'm working on a nice feature for the ConvertEmailToTask action. The subject is scanned for some task attributes. It found they are extracted/removed from the subject and applied to the newly created task. I saw a similar concept on my Toodledo account, found it very helpful when creating tasks by e-mail.

I'm still on testing, but the following attributes are already implemented:

in Subject Effect
d:YYYY-MM-DD Set due date
s:YYYY-MM-DD Set start date
p:n Set priority n
c:name Set category 'name'
t:name Add tag 'name', may be repeated. Non-existing tags will be created, beware of typos.

A subject line containing

Test c:SQL p:3 d:2023-02-28 s:2023-02-20

will create a priority 3 task named "Test", category "SQL", start on Feb 20 and due on Feb 28.

image

The pending work is, implementing the tags attribute, which is a bit more complicated, as there is more than one possible.

Any feedback is appreciated.

EDIT: Amended tagging

alfredbuehler commented 1 year ago

For simplicity reason, I decided to take the straightforward way for the tags. Each tag must have its prefix, e.g.

t:foo t:bar t:baz
alfredbuehler commented 1 year ago

Fulfilled by https://github.com/creecros/kbphpimap/commit/f9bb0bc3a0358282c0e21bc12a26fc6882d53423, issue closed.