Exemple #1
0
    def execute_specific(self, p_todo):
        """ Actions specific to this command. """
        self._handle_recurrence(p_todo)
        self.execute_specific_core(p_todo)

        printer = PrettyPrinter()
        self.out(self.prefix() + printer.print_todo(p_todo))
Exemple #2
0
    def execute_specific(self, p_todo):
        """ Actions specific to this command. """
        self._handle_recurrence(p_todo)
        self.execute_specific_core(p_todo)

        printer = PrettyPrinter()
        self.out(self.prefix() + printer.print_todo(p_todo))
Exemple #3
0
    def _handle_recurrence(self, p_todo):
        if p_todo.has_tag('rec'):
            try:
                new_todo = advance_recurring_todo(
                    p_todo,
                    p_offset=self.completion_date,
                    p_strict=self.strict_recurrence
                )

                self.todolist.add_todo(new_todo)

                printer = PrettyPrinter()
                printer.add_filter(PrettyPrinterNumbers(self.todolist))
                self.out(printer.print_todo(new_todo))
            except NoRecurrenceException:
                self.error("Warning: todo item has an invalid recurrence pattern.")
Exemple #4
0
    def _handle_recurrence(self, p_todo):
        if p_todo.has_tag('rec'):
            try:
                if self.strict_recurrence:
                    new_todo = strict_advance_recurring_todo(p_todo,
                        self.completion_date)
                else:
                    new_todo = advance_recurring_todo(p_todo,
                        self.completion_date)

                self.todolist.add_todo(new_todo)

                printer = PrettyPrinter()
                printer.add_filter(PrettyPrinterNumbers(self.todolist))
                self.out(printer.print_todo(new_todo))
            except NoRecurrenceException:
                self.error("Warning: todo item has an invalid recurrence pattern.")