taskpaperscripts
taskpaperscripts copied to clipboard
Empty Day One entry
If no tasks are marked as done, an entry with just the log name is created. A log entry should only be created when relevant content exists.
I have very limited experience with AppleScript, but wrapping the do shell script
in an if statement seems to have put a stop to empty logs being created where there are not tasks marked as done. I am sure there is a better solution to the following lines placed at the end of the script:
end repeat
if archived_tasks as string is not equal to "## " & name & return then
-- log done tasks to Day One using jrnl
do shell script "echo " & (quoted form of archived_tasks) & " |tr -d \"\\t\"|/usr/local/bin/jrnl"
end if
end tell
end tell
@hendryolson missed this one too! Thanks again. Will take a peek.