Skip to content

Instantly share code, notes, and snippets.

@kowey
Created July 13, 2010 14:09
Show Gist options
  • Select an option

  • Save kowey/473912 to your computer and use it in GitHub Desktop.

Select an option

Save kowey/473912 to your computer and use it in GitHub Desktop.
color header white red "^X-GTD:" # for GTD next-actions
set display_filter="list-actions"
# use the /tmp/gtd folder to automatically retrieve messages with an action/WF
macro index \Cr "!email-get-msgids mairix^Mc/tmp/gtd^M"
folder-hook /tmp/gtd 'set index_format="%Z %{%b %d} %-25.25L %-35.35i %s"'
#!/usr/bin/env perl
use strict;
binmode STDIN, ":bytes";
binmode STDOUT, ":bytes";
sub slurp_stdin () {
local $/;
return <STDIN>;
}
my $msg = slurp_stdin();
my $MSGID="";
if ($msg =~ /^Message-I[Dd]: (.*)$/m) {
$MSGID=$1;
}
open HSGTD, "hsgtd list '$MSGID' |";
while (<HSGTD>) {
print "X-GTD: $_";
}
close HSGTD;
print $msg;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment