The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Logging OmniFocus done items to DayOne through Hazel Thread Tools Search this Thread Display Modes
A draft shell script which can be triggered by Hazel whenever a change is detected in the OmniFocus Sqlite cache, and which logs OmniFocus done items to the Day One journal application.

View description page

View script

--
 
Greetings Rob, I installed the shell script, setup the Hazel rule as pictured, and set the Day One preferences to what you suggested. However, none of my completed tasks for today have (yet) been logged to Day One. Wondering if I have missed a step here? Looking at the shell script, there are references to a log folder and 3 log files-do these need to be set up manually or?
 
Quote:
Originally Posted by Greg Jones View Post
Greetings Rob, I installed the shell script, setup the Hazel rule as pictured, and set the Day One preferences to what you suggested. However, none of my completed tasks for today have (yet) been logged to Day One. Wondering if I have missed a step here? Looking at the shell script, there are references to a log folder and 3 log files-do these need to be set up manually or?
Hi Greg,

That's interesting - thanks for the report.
No, no need to set up log files, and the default log folder is your home directory.

Things to check:
  1. Is it creating ~/DoneToday.txt etc ?
  2. Have you clicked the Done button in DayOne to clear any active editing session and reveal any text from other entry-creating events ?
  3. Have you definitely copied the whole of the script and either pointed Hazel to a file containing it, or pasted it all into Hazel's 'Embedded Script' field ?
  4. If it is creating the ~/DoneToday.txt etc files, what's in them? I wonder if there's a time zone issue which I haven't got right. I happen to be sitting here on an edge case - Greenwich Mean Time ...
 
Quote:
Is it creating ~/DoneToday.txt etc ?
Yes, I have all 3 files in my home directory

Quote:
Have you clicked the Done button in DayOne to clear any active editing session and reveal any text from other entry-creating events ?
Yes, have done this. I've tried completing a task when Day One was active, and completing a task when Day One was not running. No difference-there is no entry for the completed tasks.

Quote:
Have you definitely copied the whole of the script and either pointed Hazel to a file containing it, or pasted it all into Hazel's 'Embedded Script' field ?
I downloaded everything from your github page using the Download button and pointed the Hazel rule to the OmniFocusLogDone2DayOne.sh shell script. The script is version 0.02.

Quote:
If it is creating the ~/DoneToday.txt etc files, what's in them? I wonder if there's a time zone issue which I haven't got right. I happen to be sitting here on an edge case - Greenwich Mean Time ...
The DoneToday and LoggedToday text files contain the completed tasks in the format:

cjetMpZGO96|2012-12-11|05:03|task project and task name
kWaHO1dkp49|2012-12-11|06:45|task project and task name

The JustDone text file is empty, and my time zone is Easter Standard.
 
Thanks ! If DoneToday.txt contains your done items, then the problem is with the logging to DayOne, rather than the harvesting of done items, and I realise that my covering notes (now amended with the help of your feedback) omitted to mention that you need to install the DayOne command line tool

Might that be the issue ?
 
That would indeed be the issue. I wondered why your script referenced a CLI tool for Day One-just assumed it was part of the .app package.

It is working here now-thanks! Just to confirm the expected behavior, should there be a separate entry in Day One for each completed task?
 
Quote:
Originally Posted by Greg Jones View Post
It is working here now-thanks!
Good ! Thanks for the help with finding gaps in the documentation.

Quote:
Originally Posted by Greg Jones View Post
Just to confirm the expected behavior, should there be a separate entry in Day One for each completed task?
The CLI makes one entry per event. My understanding of Hazel is that it is driven by events rather than intervals. If you select a bunch of tasks and mark them all as done, in a single event, they will end up in one entry.

If, however, you move through the page, ticking them off one by one, they will probably end up in different entries.

Might be worth experimenting, if you would prefer more clustering, with Hazel settings like "If the date last modified is in the last 10 minutes". I'm not sure exactly what the implementation of that is.

A line like:
Code:
afplay /System/Library/Sounds/Pop.aiff
after the DayOne command line is called may help diagnosis.

--

Last edited by RobTrew; 2012-12-11 at 04:04 AM..
 
Something like this seems to yield sparser and more aggregated logging events, if that seems preferable:



(But you may need to add a separate and additional ruleset for the same folder to log at one or more fixed times every day, 14:00 and 23:00 for example, to ensure that any remaining unlogged items are processed).

--

Last edited by RobTrew; 2012-12-11 at 04:42 AM..
 
Yes, I'm going to play around with this and see if I can get a more condensed entry. I just entered some dummy tasks from the desktop, closed OF, and checked them off over the last 30 minutes from OF iPhone. When OF Mac was launched again, I got a nice list in on Day One entry, sorted by project and by time within the project. I can make use of this!

 
Version 3:
  1. Makes the final colon of the project line into a live link from Day One back to the project in OmniFocus
  2. Corrects the formatting of items marked as done while still in the Inbox.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic Exporting via Hazel varyags OmniGraffle General 0 2012-03-22 11:43 AM
OmniWeb Download + Hazel halbtuerke OmniWeb Feature Requests 10 2008-05-03 01:49 PM
Time logging Finlay Boo OmniFocus 1 for Mac 5 2008-03-12 12:02 PM
Logging into eBay Twice Kazammm OmniWeb Bug Reports 4 2008-03-04 12:19 PM
Suggestion: Logging! seebs OmniFocus 1 for Mac 0 2007-09-19 04:55 AM


All times are GMT -8. The time now is 11:49 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.