def _get_tagged_content_from_taskpaper_files(<EOL>self,<EOL>taskpaperFiles,<EOL>tagSet,<EOL>editorial=False,<EOL>workflowTagSet=False,<EOL>includeFileTags=True):
self.log.info(<EOL>'<STR_LIT>')<EOL>content = "<STR_LIT>"<EOL>for tp in taskpaperFiles:<EOL><INDENT>done = False<EOL>if not workflowTagSet:<EOL><INDENT>for tag in ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>if "<STR_LIT:/>" + tag + "<STR_LIT:/>" in tp:<EOL><INDENT>done = True<EOL><DEDENT><DEDENT><DEDENT>if done:<EOL><INDENT>continue<EOL><DEDENT>doc = document(tp)<EOL>basename = os.path.basename(tp).replace("<STR_LIT:->", "<STR_LIT:U+0020>").upper()<EOL>archive = doc.get_project("<STR_LIT>")<EOL>if archive:<EOL><INDENT>archive.delete()<EOL><DEDENT>fileTagged = False<EOL>done = False<EOL>for tag in tagSet:<EOL><INDENT>if includeFileTags == True:<EOL><INDENT>tag = "<STR_LIT:@>" + tag.replace("<STR_LIT:@>", "<STR_LIT>")<EOL>if "<STR_LIT>" % locals() in tp:<EOL><INDENT>fileTagged = True<EOL><DEDENT><DEDENT>if "<STR_LIT>" in tp:<EOL><INDENT>done = True<EOL><DEDENT><DEDENT>if done:<EOL><INDENT>continue<EOL><DEDENT>if self.editorialRootPath:<EOL><INDENT>tp = urllib.parse.quote(tp)<EOL>tp = tp.replace(<EOL>self.editorialRootPath, "<STR_LIT>") + "<STR_LIT>"<EOL><DEDENT>for tag in tagSet:<EOL><INDENT>tag = "<STR_LIT:@>" + tag.replace("<STR_LIT:@>", "<STR_LIT>")<EOL>etag = "<STR_LIT>" + tag.replace("<STR_LIT:@>", "<STR_LIT>")<EOL>lesserTags = []<EOL>greaterTags = []<EOL>if workflowTagSet:<EOL><INDENT>trumped = False<EOL><DEDENT>else:<EOL><INDENT>trumped = True<EOL><DEDENT>for t in self.workflowTags:<EOL><INDENT>if t == tag:<EOL><INDENT>trumped = True<EOL><DEDENT>if t != tag:<EOL><INDENT>if trumped:<EOL><INDENT>lesserTags.append(t)<EOL><DEDENT>else:<EOL><INDENT>greaterTags.append(t)<EOL><DEDENT><DEDENT><DEDENT>filteredTasks = []<EOL>if ("<STR_LIT>" % locals() in tp or "<STR_LIT>" % locals() in tp) and includeFileTags == True:<EOL><INDENT>filteredTasks = doc.all_tasks()<EOL>for ft in filteredTasks:<EOL><INDENT>trumped = False<EOL>for t in ft.tags:<EOL><INDENT>if t in "<STR_LIT:U+0020>".join(greaterTags):<EOL><INDENT>trumped = True<EOL><DEDENT><DEDENT>if not trumped:<EOL><INDENT>for t in lesserTags:<EOL><INDENT>ft.del_tag(t)<EOL><DEDENT>ft.add_tag(tag)<EOL><DEDENT><DEDENT><DEDENT>elif not fileTagged:<EOL><INDENT>filteredProjects = doc.tagged_projects(tag)<EOL>for p in filteredProjects:<EOL><INDENT>allTasks = p.all_tasks()<EOL>for ft in filteredTasks:<EOL><INDENT>trumped = False<EOL>for t in ft.tags:<EOL><INDENT>if t in "<STR_LIT:U+0020>".join(greaterTags):<EOL><INDENT>trumped = True<EOL><DEDENT><DEDENT>if not trumped:<EOL><INDENT>for t in lesserTags:<EOL><INDENT>ft.del_tag(t)<EOL><DEDENT>ft.add_tag(tag)<EOL><DEDENT><DEDENT><DEDENT>filteredTasks = doc.tagged_tasks(tag)<EOL><DEDENT>for ft in filteredTasks:<EOL><INDENT>if "<STR_LIT>" not in "<STR_LIT>".join(ft.tags):<EOL><INDENT>if "<STR_LIT>" in ft.parent.__repr__():<EOL><INDENT>thisNote = tp + "<STR_LIT>" + ft.parent.title[:-<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>thisNote = tp<EOL><DEDENT>ft.add_note(thisNote)<EOL>content += ft.to_string() + "<STR_LIT:\n>"<EOL><DEDENT><DEDENT><DEDENT><DEDENT>self.log.info(<EOL>'<STR_LIT>')<EOL>return content<EOL>
*get all tasks tagged with a sync-tag from taskpaper files*

        **Key Arguments:**
            - ``taskpaperFiles`` -- paths to all taskpaper files in workspace
            - ``tagSet`` -- the tagset to extract from the taskpaper files.
            - ``editorial`` -- format links for editorial ios apps
            - ``workflowTagSet`` -- does the tag set contain workflow tags (if not skip the non-live project lists)
            - ``includeFileTags`` -- if the tag is in the filepath (e.g. /@due/mytasks.taskpaper) include all items the file in that tag set

        **Return:**
            - ``content`` -- the given tagged content of all taskpaper files in a workspace (string)