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

def yagtd::GTD::do_modify (   self,
  id_line 
)
Add/change elements of task but leave each other unchanged:
GTD> modify #id @othercontext p:UpdtProject

Definition at line 547 of file yagtd.py.

                                :
        """Add/change elements of task but leave each other unchanged:
        GTD> modify #id @othercontext p:UpdtProject"""

        # Parse command line
        idx, line = self._parse_args(id_line)

        if idx and line:
            # First, we need to find the task
            task = self.todo.find('id', idx)
            if task:
                # Parse additional input line
                attrs = self._parse_line(line)
            
                # Then, modify the task
                task_modified = False
                for attr, value in attrs.items():
                    if value:  # override!
                        task[attr] = value
                        task_modified = True
                if task_modified:
                    print "Task #%d modified" % idx
            else:
                print "Please check the id of the task to modify."
        else:
            print "Please specify the id of the task to modify first."


Generated by  Doxygen 1.6.0   Back to index