# Better Journaling with The Archive (and BitBar)

edited December 2020

I was never very consistent with keeping a journal. But in the last weeks I got engaged with the producing of a work log that was actually being useful in helping me organize and clarify my strategies. I had a license bought ages ago for Day One “Classic” that was still working, and was pleased to make use of it... until the iOS version started crashing yesterday evening. 🙄

Although of course I am not at all against developers making a living, the present subscription price for Day One is far from cheap, and combined with current conversion rates for my local currency, it gets extratospherical, disproportional to other investments. Out of my frustration, I tried to reflect on what appeared to be some important features that were helping me keep cultivate the habit:

1. The handy icon at the status bar, which invites to take some seconds or minutes through the day to update on my progress.
2. The ability to quickly review my journal notes for the day, giving me an opportunity to update them or add to them.
3. The once per day explicit reminder with sound and color, that prompted me to write something if I hadn't already, or to once more review my log in the evening.
4. The possibility to take a look at the notes with my phone and give them some last thoughts before finishing the day.

I have the impression that at the end I’ve found an even better solution (for my particular purposes) than what I had before, using The Archive, 1Writer, BitBar and Keyboard Maestro (especially for item 2, as I’ll soon comment; I was doing something similar to the procedure described by Brett Terpsra)

Some observations:

I use the 12-digit year/month/day/hour/minute identification exclusively for my journal notes. (For my main research notes I prefer 4-digit sequential numbering, so they're naturally separated).

I use Keyboard Maestro because it is a very convenient tool. But you don’t necessarily have to use it to implement the routines I’ll describe. You may create standalone scripts and call them with shortcuts configured in the operating system, for example. And you can use cron to run commands periodically etc.

## Invoking The Archive with today’s entries

First, consider this shell script to pop The Archive to look at today’s journal entries:

#!/bin/sh
DAY=date +%Y%m%d
open "thearchive://match/${DAY}"  When invoked, The Archive will do an intelligent job of filtering the notes matching the current date, and selecting the most recently edited. I found this approach even better than what I had with Day One, because I couldn't get its interface to consistently jump to the last edited entry. Differently with The Archive, where that works like a charm and you can easily navigate the other entires with the keyboard. You could bind it to a shortcut and experiment with it in your workflow. I think this tweak by itself is already very useful. ## Creating a Journal Entry Going a step further, I have automated the journal entry creation process. I have a variety of related shortcuts to make new notes, depending on their particular type (bibliographical review, elaboration notes, “descendant” notes etc.), so I bind this particular KM automation to the sequence ^⌘N J: And this is the code: ZK_PATH="/Users/… path to the notes…" DAY=date +%Y%m%d HOUR=date +%H%M NOTE="${ZK_PATH}/${DAY}${HOUR}.markdown"

echo "\tDate: "date +"%d %B %Y %H:%M" >"${NOTE}" echo "\tTags: #journal" >>"${NOTE}"
echo "" >>"${NOTE}" sync open "thearchive://match/${DAY}"


I don’t see much value in adding location, weather conditions etc., but you could increment the script with that information if you want.

I use a tag to identify my journal entries, so that I can filter them with a Saved Search.

That kind of header formatted with tabs is the way Day One exports its entries. (I wasn’t really aware of that syntax before). Both The Archive and 1Writer support it, so the layout is kept consistent. (In 1Writer there’s a small bug with the hashtag inside the header, though, to be reported).

In case you don’t know BitBar, it’s a little wonderful tool if you’re acquainted with scripting. It makes the job of creating all sorts of stuff residing on the menu bar very trivial.

One use of BitBar is to have an icon sitting in the menu bar to evoke The Archive in the way we described in the first step. This appears to have some psychological effect, as I tried to describe, so that I feel stimulated to update my work log notes when there’s some slack during the day.

But we can do more, and have a reminder to activelly prompt us to write once a day. Actually, you could schedule multiple occasions and many conditions, and if you use Keyboard Maestro, that can be done with much ease utilizing its time triggers (or anything else if that makes sense).

The trick will be to use a semaphore/flag to interact with the BitBar plugin. When it sees the flag, it will change the icon to something colourful.

This is the code that will be executed in the KM automation to create the flag and force BitBar to refresh:

touch "$TMPDIR/remember-journal.tmp" open 'bitbar://refreshPlugin?name=journal.sh'  You can also add some inspiring sound effect to accompany the visual effect. (I’ve found this one in freesound good enough). This is the macro in KM: Finally, here follows the code for the BitBar plugin. You should put in a file named journal.sh on BitBar’s plugin folder, and set appropriate execution permissions (0755). #!/bin/bash # <bitbar.title>Journaling with The Archive</bitbar.title> # <bitbar.version>v1.0</bitbar.version> # <bitbar.author>Bruno Conte</bitbar.author> # <bitbar.author.github>brunocbr</bitbar.author.github> # <bitbar.desc>Opens or Remember to write in Journal in The Archive</bitbar.desc> # <bitbar.image></bitbar.image> # <bitbar.dependencies>BASH</bitbar.dependencies> ZK_PATH="/Users/… your path here…" SCRIPT_NAME=$(basename "$0") SCRIPT_DIR=$(dirname "$0") FLAG_FILE="$TMPDIR/remember-journal.tmp"
MENU_LINE="| bash='${SCRIPT_DIR}/${SCRIPT_NAME}' param1=open terminal=false"
DAY=date +%Y%m%d

# Bookmark icon by Kiranshastry
# https://pngtree.com/so/bookmark-icon
INTERFACE_STYLE=$(defaults read -g AppleInterfaceStyle 2>/dev/null) if [[ "$INTERFACE_STYLE" = "Dark" ]]; then
fi
CUR_ICON=${ICON} if [[ -f "${FLAG_FILE}" ]]; then
CUR_ICON=${ICON_ALERT} fi if [[ "$1" = "open" ]]; then
open "thearchive://match/${DAY}" if [ -f "${FLAG_FILE}" ] ; then
rm -f "${FLAG_FILE}" open 'bitbar://refreshPlugin?name=journal.sh' fi fi echo "$MENU_LINE image=\${CUR_ICON}"


Good journaling!

Post edited by brunoc on

• @brunoc Great idea - thanks for sharing it!

Could you comment on how you connect these daily journal entries to other zettels? Just in the "normal" way, or do you have a different approach for this task? I find when creating my normal zettels, the writing is the easier part (notice I didn't say "easy" but just "easier") and connecting the newly created zettel to others in my ZK the more difficult part. Do you find that still to be the case with your daily journal entries?

• Thanks for sharing, that is a super cool way to set things up and create your own "widgets" by composing simple tools! Love it!

I use the 12-digit year/month/day/hour/minute identification exclusively for my journal notes. (For my main research notes I prefer 4-digit sequential numbering, so they're naturally separated).

That's also a clever idea!

Just a quick heads up: I am worried a bit about your sequential numbers only supporting 4 digits; sounds like you'll be finished at 9999 notes. That's actually not that many People on the web made arguments for 999999 to be enough for a couple of lifetimes. I guess you can upgrade to 5 digits later with search and replace without problems, given your aptitude to customize your setup thus far.

A video demo to see everything in action would be really nice, to be honest

Author at Zettelkasten.de • https://christiantietze.de/

• edited December 2020

GeoEng511:11AM Flag
@brunoc Great idea - thanks for sharing it!

Could you comment on how you connect these daily journal entries to other zettels? Just in the "normal" way, or do you have a different approach for this task? I find when creating my normal zettels, the writing is the easier part (notice I didn't say "easy" but just "easier") and connecting the newly created zettel to others in my ZK the more difficult part. Do you find that still to be the case with your daily journal entries?

Hi @GeoEng51 . For this particular type of entries, that is, the journal, I am not doing any linking. Journaling for me is meditating on the work process throught the act of writing, not doing deep reflection on the contents. I’ll register, for example: “I read this and that paper today, and I expect this may be useful for such and such writing projects”. I still have to see what happens in the future, but for now I’m interested in the short-term register (current and few last days).

For actual research, though, I have two main kinds of content notes: one is bibliographical review (they have a #ƒ tag, BibLaTeX citekey and page/location information), and the other comprise notes which are my own reflections (what Umberto Eco called “Idea” notes). Sometimes I register brief musings on the first kind of notes (I reserve Markdown bullets for that purpose), but they are to be really developed as separate “Idea” notes (I mark those items with a #todo tag not to interrupt my reading).

Now, my trick to keep the flow is an automation to produce the “descendant” notes – I won’t call them Folgezetteln to avoid the polemics. 🙂 When triggered, a KM macro will create a new file behind the courtains, paste a wikilink at insertion point (in the original note), and then make The Archive switch to the newly created note so that I may type my reflections.

The macro also takes care of keeping a navigational element, which is a line at the top of the note referencing the ascendant and descendant notes. E. g.:

△[[0581]] ▽[[1821]] ▽[[1823]]


The ascendant link is really important. The links for children notes aren’t really a big deal, as they will normally appear in the text.

• edited December 2020

That's also a clever idea!

Just a quick heads up: I am worried a bit about your sequential numbers only supporting 4 digits; sounds like you'll be finished at 9999 notes. That's actually not that many People on the web made arguments for 999999 to be enough for a couple of lifetimes. I guess you can upgrade to 5 digits later with search and replace without problems, given your aptitude to customize your setup thus far.

A video demo to see everything in action would be really nice, to be honest

@ctietze to be completely honest, my initial concern was simply to separate my (“very important”) research notes from anything else. 🙂

But this use case teaches us, I guess, that timestamps can have semantical value (besides being used as a practical unique identifier generator). Searching for the day sequence makes sense for reviewing today’s journal entries. I could use a macro to browse next/previous days and so on...

As you may remember from previous conversations we had a while ago, I’m an advocate of the serial approach mainly because it’s visually economical. I can’t help thinking of the wikilinks as some sort of “footnotes”. The disadvantage of this method is, of course, the need to keep a counter somewhere, but this can be easily implemented (at least in the Mac, see the AppleScript code below).

As for the limits: in fact, I still have to become such a hard worker as Luhmann. I just did a counting of the number of created files in the last 365 days, and it’s a mediocre figure, below three hundred notes. My last note is numbered 1825 so, if I keep the rhythm, it will take about 27 years for the 4-digit limit to become an aesthetical problem because of the mixing with 5-digit references. But then, if I'm still the obsessive person I am now, it will certainly disturb me. 😄

property thePath : "Users:brunoc:Google Drive:Profile:Scripts:myData.scpt"

script theData
property phiCounter : missing value
end script

try
set theData to load script file (my thePath)
set theData's phiCounter to (theData's phiCounter) + 1
store script (theData) in file (my thePath) replacing yes
on error
set theData's phiCounter to 1
store script (theData) in file (my thePath) replacing yes
end try

set string_zeroes to ""
set digits_to_pad to string_length - (length of (value as string))
set string_zeroes to string_zeroes & "0" as string
end repeat
end if
set padded_value to string_zeroes & value as string


Post edited by brunoc on
• edited December 2020

Maybe you could edit the original post to place the animation on top of it?

Post edited by brunoc on
• @brunoc, thanks for sharing the gif showing the clean and well thought out templating of your journaling workflow. Great idea to use a conflict pallet in Keyboard Maestro for different note templates.

How do you get The Archive to start with nothing in the note list? Is this done by switching to an empty archive folder?

Here's a peek at the start of my DL Daily Log workflow. I use Keyboard Maestro and trigger this macro with ⌃⌥⇧⌘D.

Three things happen.
1. A note is created, and what I consider helpful prompts are inserted.
2. Zettel Stats are inserted. This prompts a review of recent work (helps with spaced recall).
3. Windows are set up in Right Side DL's working context, which stays visible and Left Side, which I use for review, refactoring, working with #inbox. I always have the DL available to work in. I try to use it as a scratchpad for ideas. If I generate anything exciting, I then factor it into its own note.

Once this is done, I type a couple of lines and then slowly scroll showing the stats in this same demonstration. The notes with links at the bottom are the 14 notes new or modified in the last 24 hours plus a bonus random note thrown in for serendipity.

This may be easier to read if you click on it and run it in its own tab.

Will Simpson
“Read Poetry, Listen to Good Music, and Get Exercise”
kestrelcreek.com

• edited December 2020

@Will this is very nice! You're doing a serious job with your journaling, combining it with a review process. I'll try it myself to see if that works for me.

Currently, I don't have such a workflow directly tied to the last edited notes (but that could be a good strategy). I usually pick from a text I was writing or a paper to read (that's why bibliography lists are an important tool for me). But I also very frequently prepare my reading notes using mindmaps first (using MindNode or MarginNote), so there's a part of the process that starts outside the Archive (but always finishes there).

How do you get The Archive to start with nothing in the note list? Is this done by switching to an empty archive folder?

In the demo, The Archive was activated with thearchive://match/20201222. The reason why it was empty was that then I hadn't anything written for the day

• I've made small improvements to the BitBar plugin. You may find the latest version of journal.sh in GitHub.