One of the challenges I've had recently is getting a better understanding on what I'm really working on and whether or not it's something I should be working on. I poked around the iOS and Mac app stores looking for a task tracker. I found quite a few apps, but most turned out to be either time sheet/billing apps or simple to do list managers.
So I poked around the interwebs a bit and found a recent post on so, it's come this related to logging patient visits.
The opening paragraph is what caught my eye:
I wanted a better idea of how much time I was spending per visit. This data could also be used when billing by time. I wrote three small macros to complete this task. All three macros use the same trigger, ⌘⌥⌃⇧b. This brings up a menu for me to choose what part of the macro-system I want.
As I read through Michael's post I knew this could be the blueprint for what I wanted:
- Date/time of when the task was worked on.
- Duration of how long I worked on a given task.
- Easy start/stop method while working on my Mac.
- Basic running list of task in a text file.
It was everything I was looking for as a starting point. But I also knew I wanted to have some additional features:
- A dialog box to enter a description of the task I was working on.
- A method to have the same information captured from my iPad or iPhone.
- Validation check if a task had already been started.
WorkLog for Mac
The Mac side of things was fairly straight forward. Michael had already given me a great blueprint on what I wanted. I made some minor tweaks to his Start Task Keyboard Maestro macro. I added a dialog box to enter a task description and expanded the time detail.
Start Work Log: The first KM macro takes the current date/time, the dialog box entry and then appends them to a file on Dropbox.
Stop Work Log: The stop timer macro is similar to the previous one. The KM macro takes the a current date/time, does a difference of the start time to calculate the task duration, and appends the text file on Dropbox.
Download a copy of the KM macros: WorkLog Macro.
WorkLog for iOS
Replicating the same process for iOS was a bigger job, but something I knew that I could handle with Drafts and Pythonista. The iOS workflow consists of four Drafts Actions and two Pythonista scripts. The tasks are logged to the
WorkLogFile.md document, the same as the KM macros.
New Work Log: This is the action that starts the work log process. The Drafts action will call two other actions - Copy the note to the clipboard and then run a script in Pythonista. The script, explained below, calls on another Drafts action to append the WorkLogFile.md file on Dropbox.
Close Work Log: This is the action that ends the work log process. The Drafts action will call a Pythonista script to document the closure and calculate how long the task has been open.
WorkLog_Entry: This is the action that appends the
WorkLogFile.md file with the task description and the start time. This action is what is called on from Pythonista from the New Work Log action.
WorkLog Closure: This action documents the closure details of the current task. This action is called from stopTimer script called from the Close Work Log action.
startTimer.py: This script will document the time the work task began, create a temporary 'timer.txt' file, and then return to Drafts. In the event the timer was already started on a different task it will alert the user and then return to Drafts.
stopTimer.py: This script will document the end of the work task, calculate how long the task was open, and then return to Drafts to append the
Putting it all together
Now with the actions in place, I can go on my iOS device and start a task log entry
In the event I've already started the timer for a work log, I would get an error from Pythonista.
Comments from original WP Post:
Michael: Very cool.