[MlMt] Ask for user input in a bundle
Hi Benny, is it possible to query the user for input when running a bundle? I am working on a bundle to send stuff to Studiometry and it allows linking to a project ID, which is usually not present in the email, so I thought I'd just input it before exporting to Studiometry (where it is much more tedious to change the linking afterwards). The alternative would be to use tagging for that I guess and tag my emails beforehand with the project ID. What would be the correct syntax to pass my tagging info over to a bundle? Alex___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate
Re: [MlMt] Ask for user input in a bundle
Thanks. The AppleScript line works for my purposes. When I have all the details ironed out, I'll post the bundle if you like. Alexander Kucera \ Lighting TD & Compositor — Founder & Lead Artist at BabylonDreams — The Foundry certified Nuke Trainer \ Neustadt, Germany GMT +1 \ App.net: AlexK \ Skype: marvinthemartian On 21 Sep 2014, at 12:26, Benny Kjær Nielsen wrote: On 21 Sep 2014, at 9:56, Alexander Kucera wrote: is it possible to query the user for input when running a bundle? Yes, you could, for example, use AppleScript for this. The hardest part is finding [the documentation](https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP4983-CH216-SW12). Here is a useful one-liner: osascript -e 'tell app "System Events" to return text returned of (display dialog "Give me some text" default answer "")' I am working on a bundle to send stuff to Studiometry and it allows linking to a project ID, which is usually not present in the email, so I thought I'd just input it before exporting to Studiometry (where it is much more tedious to change the linking afterwards). The alternative would be to use tagging for that I guess and tag my emails beforehand with the project ID. That could work as well, but you might end up with a lot of tags. What would be the correct syntax to pass my tagging info over to a bundle? That's not straightforward. I think one would have to pass `#flags` (space-separated list) to the script and then search for the IMAP keyword of the tag. -- Benny ___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate ___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate
[MlMt] Canonical outputs HTML tags (Bundles)
Hi Benny, one more thing. I have an issue with my bundle outputting the message body as HTML source with tags even though my input type is set to *canonical*. I noticed this is only the case on messages that are missing the plain text body part. Any ideas what went wrong? I used the Omnifocus bundle as a base and I noticed that it happens there as well. Alex ___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate
Re: [MlMt] Canonical outputs HTML tags (Bundles)
Exactly. Markdown or even normal plain text would be preferable. This is meant to be a simple text log inside Studiometry and the people looking at it have no idea what HTML markup even is. :) On 22 Sep 2014, at 12:36, Benny Kjær Nielsen wrote: On 21 Sep 2014, at 14:40, Alexander Kucera wrote: one more thing. I have an issue with my bundle outputting the message body as HTML source with tags even though my input type is set to *canonical*. I noticed this is only the case on messages that are missing the plain text body part. Any ideas what went wrong? Well, I guess it's a missing feature (or a bug if you like). Apparently MailMate falls back to raw HTML when this happens. I assume you expected a conversion to plain text (Markdown)? -- Benny ___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate ___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate
[MlMt] Mail Date and UTC
I have another small (I hope) problem with my Studiometry bundle. As a mail's header are written in the senders timezone (as far as I can tell) I am outputting the wrong time for my mail logs. I have a test email whose raw headers show the date as `Date: Tue, 23 Sep 2014 13:03:13 +` which is what is written into the variable I get from MailMate. However I live in UTC+2 so the time I should be putting into the log is `15:03:13`. MailMate displays this correctly in the UI, but passes the raw time value to the bundle, which is fine I guess, but I am unable to convert in in any way that makes sense due to a lack of Ruby/programming knowledge. A little help please? Alexander Kucera___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate
Re: [MlMt] Mail Date and UTC
I have Ruby's date parsing working already, just on the raw date. The existence of #date is a huge relief. While we are on the topic of Ruby. Is there any reason all the bundles are in Ruby? Would any language work? I am much more comfortable in Python for example. Alexander Kucera \ Lighting TD & Compositor — Founder & Lead Artist at BabylonDreams — The Foundry certified Nuke Trainer \ Neustadt, Germany GMT +1 \ App.net: AlexK \ Skype: marvinthemartian On 24 Sep 2014, at 10:25, Benny Kjær Nielsen wrote: On 23 Sep 2014, at 15:35, Alexander Kucera wrote: I have a test email whose raw headers show the date as `Date: Tue, 23 Sep 2014 13:03:13 +` which is what is written into the variable I get from MailMate. However I live in UTC+2 so the time I should be putting into the log is `15:03:13`. MailMate displays this correctly in the UI, but passes the raw time value to the bundle, which is fine I guess, but I am unable to convert in in any way that makes sense due to a lack of Ruby/programming knowledge. A little help please? You should pass the virtual `#date` value instead of the raw date of the message. That way you'll leave it to MailMate to generate a canonically formatted date instead of the numerous badly formatted dates used in emails. After that, you can probably make Ruby parse it and format it in any way you like (I haven't checked how this works in Ruby). On the command line, you can do it like this: date -j -f "%Y-%m-%d %T %z" "2014-01-01 10:10:10 +" "+%a %b %d %T %Y" The format strings are described in `man strftime`. -- Benny ___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate ___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate
Re: [MlMt] Mail Date and UTC
Hmm, I'm not sure #date is working correctly. I have a raw date of `Tue, 23 Sep 2014 17:38:44 -0500`, but #date seems to give me the exact same thing only formatted differently. When I print #date I get `2014-09-23 17:38:44 -0500` instead of `2014-09-24 00:38:44 +` which MailMate shows me. So I still would need to do some timezone script foo to get my log entries straight. Or did I maybe not understand the purpose of #date correctly? Alexander Kucera \ Lighting TD & Compositor — Founder & Lead Artist at BabylonDreams — The Foundry certified Nuke Trainer \ Neustadt, Germany GMT +1 \ App.net: AlexK \ Skype: marvinthemartian On 24 Sep 2014, at 10:32, Alexander Kucera wrote: I have Ruby's date parsing working already, just on the raw date. The existence of #date is a huge relief. While we are on the topic of Ruby. Is there any reason all the bundles are in Ruby? Would any language work? I am much more comfortable in Python for example. Alexander Kucera \ Lighting TD & Compositor — Founder & Lead Artist at BabylonDreams — The Foundry certified Nuke Trainer \ Neustadt, Germany GMT +1 \ App.net: AlexK \ Skype: marvinthemartian On 24 Sep 2014, at 10:25, Benny Kjær Nielsen wrote: On 23 Sep 2014, at 15:35, Alexander Kucera wrote: I have a test email whose raw headers show the date as `Date: Tue, 23 Sep 2014 13:03:13 +` which is what is written into the variable I get from MailMate. However I live in UTC+2 so the time I should be putting into the log is `15:03:13`. MailMate displays this correctly in the UI, but passes the raw time value to the bundle, which is fine I guess, but I am unable to convert in in any way that makes sense due to a lack of Ruby/programming knowledge. A little help please? You should pass the virtual `#date` value instead of the raw date of the message. That way you'll leave it to MailMate to generate a canonically formatted date instead of the numerous badly formatted dates used in emails. After that, you can probably make Ruby parse it and format it in any way you like (I haven't checked how this works in Ruby). On the command line, you can do it like this: date -j -f "%Y-%m-%d %T %z" "2014-01-01 10:10:10 +" "+%a %b %d %T %Y" The format strings are described in `man strftime`. -- Benny ___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate ___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate
Re: [MlMt] Mail Date and UTC
Ah, I see. Time to dive into the depths of timezone conversion then I guess. Thanks Benny. Alexander Kucera \ Lighting TD & Compositor — Founder & Lead Artist at BabylonDreams — The Foundry certified Nuke Trainer \ Neustadt, Germany GMT +1 \ App.net: AlexK \ Skype: marvinthemartian On 24 Sep 2014, at 12:38, Benny Kjær Nielsen wrote: On 24 Sep 2014, at 11:14, Alexander Kucera wrote: Hmm, I'm not sure #date is working correctly. I have a raw date of `Tue, 23 Sep 2014 17:38:44 -0500`, but #date seems to give me the exact same thing only formatted differently. When I print #date I get `2014-09-23 17:38:44 -0500` instead of `2014-09-24 00:38:44 +` which MailMate shows me. So I still would need to do some timezone script foo to get my log entries straight. Or did I maybe not understand the purpose of #date correctly? The purpose is that your scripting language should be able to parse this date without problems. Since the time zone is included then the date and time is non-ambiguous. You should then use the scripting language to format the date according to the local time zone. Here is a variant from my previous example: TZ=CET date -j -f "%Y-%m-%d %T %z" "2014-01-01 10:10:10 -0500" "+%a %b %d %T %Y" Here I first explicitly state that we are in zone CET (`+0100`). (I don't really need to do that since that is also the default *for me*.) The date and time is given in zone `-0500`. So, at GMT (`+`) the time would be `15:10:10`, and in zone `+0100` this would be `16:10:10`. This is also the result of the command above. Time zones are confusing and daylight saving times do not make it easier. (I often make mistakes when dealing with time zones.) There is no virtual header available for the current time zone. If there were then it would have to be dynamic (not cached/saved to disk) in the event that you were travelling between time zones. You can also use `#date-received` I believe. This is “hardcoded” to timezone + if that makes it easier. -- Benny ___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate ___ mailmate mailing list mailmate@lists.freron.com http://lists.freron.com/listinfo/mailmate
Re: [MlMt] SpamSieve and TrainGood folder
Btw. I have been running with two connected Mailboxes since I reported the issue without problems. I'll switch to three mailboxes tomorrow and will report if I can reproduce the issue. -- Alexander Kucera Von: Benny Kjær Nielsen (mailto:mailingl...@freron.com) Antworten: MailMate Users (mailto:mailmate@lists.freron.com) Datum: 31. Januar 2017 at 16:20:26 An: MailMate Users (mailto:mailmate@lists.freron.com) Betreff: Re: [MlMt] SpamSieve and TrainGood folder > > On 26 Jan 2017, at 23:31, Randall Meadows wrote: > > > > > > > > > I went through my Junk mail and found 45 false positives. I'm running > > SpamSieve in "drone mode" (I think that's what it's called--running it on a > > different machine, my Mac mini, with Mail.app running there, to do the > > filtering); I moved those 45 messages to the "TrainGood" mailbox. > > > > That was like 2 hours ago; they're still sitting in the TrainGood mailbox. > > I was under the impression that they would get refiltered according to the > > INBOX rules; am I mistaken in how training is supposed to work? > > > > > > I was recently made aware that there is a problem with having 3 “Connected” > mailboxes. Maybe you could try to verify if this is the same > issue(https://freron.lighthouseapp.com/projects/58672/tickets/1644). > > > -- > Benny > > > > ___ > mailmate mailing list > mailmate@lists.freron.com > https://lists.freron.com/listinfo/mailmate ___ mailmate mailing list mailmate@lists.freron.com https://lists.freron.com/listinfo/mailmate