taskpaperscripts icon indicating copy to clipboard operation
taskpaperscripts copied to clipboard

Empty Day One entry

Open underscorephil opened this issue 10 years ago • 2 comments

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.

underscorephil avatar Jan 24 '15 20:01 underscorephil

I have very limited experience with AppleScript, but wrapping the do shell scriptin 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

ghost avatar Jun 08 '15 16:06 ghost

@hendryolson missed this one too! Thanks again. Will take a peek.

underscorephil avatar Sep 24 '15 12:09 underscorephil