def done(
            self,
            depth="root"):
        """*mark this object as done*

        **Key Arguments:**
            - ``depth`` -- either mark root item as done or all recursive items. Default *"root"*. ["root"|"all"]

        **Usage:**

            To mark a task or project as done"

            .. code-block:: python

                aTask.done()

            Or or mark the object as done as well all descendant tasks and projects:

            .. code-block:: python

                aTask.done("all")
        """
        self.refresh
        oldContent = self.to_string(indentLevel=1)
        now = datetime.now()
        now = now.strftime("%Y-%m-%d %H:%M:%S")
        newContent = self.to_string(
            indentLevel=1, tags=["done(%(now)s)" % locals()])

        # ADD DIRECTLY TO CONTENT IF THE PROJECT IS BEING ADDED SPECIFICALLY TO
        # THIS OBJECT
        self.parent._update_document_tree(
            oldContent=oldContent,
            newContent=newContent
        )

        if depth == "all":
            try:
                for t in self.tasks:
                    t.done("all")
            except:
                pass

            try:
                for p in self.projects:
                    t.done("all")
            except:
                pass

        self.content = self.to_string(indentLevel=0, title=False)

        self.refresh

        return self
def done ( self , depth = "root" ) : self . refresh oldContent = self . to_string ( indentLevel = 1 ) now = datetime . now ( ) now = now . strftime ( "%Y-%m-%d %H:%M:%S" ) newContent = self . to_string ( indentLevel = 1 , tags = [ "done(%(now)s)" % locals ( ) ] ) self . parent . _update_document_tree ( oldContent = oldContent , newContent = newContent ) if depth == "all" : try : for t in self . tasks : t . done ( "all" ) except : pass try : for p in self . projects : t . done ( "all" ) except : pass self . content = self . to_string ( indentLevel = 0 , title = False ) self . refresh return self
*mark this object as done*

        **Key Arguments:**
            - ``depth`` -- either mark root item as done or all recursive items. Default *"root"*. ["root"|"all"]

        **Usage:**

            To mark a task or project as done"

            .. code-block:: python

                aTask.done()

            Or or mark the object as done as well all descendant tasks and projects:

            .. code-block:: python

                aTask.done("all")