Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty Day One entry #2

Open
underscorephil opened this issue Jan 24, 2015 · 2 comments
Open

Empty Day One entry #2

underscorephil opened this issue Jan 24, 2015 · 2 comments
Labels

Comments

@underscorephil
Copy link
Owner

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.

@ghost
Copy link

ghost commented Jun 8, 2015

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

@underscorephil
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant