content: property pVer : "0.2"
  
  property eProj : 1
  property eTask : 2
  property eNote : 3
  
  -- PLACE THE TASKPAPER FRONT DOCUMENT IN THE CLIPBOARD 
  -- AS A SIMPLE TAB-INDENTED OUTLINE
  on run
  	-- READ A DOCUMENT TO A NESTED LIST
  	tell application "TaskPaper" 
  		set lstDocs to documents
  	if lstDocs ≠ {} then
  		set lstNodes to my TP2List(item 1 of lstDocs)
  	else
  		return
  	end if
  	end tell
  	
  	-- AND THEN WRITE OUT A TAB-INDENTED VERSION OF THAT LIST
  	set the clipboard to ("TaskPaper " & (current date) as string) & linefeed & my TabIndented(lstNodes, tab)
  end run
  
  -- NESTED LIST TO TAB-INDENTED OUTLINE
  on TabIndented(lstNodes, strTabs)
  	set str to ""
  	repeat with i from 1 to length of lstNodes
  		set {strName, eType, lstChiln} to item i of lstNodes
  		set str to str & strTabs & strName & linefeed
  		if lstChiln ≠ {} then set str to str & TabIndented(lstChiln, tab & strTabs)
  	end repeat
  	return str
  end TabIndented
  
  -- TASKPAPER TO LIST
  on TP2List(oDoc)
  	tell application "TaskPaper"
  		tell oDoc to return my GetTree(its projects)
  	end tell
  end TP2List
  
  on GetTree(lstNodes)
  	tell application "TaskPaper"
  		repeat with i from 1 to length of lstNodes
  			tell item i of lstNodes
  				set lstChiln to entries
  				if lstChiln ≠ {} then
  					set lstSubTree to my GetTree(lstChiln)
  				else
  					set lstSubTree to {}
  				end if
  				set item i of lstNodes to {its name, my Type2Int(its entry type), lstSubTree}
  			end tell
  		end repeat
  		return lstNodes
  	end tell
  end GetTree
  
  on Type2Int(eType)
  	using terms from application "TaskPaper"
  		if eType is project type then
  			return eProj
  		else if eType is task type then
  			return eTask
  		else if eType is note type then
  			return eNote
  		end if
  	end using terms from
  end Type2Int