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

def yagtd::GTD::do_close (   self,
Close the given task:
GTD> close #id

Definition at line 462 of file yagtd.py.

        """Close the given task:
        GTD> close #id"""

        # Parse command line
        idx = self._parse_args(id)[0]

        if idx:
            # First, we need to find the task
            task = self.todo.find('id', idx)
            if task:
                if task['recurrence']:
                    if not task['due']:
                        task['due'] = datetime.datetime.now()
                    task['start'] = task['due']  # reinit start date
                    task['due'] = task['start'] + task['recurrence']
                    print "Task #%d (%s) rescheduled (%s)." % (idx, task['title'], task['due'])
                    task['end'] = datetime.datetime.now()
                    task['complete'] = 100
                    print "Task #%d (%s) completed." % (idx, task['title'])

Generated by  Doxygen 1.6.0   Back to index