Annual Diary or Journal

Before I migrated to Joplin I used OneNote for my personal journal. The Office 365 version has OneTastic (3rd party extension) which gives it macro capability. Using this I created a macro which can produce a blank notebook containing sections for a calendar and the months, and populates each section with the requisite number of blank notes per day for each month. You just specify which year you want and run it.

I managed to export the blank notebook to Joplin (I have forgotten how I managed it), but I was wondering how one might replicate that macro in the Joplin environment, or whether anyone has already achieved something similar. I would think that the finished article would be a plugin.

From my point of view this would be a nice to have, as I have blank notebooks already that go to 2028, therefore not urgent to do. It crossed my mind that it would be an interesting project for me to try, depending on the learning curve on the coding side, and what tools and functions might already exist that I can reuse.

Any thoughts, or am I crazy?

Yup, I'm crazy!

Rather than create a blank journal for the year, you can use the Journal plug-in and create the journal page for the day with it as you go. This will create a notebook for the year, and monthly sub notebooks for the daily entries as you create them. By the end of the year, you will have a complete annual journal.

The only downside is for those of you who would like to put appointments and events in future dated pages, as you would in a yearly printed diary.

However, if you are doing this stuff digitally, you are probably already using a calendar app which is ideal for that usage case. You could also cover it by raising Joplin To-dos if you don't use a calendar app.

If you are using Joplin To-dos, I would recommend also installing the Agenda plug-in which will give you visibility of those To-dos as they come due. It is also handy for seeing the recurring to-dos.

So, in conclusion, I have automated the process of creating daily journal pages on my MacBook, using an Apple Script app. This runs when I log in to my machine in the morning. It opens Joplin, creates a new daily page, and inserts my default template, without me having to lift a finger.

The problems to resolve when using this approach are other apps that run on start up that throw up dialog boxes requiring user interaction, configuring the app version of the script to start on log-in, and setting up the privacy and security settings on the Mac so that simulated keystrokes are allowed for the script.

Here is the Apple script:

-- Allow 1 minute for machine to start up apps on logon

with timeout of 200 seconds -- or any other value

delay 60

-- Now open Joplin app

tell application "Joplin"
	activate
end tell

-- Now wait for 1 minute so Joplin can finish syncing on startup

delay 60

-- Now execute the create journal command

tell application "System Events"
	keystroke "D" using {command down, option down, shift down}

-- Wait for app to complete the command

	delay 5

-- Now execute the Insert Template command

	keystroke "I" using {option down, control down, shift down}

-- Wait for app to complete the command

	delay 5

end tell

-- Now execute the dialog box commands to simulate clicking on the OK button.
-- There is a delay of 1 second between each keystroke to allow app to execute it.

tell application "System Events"
	keystroke tab
	delay 1
	keystroke return
	delay 1
	keystroke return
	delay 1

-- and finally, get Joplin to sync the changes

	keystroke "s" using {command down}

end tell

end timeout

1 Like