[Users] Action to integrate Claws with Taskwarrior

Saša Janiška gour at atmarama.com
Mon Jul 12 10:41:07 CEST 2021


Hello,

a the moment I'm using simple shell script to be able to integrate
with Taskwarrior so that I can create new tasks from Claws by using
Actions feature.

Currently, the action is as follows:

grep "^Subject:\ " %f | cut -d\  -f 2-| ~/bin/claws2tw.sh

The script is :

#!/usr/bin/sh


read TEXT
test -z "$TEXT" && \
        exit 0

task add $TEXT +in +email
exit $?

and the output of the script is e.g.:

--- Ended: grep "^Subject:\ " "/home/gour/.claws-mail/imapcache/mail-server/user-idINBOX/16321" | cut -d\  -f 2-| ~/bin/claws2tw.sh
Created task 189.

and by clicking on Claws' toolbar, it creates a Taskwarrior task #189 using
Subject as Taskwarrior's description along with {in,email} tags.

Now, I'd like to enhance the integration so that I when I on the task 
within Taskwarrior it can select appropriatemessage in Claws.

In order to do it, I'd have to use taskopen helper script in
Taskwarrior, but I wonder what would be the simplest way to create &
annotate task via custom Action which should do one additional thing
besides current claws2tw.sh script and that is to execute:

task ann 189 -- claws-mail -- select/home/gour/.claws-mail/imapcache/mail-server/user-idINBOX/16321

so that I can use 'taskopen 189 -x' and invoke Claws-mail selecting
desiring message?

Do you recommend to do it with enhanced shell script, using Python plugin or something?


Sincerely,
Gour

-- 
What is night for all beings is the time of awakening
for the self-controlled; and the time of awakening for
all beings is night for the introspective sage.




More information about the Users mailing list