Logo Search packages:      
Sourcecode: yagtd version File versions  Download package

def yagtd::GTD::do_status (   self,
  line 
)
Display projects statuses (percent complete):
GTD> status

Definition at line 829 of file yagtd.py.

                             :
        """Display projects statuses (percent complete):
        GTD> status"""

        for p, ts in self.todo.order('project').items():
            # Thomas: don't show completed projects
            
            percent = 0  # compute project's percent complete
            next = ""
            for t in ts:
                if t['complete']:
                    percent += int(t['complete'])
                # Thomas: find next action 
                if t['status'] and not t['complete'] and 'next' in t['status']: 
                    next = " !next: %s" % t['title'] 

            percent /= len(ts) 
            if percent == 100: continue 

            # Section title 
            print self._colorize(PROJECT_CHAR + p.capitalize()), 
            print "%d%%%s" % (percent, self._colorize(next))
                            

Generated by  Doxygen 1.6.0   Back to index