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

def yagtd::GTD::_add (   self,
  line 
) [private]
Adds task from the given line and returns the new task_id.

Definition at line 335 of file yagtd.py.

                        :
        """Adds task from the given line and returns the new task_id."""
        
        if line:
            # Create the new task
            task = Task()
            
            # Parse input line for GTD and additional attributes
            task.add(**self._parse_line(line))

            # And, add it to the to-do list
            task_id = self.todo.add(task)

            # And, set the start date if none
            self.do_append("%d S:%s" % (task_id, datetime.datetime.now().strftime("%Y-%m-%d")))

            return task_id


Generated by  Doxygen 1.6.0   Back to index