Markdown formatted list of Completed actions

Don’t know how tall of an order this is, but it would be immensely helpful and gratifying to be able to export a list of markdown formatted completed actions on a daily or weekly basis to Day One the great journalling app.

The export to plain text feature almost does this and spits out the following:

MISCELLANEOUS PROJECT:
- Call Ken regarding that thing @Calls @done
- Call Geordi regarding Heisenberg uncertainty principle @Calls @done
- Call Jean-Luc regarding what brand of head wax to use @Calls @flag @done
note: be sensitive, he is the captain after all

This is very helpful and I like how it adds the context, at[Calls] and an at[done] and at[flag]. But what would be even more helpful is if it formatted it for me like this:

##MISCELLANEOUS PROJECT:

  • Call Ken regarding that thing @Calls @done
  • Call Geordi regarding Heisenberg uncertainty principle @Calls @done
  • Call Jean-Luc regarding what brand of head wax to use @Calls @flag @done
    • note: be sensitive, he is the captain after all

The formatting thing isn’t a big deal with a small project like this but it becomes extremely complicated when I export a ton of projects.

3 Likes

Greetings!

What you’re hoping for may be found in the scripts Jered Benoit and Marko Kastner have created. The scripts of these two enviable wizards can be found at the following sites:

Jerod Benoit: http://jeredb.com/omnifocus-to-day-one-daily-log-of-completed-tasks

Marko Kastner: http://markokaestner.com/blog/friday-reflection-with-omnifocus

If you want to use Kastner’s “OF2DayOne.sh” shell script you will need to modify lines 9 through 12 as follows:

line 9: change from: local OFCD="${HOME}/Library/Caches/com.omnigroup.OmniFocus"
line 9: change to: local OFCD="${HOME}/Library/Containers/com.omnigroup.OmniFocus2/Data/Library/Caches/com.omnigroup.OmniFocus2"

delete lines 10-12.

2 Likes

I use Brett Terpstra’s Slogger script to accomplish this. Slogger comes with a great number of plugins to log activity from a series of services into Day One, including a plugin for OmniFocus.

3 Likes

Great suggestion, from the description and in retrospect hearing about it before as something I should look into, it sounds like the perfect solution.

Unfortunately when I tried it I ran into multiple problems getting it to work. Probably because I’m inept at using Terminal.

Any suggestions/ other suggestion?

Hi, does Slogger work with OmniFocus 2? I want to confirm before I upgrade from OF1. Thanks!

In theory, yes, Slogger works with Omnifocus 2. I have been using it during the beta program.
However, somehow it stopped working last week, but I haven’t had the time to dig into this issue.

Yes, the installation process is quite daunting. Slogger is definitely a hack.

I also ran into some installation issues. My solution was changing step 2 from

sudo gem install bundler
bundle install

to:

sudo gem install bundler
sudo bundle install

Thanks for the reply! I tried it myself with the beta and it seemed to work.

I have no idea why but I completely missed this reply back when it was first made. My apologies.

In the intervening year I had a pro make this script for me which I’m happy to share with everyone.

Unfortunately, It is now throwing this error so its useless to me at present: error “sh: line 54: /usr/local/bin/dayone: No such file or directory” number 127

My main machine died recently so I’m running this script on a borrowed laptop til I get a new machine in. What’s odd is I ran the script without any difficulties once I believe in this setup.

I get the same error when I try to run the single day script at http://jeredb.com/omnifocus-to-day-one-daily-log-of-completed-tasks

All of my inquiries with the guy who created it have gone completely ignored, so I’m not holding my breath on any help from him, but perhaps here…

   (* 
======================================
// USER SWITCHES (YOU CAN CHANGE THESE!)
======================================
*)
--CHANGE 'make_Title' TO 'TRUE' TO GENERATE REPORT TITLE HEADER
--(YOU CAN CHANGE TEXT IN 'SET THE REPORT TITLE' SECTION OF MAIN PROGRAM
property make_Title : true

--CHANGE 'num_Days' TO DESIRED DATE RANGE (DEFAULT IS 7 DAYS)
property num_Days : 7

(* 
======================================
// OTHER PROPERTIES (USE CAUTION WHEN CHANGING)
======================================
*)

property strCompleted : ""
property ExportList : ""

(* 
======================================
// MAIN PROGRAM 
======================================
*)

--SET THE REPORT TITLE
if make_Title is true then set ExportList to "# Projects and Tasks Completed in the Last " & num_Days & " Days" & return & "---" & return & return as Unicode text

tell application "OmniFocus"
	tell its default document
		set time_Ago to (current date) - num_Days * days
		--PROJECTS
		set done_Projects to (every flattened project where its status is done and completion date ≥ time_Ago)
		repeat with done_Project in done_Projects
			set com_Date to completion date of done_Project
			set strCompleted to strCompleted & "# " & (name of done_Project) & " (Completed " & (short date string of com_Date) & ")" & return as string
			
			--TASKS
			set done_Tasks to (every flattened task in done_Project where its completed is true and completion date ≥ time_Ago)
			repeat with done_Task in done_Tasks
				set varContext to (context of done_Task)
				set varNote to (note of done_Task)
				set task_Name to "* **" & (name of done_Task) & "**" as string
				--CONTEXT
				if varContext is not missing value then set task_Name to task_Name & " *@" & (name of varContext) & "*"
				if varNote is not missing value then
					if varNote is not "" then
						set task_Name to task_Name & return & "  * " & varNote
					end if
				end if
				set strCompleted to strCompleted & task_Name & return
			end repeat
			
			--FINALIZE PROJECT/TASKS
			set strCompleted to strCompleted & return
		end repeat
	end tell
end tell

--PREPARE STRING FOR DAYONE…
set ExportList to ExportList & strCompleted as Unicode text

--MAKE NEW ENTRY IN DAYONE
do shell script "echo " & (quoted form of ExportList) & "|tr -d \"\\t\"|/usr/local/bin/dayone new"

I am returning to retry omnifocus again after a break. The dealbreaker for me is not having the satifisfaction of seeing. a nicely formatted list of daily completed tasks (even reminders now does this really nicely when paired with Busy Cal).

Do I still need to get one of the scripts above to work? I have had a quick pay looking at Completed in Perspectives but frankly it still looks very complicated.

Would appreciate an update from anyone who’s still active on this thread.

And WOW! If it integrated with Day One wouldn’t that be awesome! Think I also requested this 2 or 3 years ago too…

In a testing phase against Todoist as they seem to do this better…

Many thanks for all your suggestions.

Many thanks, Jenni

I’ve given up on doing it through AppleScript and now use the Completed perspective combined with a Keyboard Maestro Macro I’ve created that

  1. copies the completed projects into taskpaper format
  2. pastes the completed tasks into a new TextEdit doc
  3. does a search and replace, really remove, for @parallel(true), @autodone(true), @autodone(false), @parallel(false)
  4. copies the shortened task list back to the clipboard
  5. and finally opens Day One for me
1 Like