43 Folders

Back to Work

Merlin’s weekly podcast with Dan Benjamin. We talk about creativity, independence, and making things you love.

Join us via RSS, iTunes, or at 5by5.tv.

”What’s 43 Folders?”
43Folders.com is Merlin Mann’s website about finding the time and attention to do your best creative work.

gtd with vim like in emacs

ezichko's picture

I ended up doing this: i...

I ended up doing this:
i use a projects.otl file using vim outliner.

to add a new task i added this to .bash_profile
alias gg='cat >> projects.otl'

so i just type:
gg
do something @work
Control-D
and it is appended to projects.otl

then to see all my next actions by context i am using a perl script (the same one used in that org-mode page)

you just do like this:
perl gtp.pl projects.otl and you get a nice list of next actions grouped by context.

the code is here:

  1 use strict;
  2 use warnings;
  3 
  4 # Read an org file and create lists by context (tag)
  5 # Written by Charles Cave  charles.cave (at) gmail.com
  6 # 28th June 2006
  7 
  8 my $orgfile = shift;
  9 defined($orgfile) or die "syntax is orghip.pl orgfilename\n";
 10 
 11 open(my $org, "<", $orgfile) or die "Cannot open $orgfile\n";
 12 my %lists = ();
 13 my $now = localtime();
 14 
 15 while (<$org>) {
 16   my $line = $_;
 17   chomp($line);
 18   if ($line =~ /^\s*(.*?)@([A-Za-z]+)/) {
 19       my $hdng = "$1";
 20       my $tag  = $2;
 21       if ( defined($lists{$tag}) ) {
 22           $lists{$tag} = $lists{$tag}."\n".$hdng;
 23       } else {
 24           $lists{$tag} = $hdng;
 25       }
 26   }
 27 }
 28 
 29 print "Date Printed: $now\n";
 30    print "\n";
 31    print "NEXT ACTIONS";
 32 process_context("work");
 33 process_context("home");
 34 process_context("calls");
 35 process_context("city");
 36 # print any remaining contexts
 37 foreach my $key (sort keys %lists) {
 38     process_context($key);
 39 }
 40 
 41 sub process_context {
 42    my $context = shift;
 43    print "\n\n$context:\n";
 44    foreach my $item( split(/\n/, $lists{$context}) ) {
 45        print "[ ] $item\n";
 46    }
 47    delete $lists{$context};
 48 }

this is modified from the original to read all lines that have a @context and group them.
you can create an alias for that too.

to edit it
alias ge='vi projects.otl'

and
alias g='perl gtp.pl projects.otl'
to output it.

Another thing I have is a simple shell script called pda.sh
This will do:
perl gtp.pl projects.otl > /Volumes/pda/Storage Card/
cp /Volumes/pda/Storage Card/in ~

This sends my next actions to the pda and copies my recent notes on the pda to my home folder for processing.

Then all this is rsynced to my server 2 times a day.

Works quite nicely.

If anyone needs help i could create a more detailed post.

 
EXPLORE 43Folders THE GOOD STUFF

Popular
Today

Popular
Classics

An Oblique Strategy:
Honor thy error as a hidden intention


STAY IN THE LOOP:

Subscribe with Google Reader

Subscribe on Netvibes

Add to Technorati Favorites

Subscribe on Pageflakes

Add RSS feed

The Podcast Feed

Cranking

Merlin used to crank. He’s not cranking any more.

This is an essay about family, priorities, and Shakey’s Pizza, and it’s probably the best thing he’s written. »

Scared Shitless

Merlin’s scared. You’re scared. Everybody is scared.

This is the video of Merlin’s keynote at Webstock 2011. The one where he cried. You should watch it. »