Hey everyone - I am fairly new to Obsidian, and would love to start a “journal” section. However, I am unlucky in being a somewhat of a coding newbie who has spent hours getting Templater to do what I want it to
Things I have tried
My (relevant) setup:
Obsidian 1.0.3
Templater 1.16.0
I have created a “Templates” folder and assigned my “Daily notes” template to a “Journal” folder, which works fine. I have also managed an automatically created YAML header with the help of these two tutorials: 1, 2
I have tried multiple variants of tp.file.rename tp.file.move, but it is likely best to describe below what I would want to achieve rather than to bias potential respondents with what may be the wrong way to go in the first place
What I’m trying to do
I would like to achieve three things with Templater commands:
Rename the file with the current date in the format of “YYYY-MM-DD” (e.g., today would be 2022-11-27 - European style).
Move the file into the “Journal” folder. Optionally: create a year folder (“2022”) within “Journal” and move the note here.
Create a separate title within the note copying the file name.
It is not quite as sophisticated as I wanted it, but it does the trick: instead of pulling the file title with tp.file.title, I opted for a modification to tp.date.now which works the same.
The last command then modifies the file name to the current date.
Why don’t you apply what you did in the other post, and move it into the journal folder?
Not sure what you mean with that last title part, but storing the title like you did there, would enable its use as a heading, if that is what you mean.
Thanks for the suggestion - first I need to spend some time to understand the syntax a little better, and then tinker around with it. As a temporary fix I added
---
title: <% top.date.now("YYYY-MM-DD") %>
---
and modified the “header” to pull from that title:
# <%* tR += title %>
… but happy with the progress made today - thanks again for your help!