Skip to content

Commit

Permalink
Add template documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alangrainger committed Aug 21, 2023
1 parent e786990 commit 0d5ba9e
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 12 deletions.
8 changes: 8 additions & 0 deletions .obsidian/hotkeys.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,13 @@
],
"key": "T"
}
],
"templater-obsidian:Utility/Templates/Tasks menu.md": [
{
"modifiers": [
"Alt"
],
"key": "T"
}
]
}
6 changes: 3 additions & 3 deletions .obsidian/plugins/templater-obsidian/data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"command_timeout": 5,
"templates_folder": "99 Utility/Templates",
"templates_folder": "Utility/Templates",
"templates_pairs": [
[
"",
Expand All @@ -11,7 +11,7 @@
"auto_jump_to_cursor": false,
"enable_system_commands": false,
"shell_path": "",
"user_scripts_folder": "99 Utility/Scripts/Templater",
"user_scripts_folder": "Utility/Scripts/Templater",
"enable_folder_templates": true,
"folder_templates": [
{
Expand All @@ -21,7 +21,7 @@
],
"syntax_highlighting": true,
"enabled_templates_hotkeys": [
"99 Utility/Templates/Tasks menu.md"
"Utility/Templates/Tasks menu.md"
],
"startup_templates": [
""
Expand Down
8 changes: 8 additions & 0 deletions .obsidian/types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"types": {
"aliases": "aliases",
"cssclasses": "multitext",
"tags": "tags",
"exclude_master_tasklist": "checkbox"
}
}
5 changes: 5 additions & 0 deletions 01 Project Management/Projects/Renovate the kitchen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#project

## Todo
- [ ] #waiting-on Brent to email me back with a kitchen quote
- [ ] Compare the quotes from Kitchen World and Kitchen Studio
5 changes: 2 additions & 3 deletions 02 Documentation/How this works.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,9 @@ To mark a **project** as priority, add a #🔼 tag. All of the tasks in this pro

## Someday/Maybe

To flag a task as someday/maybe, just add the tag #someday to the task. You can toggle this quickly by using the task hotkey `Alt+T` and choosing `Toggle #someday`.

To flag a task as someday/maybe, just add the tag #someday to the task. You can toggle this quickly by using the task hotkey `Alt+T` and choosing `Toggle #someday`. You'll need to set up the [Task menu template](Task%20menu%20template.md) for this to work.
## Clean-up/Archive completed tasks

If you have a lot of completed tasks on a page and want to archive them to a central location, there's a handy shortcut for that.

On any page press `Alt+T` and choose `Archive/Remove completed tasks`. This will move tasks from that page to the [🗄️ Completed tasks](../01%20Project%20Management/🗄️%20Completed%20tasks.md) page.
On any page press `Alt+T` and choose `Archive/Remove completed tasks`. This will move tasks from that page to the [🗄️ Completed tasks](../01%20Project%20Management/🗄️%20Completed%20tasks.md) page. You'll need to set up the [Task menu template](Task%20menu%20template.md) for this to work.
36 changes: 36 additions & 0 deletions 02 Documentation/Task menu template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
exclude_master_tasklist: true
---

There is an optional [Templater](https://github.com/SilentVoid13/Templater) template which you can assign to a hotkey, to give a handy task menu. The default hotkey is `Alt+T`.

![](attachments/Pasted%20image%2020230821132802.png)

The template requires two things to work:

1. The [Tasks menu.md](../Utility/Templates/Tasks%20menu.md) template file. This needs to be placed in your Templater **Template folder location**.
2. The two Templater user scripts in the `Utilty/Scripts/Templater` folder. These need to be placed in your Templater **User Scripts folder**.

## Insert task

This is a quick way to add a task on any page. If the page is in **reading mode**, it will set the page to edit mode and then add the task at the end of the page.

If the page is in **edit mode**, it will add a new task where the cursor is, adding a line-break if necessary. Tasks will be added with a created date, using the Tasks plugin [created date format](https://publish.obsidian.md/tasks/Getting+Started/Dates#Created+date), like this:

- [ ] Here's an example task showing a created date ➕2023-08-21

If you don't like having the date you can remove it from the template.

## Insert waiting on task

This will pre-populate the new task with the #waiting-on tag:

- [ ] #waiting-on Dave to deliver the report ➕2023-08-21

## Toggle somedate

Toggles the #someday tag on the current task.

## Archive/Remove completed tasks

Will move all completed tasks from the current page to the [🗄️ Completed tasks](../01%20Project%20Management/🗄️%20Completed%20tasks.md) page. This is especially handy for cleaning up the [📝 Next actions list](../01%20Project%20Management/📝%20Next%20actions%20list.md).
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions 02 Documentation/tasks.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,37 @@ Utility/Scripts/Dataview/tasks.js
```

You may wish to edit the configuration at the top of the file. Full explanation of all options is found in the [How this works](How%20this%20works.md).

This is the default configuration:

```js
/*
* ---------------------
* CONFIGURATION OPTIONS
* ---------------------
*
* Add the folders, tags, and headings which should be excluded.
* Tasks found on pages with these tags or paths will not appear in the Tasks page.
* Headings will to exclude tasks that fall under a heading with this name.
*/
const globalExclude = {
folders: [
'Utility'
],
tags: [
'#exclude-master-tasklist',
'#completed'
],
headings: [
'🌱 Daily Habits'
]
}
/*
* When displaying tasks from a project, tasks that fall under headings with these
* names won't have these headings displayed when showing the project info
*/
const hideSubsectionName = [
'Todo',
'Tasks'
]
```
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ After some trial-and-error, I managed to write a workable implementation with Da
## Features

- Task sequencing
- Priority and Someday tasks
- Priority, Waiting-On, and Someday tasks
- Notification of projects without next actions
- Requires only the Dataview plugin to be installed (Templater is also recommended)
- Compatible with Tasks plugin
- If a task is part of a project, the project information is displayed along with the task in the master task list
- Everything is done from a single Dataview script, which makes it highly configurable and adaptable for almost any use case
- Everything is done from a single Dataview script, which makes it highly configurable and adaptable for almost any use case

![](./02%20Documentation/attachments/Pasted%20image%2020230821082403.png)
![](02%20Documentation/attachments/Pasted%20image%2020230821133422.png)

## How to set up

1. [Download the GTD demo vault](https://github.com/alangrainger/obsidian-gtd/archive/refs/heads/main.zip) and test it out. This is an already-configured working vault which will give you an idea of whether you like the system, and what features of it you might want to implement in your own vault.
2. The "brains" of the system is a single Dataview script: [tasks.js](02%20Documentation/tasks.js.md). You can put this anywhere in your vault and Dataview will find it. I personally like to put all my scripts in a single folder, like `Utility/Scripts/Dataview`.
3. You can optionally add the Templater user scripts and template from the `Utility/Scripts/Templater` and `Utility/Templates` folders. If you use this template, make sure to assign it to a hotkey.
3. You can optionally add the [Task Menu template](02%20Documentation/Task%20menu%20template.md) from the `Utility/Scripts/Templater` and `Utility/Templates` folders. If you use this template, make sure to assign it to a hotkey.

## Next steps

Expand Down
4 changes: 2 additions & 2 deletions Utility/Scripts/Dataview/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const globalExclude = {
]
}
/*
* When displaying tasks from a project, tasks that fall under headings with these names
* won't have these headings displayed when showing the project info
* When displaying tasks from a project, tasks that fall under headings with these
* names won't have these headings displayed when showing the project info
*/
const hideSubsectionName = [
'Todo',
Expand Down

0 comments on commit 0d5ba9e

Please sign in to comment.