def to_string(<EOL>self,<EOL>indentLevel=<NUM_LIT:1>,<EOL>title=True,<EOL>tags=None,<EOL>projects=None,<EOL>tasks=None,<EOL>notes=None):
indent = indentLevel * "<STR_LIT:\t>"<EOL>objectString = "<STR_LIT>"<EOL>if title:<EOL><INDENT>try:<EOL><INDENT>objectString += self.title<EOL><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>if tags:<EOL><INDENT>tagString = ("<STR_LIT>").join(tags)<EOL><DEDENT>else:<EOL><INDENT>tagString = ("<STR_LIT>").join(self.tags)<EOL><DEDENT>if len(tagString):<EOL><INDENT>objectString += "<STR_LIT>" + tagString<EOL><DEDENT><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>try:<EOL><INDENT>if not notes:<EOL><INDENT>notes = self.notes<EOL><DEDENT>for n in notes:<EOL><INDENT>if len(n.title.strip()):<EOL><INDENT>if not self.parent and len(objectString) == <NUM_LIT:0>:<EOL><INDENT>objectString += indent + n.title.strip() + n.content<EOL><DEDENT>else:<EOL><INDENT>objectString += "<STR_LIT:\n>" + indent + n.title.strip() + n.content<EOL><DEDENT><DEDENT><DEDENT><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>if not tasks:<EOL><INDENT>tasks = self.tasks<EOL><DEDENT>for t in tasks:<EOL><INDENT>objectString += "<STR_LIT:\n>" + indent + t.to_string(indentLevel + <NUM_LIT:1>)<EOL><DEDENT><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>if not projects:<EOL><INDENT>projects = self.projects<EOL><DEDENT>for p in projects:<EOL><INDENT>objectString += "<STR_LIT:\n>" + indent + p.to_string(indentLevel + <NUM_LIT:1>)<EOL><DEDENT><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>objectString += "<STR_LIT:\n>" + indent + self.searches<EOL><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>return objectString.strip()<EOL>
*convert this taskpaper object to a string*

        **Key Arguments:**
            - ``indentLevel`` -- the level of the indent for this object. Default *1*.
            - ``title`` -- print the title of the taskpaper object alongside the contents. Default *True*
            - ``tags`` -- replace tags with these tags. Default *None*
            - ``projects`` -- replace projects with these projects, pass empty list to delete all projects. Default *None*
            - ``tasks`` -- replace tasks with these ones, pass empty list to delete all tasks. Default *None*
            - ``notes`` -- replace notes with these ones, pass empty list to delete all notes. Default *None*

        **Return:**
            - ``objectString`` -- the taskpaper object as a string

        **Usage:**

            If we have the *archive* project from a taskpaper document, we can convert it to a string using:

            .. code-block:: python

                print archiveProject.to_string()

            .. code-block:: text

                Archive:
                    - and a third task @done(2016-09-04) @project(parent project / child-project)
                    - and a forth task @done(2016-09-04) @project(parent project / child-project)
                    - fill the kettle @done(2016-09-04) @project(parent project / make coffee)
                    - boil the kettle @done(2016-09-04) @project(parent project / make coffee)