Logo Search packages:      
Sourcecode: yagtd version File versions

def yagtd::GTD::do_append (   self,
  id_line 
)

Add new elements to task but leave existing elements unchanged:
GTD> append #id @newcontext p:NewProject

Definition at line 518 of file yagtd.py.

00518                                 :
        """Add new elements to task but leave existing elements unchanged:
        GTD> append #id @newcontext p:NewProject"""

        # Parse command line
        idx, line = self._parse_args(id_line)
        
        if idx and line:
            # Frist, 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 and not task[attr]:  # not override!
                        task[attr] = value
                        task_modified = True
                if task_modified:
                    print "Task #%d appended" % idx

    def do_appendall(self, args):  # BB


Generated by  Doxygen 1.6.0   Back to index