Keyboard Maestro Obsidian Daily Journal

I recently moved my Daily Journal process from DEVONthink to Obsidian.

Through a combination of Applescript and Shell commands I have automated the creation of the Journal via a Keyboard Maestro macro.

Along with some standard Categories such as Weather (via wttr.in), Daily Quotes and News Headlines (via DEVONthink RSS feeds) I wanted to add in Today’s Events from Calendar and due tasks from Reminders.

Unfortunately the process to extract Calendar Events via Applescript is notoriously slow. Luckily by using icalBuddy via a Shell script this process is much quicker. The icalBuddy approach does not allow for a direct link to the Calendar Event but I included a link to the App for both the Mac and iOS version.

Getting Reminders Tasks can also be slow but this process can be improved if you regularly delete completed tasks. The Applescript I use creates an entry in Obsidian listing the Reminders List and Task Name with a direct link to the Task that works on both platforms.

As per usual it is a continual work in progress but if interested the Keyboard Maestro Macro that I use can be downloaded here.

9 Likes

This looks good. I’ve switched to Obsidian for daily journaling as well, as it’s replaced Zim for me in that regard.

However, in addition, I use a daily note for my work as well and that importing of events would be good. Currently I have an Obsidian template which creates a table and I manually import them, as I create a page for each meeting for notes.

I assume iCalBuddy needs the calendar to be accessible in the Calendar app? Currently I use Busycal, so I’d have to add it to Calendar. I also had to go here to get the 64 bit version for my M1 Mac on Big Sur.

That looks awesome. What do you think is its biggest advantage over DayOne other than no subscription?

Hi,

icalBuddy will work as long as you have the same calendars that you use in BusyCal loaded in to the Calendar app. You may want to change the Calendar app to refresh every minute so as to quickly pick up any new entries in BusyCal.

As far as I know BusyCal has limited AppleScript capability so this routine will be the easiest way to get the Events into Obsidian.

Cheers

Iain

Pricing is major point of course but I think customisation is the big factor. Given the number of Community plugins being developed plus the ability to use AppleScript, Terminal commands, Keyboard Maestro and soon Shortcuts there is so much control you can have over the design and content of an Obsidian based Journal.

Regards

Iain

This is very cool! I don’t use KeyboardMaestro but have done a similar workflow for my weekly plan. I’m struggling though with the dates in icalbuddy - do you know of a way to use sort of relative dates, such as ‘use the closest Monday as the base date’?

I posted my question here, but no luck so far…maybe icalbuddy has fallen out of favourite (or been replaced with something better?). Would much appreciate any advice you might have!

Hi,

Not sure that will be possible, looking at the FAQ the use of relative dates is limited.

Q: How can I automatically get events for a single day (or any date/time range, for that matter) that is relative to the current date (e.g. yesterday, tomorrow or the day after tomorrow)?

As of version 1.7.13 you can specify relative dates such as these in the arguments. The following relative dates are supported: day before yesterday, yesterday, today, now, tomorrow and day after tomorrow. You can also specify a ‘day shift’ (i.e. number of days to add to or remove from) for these relative dates by adding +NUM or -NUM to the end.

Example: get events for tomorrow:

can’t download

I want keyboard maestro workflow

plz

When I click the download link fo the KM script I get, “Sorry, the file you have requested does not exist.”

I’d love to see the icalBuddy integration as I’m doing that manually right now!

Still getting error files does not exist so can’t see it or download it.

Sorry about that, try this link

I haven’t used it, but the CLI for Hook might be helpful in getting links to calendar events.

Any chance you can put it someplace other than requiring a shared iCloud drive?

I don’t use iCloud.

Maybe a GitHub or GitLab repositiry?

Here is a GitHub link, let me know if any issues.

Thanks!

20 characters somehow

Thank you so much

by any chance

rss feed, Is there any way I can use it without devonthink 3?

Hi,

I created this script for you to use instead of relying on Devonthink. Hope it helps.

RSS Feed list

--News Headlines
set RSSFeed to do shell script "curl -s " & quoted form of "http://rss.cnn.com/rss/edition.rss" without altering line endings
tell application "System Events"
	set RSSFeed to make new XML data with properties {text:RSSFeed, id:0, name:"untitled"}
	set RSSRecords to {}
	repeat with xmlElement in (XML elements of XML element "channel" of XML element "rss" of RSSFeed whose name is "item")
		set end of RSSRecords to {RSSTitle:value of XML element "title" of xmlElement, RSSLink:value of XML element "link" of xmlElement}
	end repeat
end tell

set theRSS to ""
set limit to 3 -- number of itmes you want displayed
set counter to 0

repeat with a from 1 to the number of RSSRecords
	set counter to counter + 1
	if (counter > limit) then exit repeat
	set theArticle to item a of RSSRecords
	set RSSTitle to RSSTitle of theArticle
	set RSSLink to RSSLink of theArticle
	--set theRSS to "<a href=\"" & RSSLink & ">\"" & RSSTitle & "</a>"  -- URL
	set the theRSS to theRSS & "[" & RSSTitle & "](" & RSSLink & ")" & return -- MD
	
end repeat

set the clipboard to theRSS

display dialog theRSS -- for testing purposes
2 Likes

amazing!!

You’re awesome!

thank you

Hi,

I have created a shortcut that duplicates most of this process, with the advantage it is now cross-platform, check it out here.