Custom task statuses plus various fixes
This commit is contained in:
@@ -8,6 +8,8 @@ This release brings a new default [[Client Modes|client mode]] to SilverBullet:
|
||||
|
||||
Other notable changes:
|
||||
* Massive reshuffling of built-in [[🔌 Plugs]], splitting the old “core” plug into [[🔌 Editor]], [[🔌 Template]] and [[🔌 Index]].
|
||||
* [[🔌 Tasks]] now support custom states (not just `[x]` and `[ ]`), for example:
|
||||
* [IN PROGRESS] An in progress task
|
||||
* Removed [[Cloud Links]] support in favor of [[Federation]]
|
||||
|
||||
---
|
||||
|
||||
+1
-9
@@ -83,15 +83,7 @@ docker run -p 3000:3000 -v myspace:/space -d -e SB_USER=me:letmein zefhemel/silv
|
||||
|
||||
To build your own version of the docker image, run `./scripts/build_docker.sh`.
|
||||
|
||||
You can also use docker-compose if you prefer. From a silverbullet check-out run:
|
||||
|
||||
```shell
|
||||
PORT=3000 docker-compose up
|
||||
```
|
||||
|
||||
or similar.
|
||||
|
||||
To upgrade, simply pull the latest docker image (rebuilt and pushed after every commit to "main") and start the new container.
|
||||
To upgrade, simply pull the latest docker image and start the new container.
|
||||
|
||||
```shell
|
||||
docker pull zefhemel/silverbullet
|
||||
|
||||
@@ -1 +1 @@
|
||||
* [{{#if done}}x{{else}} {{/if}}] [[{{page}}@{{pos}}]] {{name}}
|
||||
* [{{state}}] [[{{page}}@{{pos}}]] {{name}}
|
||||
+45
-10
@@ -3,17 +3,33 @@ type: plug
|
||||
repo: https://github.com/silverbulletmd/silverbullet
|
||||
---
|
||||
|
||||
The Tasks plug implements a lot of the task support in SilverBullet.
|
||||
The Tasks plug implements task support in SilverBullet.
|
||||
|
||||
Tasks in SilverBullet are written using semi-standard task syntax:
|
||||
## Task states
|
||||
The tasks plug support the standard “done” and “not done” states via `[x]` and `[ ]` notation in the context of a list (this is fairly widely accepted [[Markdown]] syntax):
|
||||
|
||||
* [ ] This is a task
|
||||
* [ ] This is a task (toggle me!)
|
||||
|
||||
However, custom states can also be used for extra flexibility:
|
||||
|
||||
* [TODO] This task is still to do
|
||||
* [IN PROGRESS] In progress task
|
||||
* [RESOLVED] A resolved task
|
||||
* [-] Whatever this state means
|
||||
* [/] Or this one
|
||||
|
||||
You can cycle through the states by clicking on the status or by running the {[Task: Cycle State]} command while on a task. There is also auto complete for all known custom task states in a space.
|
||||
|
||||
## Annotations
|
||||
Tasks can also be annotated with [[Tags]]:
|
||||
|
||||
* [ ] This is a tagged task #my-tag
|
||||
|
||||
You can _toggle_ a task state either by putting in an `x` or `X` inside the box or by simply clicking/tapping on the box. Alternatively, you can use the {[Task: Toggle]} command to toggle the task you’re currently in.
|
||||
As well as [[Attributes]]:
|
||||
|
||||
* [ ] This is a task with attributes [taskAttribute: true]
|
||||
|
||||
## Deadlines
|
||||
|
||||
Tasks can specify deadlines:
|
||||
|
||||
@@ -21,12 +37,31 @@ Tasks can specify deadlines:
|
||||
|
||||
When the cursor is positioned inside of a due date, the {[Task: Postpone]} command can be used to postpone the task for a certain period.
|
||||
|
||||
This metadata is extracted and available via the `task` query source to [[🔌 Directive/Query]]:
|
||||
## Querying
|
||||
All meta data (`done` status, `state`, `tags`, `deadline` and custom attributes) is extracted and available via the `task` query source to [[🔌 Directive/Query]]:
|
||||
|
||||
<!-- #query task where page = "{{@page.name}}" -->
|
||||
|name |done |page |pos|tags |deadline |
|
||||
|-----------------------------|-----|--------|---|------|----------|
|
||||
|This is a task |false|🔌 Tasks|213| | |
|
||||
|This is a tagged task #my-tag|false|🔌 Tasks|279|my-tag| |
|
||||
|This is due |false|🔌 Tasks|565| |2022-11-26|
|
||||
|name |done |state |page |pos |tags |taskAttribute|deadline |
|
||||
|--|--|--|--|--|--|--|--|
|
||||
|Remote toggle me |false| |🔌 Tasks|3056| | | |
|
||||
|This is a task (toggle me!) |false| |🔌 Tasks|321 | | | |
|
||||
|This task is still to do |false|TODO |🔌 Tasks|420 | | | |
|
||||
|In progress task |false|IN PROGRESS|🔌 Tasks|454 | | | |
|
||||
|A resolved task |false|RESOLVED |🔌 Tasks|487 | | | |
|
||||
|Whatever this state means |false|- |🔌 Tasks|516 | | | |
|
||||
|Or this one |false|/ |🔌 Tasks|548 | | | |
|
||||
|This is a tagged task #my-tag |false| |🔌 Tasks|824 |my-tag| | |
|
||||
|This is a task with attributes|false| |🔌 Tasks|889 | |true| |
|
||||
|This is due |false| |🔌 Tasks|993 | | |2022-11-26|
|
||||
<!-- /query -->
|
||||
|
||||
## Rendering
|
||||
There is a [[!silverbullet.md/template/task]] template you can use to render tasks nicely rather than using the default table (as demonstrated above). When you use this template, you can even cycle through the states of the task by click on its state _inside_ the rendered query, and it will update the state of the _original_ task automatically (although not yet in reverse) — this works across pages.
|
||||
|
||||
Try it (by clicking on the checkbox inside of the directive):
|
||||
|
||||
<!-- #query task where page = "{{@page.name}}" and name = "Remote toggle me" render [[template/task]] -->
|
||||
* [ ] [[🔌 Tasks@3056]] Remote toggle me
|
||||
<!-- /query -->
|
||||
|
||||
* [ ] Remote toggle me
|
||||
|
||||
Reference in New Issue
Block a user