Thanks again Rob.
I've edited the script like this and it's working okay for me now.
{
if (prj!=$5) {prj=$5;
if (prj!="") {print ("\n" prj_prfx prj) >> "tmp_pretty.txt" }
else {print ("\nInbox") >> "tmp_pretty.txt"}
}
if ($6!=prj) {print ("- " $6 " @done(" $4 ")") >> "tmp_pretty.txt" }
else {{print "- *Project completed* @done(" $4 ")" >> "tmp_pretty.txt" }}
}'
I've got a folder with "Single Actions" and thought about changing the script to leave the "project-name" out for this folder but after doing a quick preview in DO decided against it. The heading improves readability so I'll keep it in.
I've edited the script like this and it's working okay for me now.
{
if (prj!=$5) {prj=$5;
if (prj!="") {print ("\n" prj_prfx prj) >> "tmp_pretty.txt" }
else {print ("\nInbox") >> "tmp_pretty.txt"}
}
if ($6!=prj) {print ("- " $6 " @done(" $4 ")") >> "tmp_pretty.txt" }
else {{print "- *Project completed* @done(" $4 ")" >> "tmp_pretty.txt" }}
}'
I've got a folder with "Single Actions" and thought about changing the script to leave the "project-name" out for this folder but after doing a quick preview in DO decided against it. The heading improves readability so I'll keep it in.