[MlMt] MmFilenameFormatString question
thfl at me.com
thfl at me.com
Tue Dec 16 08:32:50 EST 2014
Hi,
I want to customize the file name string when dragging a mail to the
Finder. I’ve seen that some string formatting can be done with
"defaults write com.freron.MailMate MmFilenameFormatString …"
What I want to achieve is this:
<formatted time> <subject> <[author]>.eml
Example:
141209T1848 Dont’t forget to take out the trash [John Doe].eml
For Apple’s Mail.app I get the desired result by exporting the mails
via bash script (see below).
Can I achieve this (or something close) with MailMate’s built in
string formatting?
The string in my bash script is built like this:
msgName="$ccd $suj [$aut]"
with…
ccd=$(mdls -name kMDItemContentCreationDate -raw "$f")
ccd=$(date -j -f '%Y-%m-%d %H:%M:%S %z' "$ccd" +"%y%m%dT%H%M")
suj=$(mdls -name kMDItemSubject -raw "$f" | head -c 80 | sed
's/\//∕/g')
aut=$(mdls -name kMDItemAuthors -raw "$f" |
head -n 4 | tr -ds '\n"()' ' ' |
sed '
s/^ //
s/\\U[0-9a-f]\{4\}//g')
Thanks for any advice
--
Thomas
More information about the mailmate
mailing list