Skip to content

Instantly share code, notes, and snippets.

@bramses
Last active July 12, 2022 19:12
Show Gist options
  • Select an option

  • Save bramses/0b7b303d6044abde3ffc1c7f49326f81 to your computer and use it in GitHub Desktop.

Select an option

Save bramses/0b7b303d6044abde3ffc1c7f49326f81 to your computer and use it in GitHub Desktop.
How To Add a Conditional To-Do List To A Daily Note in Obsidian (https://www.bramadams.dev/projects/conditional-todo-list)
<%* let day = tp.date.now("dd")
if (day == "Su") { %>
```tasks
not done
heading includes todo/sunday
```
<%* } else if (day == "Sa") { %>
```tasks
not done
heading includes todo/saturday
```
<%* } else if (day == "Fr") { %>
```tasks
not done
heading includes todo/friday
```
<%* } else if (day == "Th") { %>
```tasks
not done
heading includes todo/thursday
```
<%* } else if (day == "We") { %>
```tasks
not done
heading includes todo/wednesday
```
<%* } else if (day == "Tu") { %>
```tasks
not done
heading includes todo/tuesday
```
<%* } else if (day == "Mo") { %>
```tasks
not done
heading includes todo/monday
```
<%* } else { %>
*error loading day's tasks, check [[Daily Notes Template]] and console*
<%* } %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment