Daily note template based on day of the week (bonus: link note to current day) #240
Replies: 5 comments 8 replies
-
I was struggling to figure out how to include partial templates in other templates -- this is exactly what I was trying to accomplish! And linking the day planner to today's note is the icing on the cake! 🎉 Thanks!!! ❤️ |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, I m really interested in using this feature but i really don't know how. Can u please helpe me out.
i know im such a n00b but i really want to use this. thnks a lot
|
Beta Was this translation helpful? Give feedback.
-
@jroachgit , you caught me!😆 I use the daily notes/periodic notes plugins, and that date code was leftover from their date templating language. (I'll admit that it's a little more succinct, albeit more limited...) I've since changed it to use Templater code instead, for consistency, but back when I posted this my daily/weekly/monthly templates were kind of a mishmash 😛 Here's what my daily template looks like now:
|
Beta Was this translation helpful? Give feedback.
-
Slight tweak of the function but allows customization of notes within obsidian. This way you can modify the included files within obsidian including using [[]] to autocomplete function scheduleWeekday(tp, files) {
switch (parseInt(moment(tp.file.title).format('d'))) {
case 1:
case 2:
case 3:
case 4:
case 5:
return tp.file.include(files.weekday)
case 0:
case 6: return tp.file.include(files.weekend)
}
}
module.exports = scheduleWeekday; Invocation: <%
tp.user.scheduleDaily(tp, {
weekday: "[[Utilities/Templater/Templates/Blocks/Process/P-Weekdays]]",
weekend: "[[P-Weekends]]",
})
%> |
Beta Was this translation helpful? Give feedback.
-
Hey, {
"id": "obsidian-day-planner:re-sync",
"name": "Day Planner: Re-sync tasks"
},
{
"id": "obsidian-day-planner:show-day-planner-timeline",
"name": "Day Planner: Show timeline"
},
{
"id": "obsidian-day-planner:show-weekly-view",
"name": "Day Planner: Show week planner"
},
{
"id": "obsidian-day-planner:show-day-planner-today-note",
"name": "Day Planner: Open today's Day Planner"
},
{
"id": "obsidian-day-planner:insert-planner-heading-at-cursor",
"name": "Day Planner: Insert Planner Heading at Cursor"
}, Is there a solution to this? |
Beta Was this translation helpful? Give feedback.
-
I wanted a solution to populate different Day Planner schedules based on the current day of the week, and with some help from @shabegom I have achieved this with the following:
User JS scripts:
scheduleTemplate.js
command.js
Daily note Template
Beta Was this translation helpful? Give feedback.
All reactions