Another Journal setup / template approach

It’s amazing to see what the community does with SB!

I’ve set up a Daily Journal for myself and wanted to share it – maybe someone finds this helpful.

Please note that I am not in any way familiar with programming - probably there is an easier way of doing this …

My Daily Notes are organized like this:

Journal / Years / “Current Year” / “Quarter” / “Month” / “Date”

```space-lua

function get_quarter_by_number(month_num)
  -- month_num: Number 1..12 (or String "01".."12")
  local m = tonumber(month_num)
  if not m then return nil end
    return math.floor((m - 1) / 3) + 1
end

This function helps me calculate the current quarter.

My Template looks like this

---
command: "Journal: Daily Note"
suggestedName: "Journal/Years/${os.date(\"%Y\")}/Q${get_quarter_by_number(os.date(\"%m\"))}/${os.date(\"%B\")}/${date.today()}"
confirmName: false
openIfExists: true
tags: ["meta/template/page", "meta"]
frontmatter: "tags: Daily_Journal ${os.date(\"%B\")}\ndate: ${date.today()}"
---

This always creates the correct filename with the current date and quarter.

Maybe this setup is useful for someone else as well – I’d love to hear your thoughts or improvements!

Nice one! As a quick suggestion on how to write this a bit nicer using YAML’s multi-line string syntax (for the frontmatter key).

Also, YAML supports both single and double quotes, so you can leverage that to avoid escaping.

---
command: "Journal: Daily Note"
suggestedName: 'Journal/Years/${os.date("%Y")}/Q${get_quarter_by_number(os.date("%m"))}/${os.date("%B")}/${date.today()}'
confirmName: false
openIfExists: true
tags: ["meta/template/page", "meta"]
frontmatter: |
  tags: Daily_Journal ${os.date("%B")}
  date: ${date.today()}
---

I have two journal setups that I use daily: I have morning pages, where I try to dump everything that’s in my brain in a stream of consciousness, trying to write at least 500 words; I also have a daily journal that I write in interstitially throughout the day, making use of the /time command to write a sentence every once in a while about what I’m working on or thinking or who I’ve talked to.

At work, this helps a lot during quarterly review time, since I have records of progress per day. On a personal level, it helps me recognize progress and trends that I normally am too close to see.

Here’s the /time command, living in Library/drhayes/Slash Templates/time:

---
description: Insert the current time.
tags: meta/template/slash
---
${os.date('%H:%M')}|^|

Here’s my Morning Pages template, living at Library/drhayes/Page Templates/Morning Pages:

---
command: 'Journal: Morning Pages'
suggestedName: 'Daily/Morning Pages/${date.today()}'
confirmName: false
openIfExists: true
tags: meta/template/page
---

---
tags: morningpages, journals
---

# How are you feeling?

|^|

# What are you grateful for?

Thank you! Makes everything a bit more readable!

I took the liberty to copy the /time command … that was a good Idea.