├── .gitignore ├── README.md ├── scripts └── tag_previous_daily_note.js └── templates ├── daily-navbar-template.md ├── daily-template.md ├── dashboard-template.md ├── monthly-template.md ├── monthly-work-report-template.md └── snippets-template.md /.gitignore: -------------------------------------------------------------------------------- 1 | attachments/* 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Templates 2 | A repository containing templates and scripts for [Obsidian](https://obsidian.md/) 3 | 4 | ## Plugins 5 | ### Required 6 | - [Templater](https://github.com/SilentVoid13/Templater) 7 | - [Tasks](https://github.com/obsidian-tasks-group/obsidian-tasks) 8 | 9 | ### Recommended 10 | - [Periodic Notes](https://presearch.com/search?q=obsidian%20periodic%20notes) 11 | - [Calendar](https://github.com/liamcain/obsidian-calendar-plugin) 12 | - [Dynamic Table of Contents](https://github.com/aidurber/obsidian-plugin-dynamic-toc) 13 | - [Remotely Save](https://github.com/remotely-save/remotely-save) 14 | - [Web](https://github.com/coddingtonbear/obsidian-web) 15 | 16 | ## Setup 17 | ### Vault structure 18 | My fault looks something like this, so yours should probably look similar: 19 | 20 | ``` 21 | your vault 22 | ├── assets (this repository) 23 | │ ├── attachments (not in this repo) 24 | │ ├── scripts 25 | │ │ ├── ... 26 | │ │ └── ... 27 | │ ├── templates 28 | │ │ ├── daily-template.md 29 | │ │ ├── monthly-template.md 30 | │ │ └── ... 31 | │ └── README.md 32 | ├── periodic-notes 33 | │ ├── daily-notes 34 | │ │ ├── ... 35 | │ │ ├── 2022-11-12.md 36 | │ │ ├── 2022-11-13.md 37 | │ │ └── ... 38 | │ ├── monthly-notes 39 | │ │ ├── ... 40 | │ │ ├── 2022-10.md 41 | │ │ ├── 2022-11.md 42 | │ │ └── ... 43 | │ └── dashboard.md 44 | ├── staging 45 | │ ├── ... 46 | │ └── ... 47 | ├── personal 48 | │ ├── ... 49 | │ └── ... 50 | ├── university 51 | │ ├── ... 52 | │ └── ... 53 | └── ... 54 | ├── ... 55 | └── ... 56 | ``` 57 | 58 | The `assets` directory basically contains everything in this repository. I would recommend forking the repository, so that you can change or add templates and safely store them. Then simply clone the repo into your vault. 59 | 60 | I also added an `attachment` folder. I set it as the `Attatchment folder path` and also configured the `Default location to store new attachments` to store all newly added files there. 61 | 62 | The `Folder to create new notes in` is set to the `staging` folder. The `Default location for new notes` also points to this folder. This way I can create notes on the fly and later move them to wherever they need to be. 63 | 64 | ### Plugin settings 65 | * `Templater` 66 | * disable the `Templates` core plugin 67 | - Set the script folder as your script files folder in `Templater` 68 | - Enable folder templates and the assign the [daily](./templates/daily-template.md) and [monthly](./templates/monthly-template.md) templates to the corresponding folders (you may want to add `Periodic Notes` in order to properly use monthly notes) 69 | - `Tasks` 70 | - I personally don't use a `Global task filter`, so you might want to disable this as well in order for everything to work as designed 71 | - `Periodic Notes` _(optional)_ 72 | - enable daily and monthly notes and keep the default formatting (`yyyy-mm-dd` and `yyyy-mm`) and set the templates 73 | - `Dynamic Table of Contents` _(optional)_ 74 | - Set the `Minimum Header Depth` to 0 75 | - If you decide to not use `Dynamic Table of Contents` you probably want to remove the `[[_TOC]]`-Tag from the templates 76 | - `Web` _(optional)_ 77 | - I use the `Web`-plugin to quickly append useful links to my daily notes. 78 | - install the [Chrome-extension](https://chrome.google.com/webstore/detail/obsidian-web/edoacekkjanmingkbkgjndndibhkegad) 79 | - chose `PATCH` and set `API URL` to `/periodic/daily` 80 | - set `HTTP Headers` to `Heading: Resources` (this will append the content below the "Resources" heading in your daily note) 81 | - set `content` to `- [{{page.title}}]({{page.url}}) {{#if page.selectedText}}{{quote page.selectedText}}{{/if}}` 82 | 83 | ### Dashboard 84 | Create a dashboard by simply copying the [dashboard-template](./templates/dashboard-template.md) somewhere else into your note and renaming it to `dashboard`. 85 | 86 | You can exclude tasks from all `Tasks`-queries by adding filters. This is especially useful if you don't use a global task filter and don't want your dashboard to be cluttered. Here are some examples: 87 | - `filename does not include ` 88 | - `path does not include ` 89 | You can also limit the query to only retrieve tasks from designated files or folders: 90 | - `path does include ` 91 | - `path does include ` 92 | There are multiple other filters you can use in order to customize your queries. You can learn about them by having a look into the official [Tasks documentation](https://obsidian-tasks-group.github.io/obsidian-tasks/queries/filters/). 93 | 94 | ## How to use 95 | ### Tasks 96 | The centrepiece of my vault is the `Task`-plugin. I track most of my tasks in the corresponding daily notes. There are only a few tasks I track in other files. One example are study plans for which I use dedicated notes. However, as long as you don't schedule for the day a task, it won't show up in your daily notes (even though it will show up in your dashboard). You therefore should adapt the templates if you extensively keep tasks in other notes. 97 | 98 | Set the `due date signifier` if the a task has to be done by a specific date. 99 | If you want to track an appointment use the `scheduled date signifier`. Write the time at the beginning of the task, so that your timeline will be sorted correctly: 100 | `- [ ] 06:00-7:30 really important appointment ⏳ 2022-11-03` 101 | 102 | I divided my tasks in different categories (e.g. `personal` or `university`). This unclutters my task list and allows me to easily query those tasks. You can use this fore example to generate monthly reports showing you what tasks of a specific category you completed (check out [monthly-work-report-template](./templates/monthly-work-report-template.md)). 103 | 104 | ### Daily migration 105 | The daily-note's daily migration section will show you all non-completed tasks from the previous day. At the start of each day (or at the end of everyone) go through this section and tick off all completed tasks. Move the remaining tasks to your new note (or migrate them to an even later daily-note) and then tick them off in the old one. 106 | 107 | ### Dashboard 108 | I have the calendar from the `Calendar`-plugin open in the right sidebar so that I can switch quickly between daily notes. 109 | 110 | Below that I opened and pinned my dashboard-note. That way I always have the most urgent tasks on my screen. 111 | 112 | ## Support me 113 | If you like my work please consider supporting me by buying me a coffee: 114 | 115 | [!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/lkrimphove) 116 | -------------------------------------------------------------------------------- /scripts/tag_previous_daily_note.js: -------------------------------------------------------------------------------- 1 | function tag_previous_daily_note(filename, path) { 2 | 3 | files = app.vault.getMarkdownFiles().filter(file => file.path.includes(path)).filter(file => !file.path.includes(filename)); 4 | 5 | now = Date.parse(filename); 6 | 7 | files = files.map(file => { 8 | file.parsed_time = Date.parse(file.basename); 9 | return file; 10 | }); 11 | 12 | files = files.filter((item) => { 13 | return item.parsed_time < now; 14 | }); 15 | files = files.sort((a, b) => a.parsed_time < b.parsed_time); 16 | 17 | return files[0].basename; 18 | } 19 | 20 | module.exports = tag_previous_daily_note; 21 | -------------------------------------------------------------------------------- /templates/daily-navbar-template.md: -------------------------------------------------------------------------------- 1 | [[<% tp.user.tag_previous_daily_note(tp.file.title,"periodic-notes/daily-notes") %>|Previous Daily Note]] || [[<% tp.date.now("YYYY-MM", 0, tp.file.title, "YYYY-MM-DD") %>|Monthly <% tp.date.now("MM", 0, tp.file.title, "YYYY-MM-DD") %>]] -------------------------------------------------------------------------------- /templates/daily-template.md: -------------------------------------------------------------------------------- 1 | [[<% tp.user.tag_previous_daily_note(tp.file.title,"periodic-notes/daily-notes") %>|Previous Daily Note]] || [[<% tp.date.now("YYYY-MM", 0, tp.file.title, "YYYY-MM-DD") %>|Monthly <% tp.date.now("MM", 0, tp.file.title, "YYYY-MM-DD") %>]] 2 | # <% tp.date.now("dddd YYYY-MM-DD", 0, tp.file.title, "YYYY-MM-DD") %> 3 | [[_TOC_]] 4 | 5 | ## Daily Migration 6 | ```tasks 7 | not done 8 | path includes daily-notes/<% tp.user.tag_previous_daily_note(tp.file.title,"periodic-notes/daily-notes") %> 9 | exclude sub-items 10 | 11 | group by heading 12 | 13 | short mode 14 | hide backlink 15 | ``` 16 | 17 | # Tasks 18 | ## Personal 19 | - [ ] 20 | 21 | ## University 22 | - [ ] 23 | 24 | ## Work 25 | - [ ] 26 | 27 | ## GSK 28 | - [ ] 29 | 30 | # Timeline 31 | ```tasks 32 | scheduled on # <% tp.file.title %> 33 | 34 | sort by description 35 | 36 | hide backlink 37 | short mode 38 | ``` 39 | 40 | # Lessons learned 41 | ## Resources 42 | 43 | # Tags 44 | #daily #personal #university #work #gsk -------------------------------------------------------------------------------- /templates/dashboard-template.md: -------------------------------------------------------------------------------- 1 | # Dashboard 2 | [[_TOC_]] 3 | 4 | # Scheduled today 5 | ```tasks 6 | scheduled today 7 | sort by description 8 | ``` 9 | 10 | # Past due 11 | ```tasks 12 | not done 13 | due before date(today) 14 | ``` 15 | 16 | # Due today 17 | ```tasks 18 | not done 19 | due today 20 | ``` 21 | 22 | # Due in 14 days 23 | ```tasks 24 | not done 25 | due after today 26 | due before in 14 days 27 | ``` 28 | 29 | # No due date 30 | ```tasks 31 | not done 32 | no due date 33 | no scheduled date 34 | exclude sub-items 35 | 36 | path does not include assets 37 | ``` -------------------------------------------------------------------------------- /templates/monthly-template.md: -------------------------------------------------------------------------------- 1 | # <% tp.date.now("MMMM YYYY-MM", 0, tp.file.title, "YYYY-MM") %> 2 | [[_TOC_]] 3 | 4 | 5 | 6 | # Scheduled 7 | ```tasks 8 | scheduled after <% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM") %> 9 | scheduled before <% tp.date.now("YYYY-MM-DD", "P1M", tp.file.title, "YYYY-MM" + "-01") %> 10 | 11 | sort by scheduled reverse 12 | sort by description reverse 13 | ``` 14 | 15 | # Miscellaneous 16 | - [[# <% tp.date.now("YYYY-MM-DD", 0, tp.file.title, "YYYY-MM") %>-monthly-report]] 17 | 18 | # Tags 19 | #monthly -------------------------------------------------------------------------------- /templates/monthly-work-report-template.md: -------------------------------------------------------------------------------- 1 | # Monthly-Report <% tp.date.now("MMMM YYYY-MM", 0, tp.file.title, "YYYY-MM") %> 2 | 3 | # Work 4 | - [ ] add hours and confirm time report 📅 <% tp.date.now("YYYY-MM-DD", "P1M", tp.file.title, "YYYY-MM" + "-01") %> 5 | - [ ] add receipts and confirm expenses 📅 <% tp.date.now("YYYY-MM-DD", "P1M", tp.file.title, "YYYY-MM" + "-01") %> 6 | 7 | # Report 8 | ```tasks 9 | heading includes work 10 | done after <% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM") %> 11 | done before <% tp.date.now("YYYY-MM-DD", "P1M", tp.file.title, "YYYY-MM" + "-01") %> 12 | 13 | group by filename 14 | sort by description 15 | 16 | short mode 17 | hide backlink 18 | ``` 19 | 20 | # Tags 21 | #work/monthly-report -------------------------------------------------------------------------------- /templates/snippets-template.md: -------------------------------------------------------------------------------- 1 | ## Overdue 2 | ```tasks 3 | not done 4 | due before <% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %> 5 | exclude sub-items 6 | 7 | group by heading 8 | 9 | hide backlink 10 | short mode 11 | ``` 12 | ## Due tomorrow 13 | ```tasks 14 | due on <% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %> 15 | exclude sub-items 16 | 17 | group by heading 18 | 19 | hide backlink 20 | short mode 21 | ``` 22 | --------------------------------------------------------------------------------