#from GTG.gtk.colors import get_colored_tag_markup

#for $task in $tasks $task_template($task) #end for

#def task_template($task)
- #if $task.has_title $task.title #if $task.has_tags (#slurp #for $tag in $task.tags: $get_colored_tag_markup($plugin_api.get_requester(), $tag, True) #slurp #end for )#slurp #end if
  #end if #if $task.has_due_date Due: $task.due_date
  #end if #if $task.has_text $remove_html_tags($task.text) #end if #if $task.has_subtasks
  #for $subtask in $task.subtasks: $task_template($subtask) #end for
  #end if
#end def ##This is just to avoid annoying characters around. If you don't believe me, ## just take it out #import re #def remove_html_tags($data): #return $data ##Removing subtask anchor points #set $p = $re.compile(r'^.*[0-9]*@[0-9]*.*$',$re.MULTILINE) #set $data = $p.sub('', $data) ##Removing tags #set $p = $re.compile(r'@[a-z,0-9]*',$re.IGNORECASE) #set $data = $p.sub('', $data) ##Removing and #set $p = $re.compile(r'<.*?>') #set $data = $p.sub('', $data) ##Removing lines only with commas (tags lines) #set $p = $re.compile(r'^[\s,\,]*$') #return $p.sub('', $data) #end def