ThinkingRock Forum

To go back to http://www.trgtd.com.au
It is currently Thu Jun 20, 2013 6:17 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: TR and KMail
PostPosted: Sat Aug 09, 2008 3:59 pm 
Offline

Joined: Sat Aug 09, 2008 3:22 pm
Posts: 19
I have integrated TR with KMail. The problem I have solved with this is finding the original email quickly once I am going to do the work.

When I am processing the Inbox (I do this many times everyday) I process all mails until the inbox is empty. I have setup some manual filters to move the mail to the REFERENCE folder, to the SOMEDAY/MAYBE folder, to the ACTIONS folder in Kmail. Until here, I presume this is what everybody does.

The integration with TR is done using an aditional filter action to process the mail through a script (see below). So when I use this filters, the "thoughts.txt" file is populated with references to the actual mails.

The thoughts.txt to be imported in TR contains lines like the following:

Code:
@ borrador plan de marketing (de user1@opensistemas.com)(30 Jul 2008)       e-mail
@ mejoras en los informes (de user1@opensistemas.com)(28 Jul 2008)    e-mail
@ Acuerdo de partnership (de user2@ingres.com)(5 Aug 2008)       e-mail


In the example, I will import 3 thoughts in the inbox of TR with an "@", the subject of the email, the sender and the date. Then it comes a TAB and the word "e-mail" (I have this category in TR).

While processing the thoughts in TR, I copy the thought title ("@ xxxxx (from ...) (date)") to the first line in the "notes field" and leave the "Description field" to something more descriptive of the action. This system supports pseudo-linking more than 1 email to an action just adding more lines to the notes.

When TR tells me that it is time to work on that action, I just have to sort my "ACTIONS email folder" by date and by user, and I can easily find the related mail(s).

KMail used to be a Unix only mail client, but recent versions are available for Windows and Mac too.

I setup a filter to be called manually:

- Filter criteria: none

- Filter actions:
- Mark as read
- Move to folder ACTIONS
- Filter through /home/monera/bin/generate_thoughts.sh

- In advanced tab:
- Mark the last three checkboxes (if this filter matches stop processing, add this filter to menu and add this filter to the toolbar)
- Assign an icon and a shortcut to the filter

The code of /home/monera/bin/generate_thoughts.sh is:

Code:
FILE="/tmp/thoughts.dmp"
FILE2="/tmp/thoughts2.dmp"
rm -f $FILE
rm -f $FILE2
cat > $FILE

SUBJ=`cat $FILE | grep -m 1 "^Subject:" | sed 's/^Subject: /@ /'`
FROM=`cat $FILE | grep -m 1 "^From:" | sed 's/^From:.*<//' | sed 's/>.*//'`
DATE=`cat $FILE | grep -m 1 "^Date: " | awk '{print $3,$4,$5}'`

OUT="$SUBJ (de $FROM)($DATE)    e-mail"

echo "$OUT" >> /home/monera/thoughts.txt



this script needs to be executable (755). Windows and Mac users, I presume you will have to adjust slashes and maybe install some basic command line commands such as awk, sed or grep. I know it could be better and more secure, but it was for personal use only :P

Thanks a lot for ThinkingRock. I feel very comfortable with it, and my stress level is really controlled now :)

P.S: At least that works with the last KMail version (the one that comes with KDE 4.1)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 11, 2008 10:45 am 
Offline

Joined: Mon Jun 30, 2008 1:39 pm
Posts: 26
I take essentially the same approach (perhaps a little less polished) using mutt. I have a hotkey in mutt (ESC-g) that pipes the message to a script:

Code:
macro index "\eg" "<pipe>sh mutt-to-tr.sh<enter>"


mutt-to-tr.sh is just this:
Code:
#!/bin/bash

awk 'BEGIN {OUTFILE="/home/dave/thoughts.txt"}

/^From:/ {
  fromText=$0
}

/^Subject:/ {
  subjectText=$0
}

/^Date:/ {
  dateText=$0
}

/^ *$/ {
  print fromText " " subjectText " " dateText >> OUTFILE
  exit
}'


This gives me who the email is from, the subject and the date. I then process my thoughts.txt file at least once a day and pick up the new emails (and other tasks). It is easy and fast to use mutt's limiting (i.e. limit the view to matching emails) features to find the email again if I can't remember the details of the email (which is rare). Like you I then create real next actions when I process the thoughts file.

Piping emails to the thoughts file means that I now always have my inbox empty. It was a very weird feeling when I first cleared it out and I felt naked at first.

I used to think that the thoughts file was a bit limited, but now I find that the simplicity of using a simple text file is pure elegance. I have a hotkey in emacs that opens it up so I can always quickly add thougts while working as well.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group