-
Star
(221)
You must be signed in to star a gist -
Fork
(47)
You must be signed in to fork a gist
-
-
Save dannberg/48ea2ba3fc0abdf3f219c6ad8bc78eb6 to your computer and use it in GitHub Desktop.
| --- | |
| created: <% tp.file.creation_date() %> | |
| --- | |
| tags:: [[+Daily Notes]] | |
| # <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %> | |
| << [[Timestamps/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|Yesterday]] | [[Timestamps/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow]] >> | |
| --- | |
| ### π Daily Questions | |
| ##### π Last night, after work, I... | |
| - | |
| ##### π One thing I'm excited about right now is... | |
| - | |
| ##### π One+ thing I plan to accomplish today is... | |
| - [ ] | |
| ##### π One thing I'm struggling with today is... | |
| - | |
| --- | |
| # π Notes | |
| - <% tp.file.cursor() %> | |
| --- | |
| ### Notes created today | |
| ```dataview | |
| List FROM "" WHERE file.cday = date("<%tp.date.now("YYYY-MM-DD")%>") SORT file.ctime asc | |
| ``` | |
| ### Notes last touched today | |
| ```dataview | |
| List FROM "" WHERE file.mday = date("<%tp.date.now("YYYY-MM-DD")%>") SORT file.mtime asc | |
| ``` |
- Did you tick "automatic jump to cursor" in Templator's options?
Thanks! This got me, too. I'll have to test this out.
Is there a version based on Obsidian Bases instead of Dataview?
@victorwoo not yet! I haven't had a chance to experiment with Bases yet, but it seems like a great alternative that's now native.
Awaiting good news π
@dannberg : Thank you very much for the efforts you have put in to create these documents. Much appreciated.
I was facing the parsing error while using the code you provided. Even after replacing the " with ' in the code, it didn't work (Screenshot attached). I threw it into ChatGPT and it gave me the following code which worked for me.
Solution that worked for me
Notes created today
LIST WHERE file.cday = date(today) SORT file.ctime ASC
Notes last touched today
LIST WHERE file.cday >= date(today) AND file.cday < date(today) + dur(1 day) SORT file.ctime ASC
I got this parsing error, too. After going back and forth between the video and the template here, I noticed what I believe to be the issue.
Note the ^ character and where it is placed...the double quotes surrounding YYYY-MM-DD should be single quotes. Change those, and then it will parse correctly.
I did this and made sure that the rest of the settings presented in the video and blog were configured. When clicking on the Calendar button, I get a freshly completed Daily Note with the proper date, the Yesterday/Tomorrow links work (creates the file if not present), and the Notes Created/Touched today is populated.
The only thing to figure out is that under Notes I still see - <% tp.file.cursor() %> Not a big deal really but I need to think through if I really want my cursor placed here after opening the template or getting rid of the code and not worrying about it. At this point, this area will likely be a list of tasks/reminders but I haven't decided that as of now.