Code Monkey home page Code Monkey logo

obsidian-tasks's Introduction

Obsidian Tasks

Task management for the Obsidian knowledge base.

User Guide - Contributing Guide - Roadmap

Track tasks across your entire vault. Query them and mark them as done wherever you want. Supports due dates, recurring tasks (repetition), done dates, sub-set of checklist items, and filtering.

You can toggle the task status in any view or query and it will update the source file.


For changes in each release, please check the releases page: https://github.com/obsidian-tasks-group/obsidian-tasks/releases


Screenshots

  • All screenshots assume the global filter #task which is not set by default (see also installation).
  • The theme is default Obsidian theme.

ACME Tasks The ACME note has some tasks.

Important Project Tasks The Important Project note also has some tasks.

Tasks Queries The Tasks note gathers all tasks from the vault and displays them using queries.

Create or Edit Modal The Tasks: Create or edit command helps you when editing a task.

Installation

Follow the steps below to install Tasks.

  1. Search for "Tasks" in Obsidian's community plugins browser
  2. Enable the plugin in your Obsidian settings (find "Tasks" under "Community plugins").
  3. Check the settings. It makes sense to set the global filter early on (if you want one).
  4. Replace the "Toggle checkbox status" hotkey with "Tasks: Toggle Done".
    • I recommend you remove the original toggle hotkey and set the "Tasks" toggle to Ctrl + Enter (or Cmd + Enter on a mac).

Getting Started

Write some tasks

Create a few tasks in a Markdown note in your vault. For example:

- [ ] Something non-important, with no date
- [ ] Remember to do that important thing - with a due date 📅 2022-12-17
- [ ] Send Kate a birthday card - with a scheduled date 🔁 every January on the 4th ⏳ 2023-01-04

Find out more in Getting Started, and its sub-sections.

Create your first Tasks search

And then write a Tasks search block somewhere in your Obsidian vault, to find the tasks that are interesting.

Here is an example that shows a few different features. View it in Reading or Live Preview modes to see the results.

```tasks
# Only tasks that are not done, that is, which begin like this (but without the quotes):
#   '- [ ] ' or
#   '* [ ] ' or
#   '1. [ ] '
# Indented tasks are supported, but only single-line tasks.
not done

# Tasks due today or earlier:
due before tomorrow

# Restrict to at most 100 tasks.
# If you ask Tasks to display many hundreds or thousands of tasks,
# Obsidian's editing performance really slows down.
limit 100

# Group and sort the output:
group by filename
sort by due reverse
sort by description

# Optionally, ask Tasks to explain how it interpreted this query:
explain
```

Find out more in Queries, and its sub-sections.

Documentation

For user documentation, please check https://publish.obsidian.md/tasks/.

Development

Clone the repository, run yarn to install the dependencies, and run yarn dev to compile the plugin and watch file changes.

Then see the Contributing Guide.

Donations

The plugin is completely free to use, and very willingly developed and supported by Clare Macrae since May 2022.

If you have particularly been helped by the Tasks plugin and wish to support it, please see the following link.

Donations will go towards my computing costs and licenses for development tools that I use for productivity.

Thank you 🙏.

obsidian-tasks's People

Contributors

3bit avatar annakornfeldsimpson avatar blubloos avatar chrabia avatar chuckthenerd avatar cito avatar claremacrae avatar danieltmolloy919 avatar dependabot[bot] avatar esm7 avatar github-actions[bot] avatar ilandikov avatar kedestin avatar kongolan avatar ldanet avatar liambresnahan avatar mauleb avatar mgmeyers avatar mohamedbassem avatar mvdkwast avatar nikhilramolla avatar pistolpeter avatar rdimaio avatar sbliven avatar schemar avatar skn0tt avatar sytone avatar therden avatar vanadium23 avatar yaozhuwa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

obsidian-tasks's Issues

Allow filter query by tag or string

When filtering a tasks block, add a new filter that filters by tag.
Example:

```tasks
has tag #tag1
```

Alternatively, maybe extend it to general inclusion of a string which would also allow filtering for tags?

```tasks
includes text #tag1
```

Relates to #19

Queries should support relative date filters

When I embed a ```tasks block, I want to be able to filter dates also by relative statements.

In addition to, for example, due before 2021-09-12, relative dates could help with a page where I always have certain tasks. That page could look something like the following, as an example:

# Tasks
## Overdue
```tasks
due before today
not done
```

## Due today
```tasks
due on today
not done
```

## Due this week
```tasks
due after today
due before in 8 days
not done
```

Query overdue tasks

At the moment, task queries have fixed dates, but something like due before date(today) would be so useful to identify overdue tasks on my "Dashboard" page. I know you have a long list of todos :-) but I hope you find room for this one.

And I so agree with your distinction between checklists and tasks to manage. So glad that you want to develop a plugin that knows the difference. ❤️

Add "new task" command/shortcut

Thank you for this great plug-in! I'm just starting to test it out and it would be great to have a Command for a new tasks to allow for a keyboard shortcut. Ideally with the ability to set a default style (e.g., - [ ] or -[ ] #tasks and have some automatically included info, such as creation date. E.g., The command "Tasks: Create new task with creation date" would create a template on the following line:
- [ ] 📆 2021-04-25

Related to #5

Thanks for considering this!

Command and pop-up to set due date

I don’t want to add the due date emoji by hand and then manually type the due date.
Instead, there should be a command that opens a pop up. In the pop up I can select a date. When I confirm the pop up, the “due date emoji” and due date are appended to the task in the file.

It can be very simple 4 drop downs for year/month/day in first iteration.

Support showing tasks as indented

If tasks are shown as indented, it would be easier to connect them to the context and the corresponding projects.

If the tasks are indented, maybe they can be indented the same as they are in the source file, whether the parent has the tag #task or not and whether the parent is a task or a list item or not. For instance, the following Task A and Task B can be shown as they are.

Tasks of Project A:

- [ ] Task level 1
  - [ ] Task level 2
    - [ ] Task A #task
  - Item level 2
    - [ ] Task B #task

Or maybe this can be an option, and the user can decide whether to show tasks as indented or not in the configuration page.

Task query with due date not working properly

Within Note A, there are the following tasks:

- TODO take out the trash 📅 2021-05-09
- TODO Test Markdown tasks

Within the daily note template, the following queries are used:
CleanShot 2021-04-14 at 12 15 38@2x

However, within today's daily note, the tasks are rendered as follows:
CleanShot 2021-04-14 at 12 26 19@2x

take out the trash 📅 2021-05-09 should not appear in "Due in the next two weeks".

Show section header only if it is different from the file name

Given that a task is included via a ```tasks block
When the preceding header (section header) equals the file name
Then the link after the task is shown as e.g. (Obsidian > Obsidian)
But instead, when they are equal, only show the file name (but still link to the section), e.g. `(Obsidian)`

The longer version provides no additional information to the user while it takes up screen space.

Command and pop-up to set recurrence

⚠️ Blocked by #9

I don’t want to add the recurrence emoji by hand.
Instead, the existing pop-up from #4 should include a field where I can set the recurrence.
Ideally, there should be some examples what I can use.

Cache should only notify on change

A potential optimization. It is not guaranteed to be useful 🤔

The cache currently notifies its subscribers on every cache update (e.g. file modification).
It could make sense to only notify the subscribers when the cache has actually changed.

Transclusion should stop on unload

The Transclusion's onunload method is always called immediately.
Therefore, onunload is disabled for the moment.

It should be made working properly, so that the number of targets that the cache renders during an update doesn't grow without ever shrinking.

It should be possible to sort tasks

When I add a tasks query block,
It should be possible to sort the tasks.

The keywords ascending and descending should be optional.
It should default to ascending.

The following sorting should be available (can be extended later):

  • sort by due date [ascending|descending]
  • sort by done date [ascending|descending]

⚠️ If #7 is already available, also allow sorting by priority

For now, only one sort is sufficient. Maybe later it should be possible to “sort by priority first, due date second” or something like this.

If no sort is given or the sorting parameter is equal for two tasks, sorting should default/fall back to:

  1. Priority
  2. Due date
  3. Path (so that tasks from the same file appear next to each other, if all other parameters are equal)

Add priority

A task should be able to have a priority.
The priority should be signified by an emoji (like a due date) followed by the priority as a number.

Any numbers should be fine for priorities and users can use whatever system they want.
The README should show a simple example where priorities 1 - 4 exist and 1 is the highest priority / 4 is least important.

  • Add priority to tasks
  • Allow to query for priority
  • Add priority to "edit task" modal

Clicking a task checkbox should give immediate feedback

When I click on a checkbox of a task
I should get immediate feedback that I clicked it.
Instead, it can take some time until the change is a) done in the file where the task is and b) also shown in my current view. I could see a transclusion that only gets updated once the cache reparsed the entire file that contains the task.

The checkbox should have a state that shows that I successfully clicked it, but it should not change to the desired result before the change was actually made. It must be a temporary state, where the checkbox is ideally visibly disables.

Input shouldn’t be laggy in larger files

The cache doesn't need to reload a file immediately on every modification.
Instead, there should be a minimum time to wait between refreshes.
A modification after a long pause should be refreshed immediately, but then there should be a break.

Queue up all relevant files and process them when the time has come.
Make sure that new modifications are pushed to a new queue while the cache processes the old queue.

Add scheduling to tasks

It should be possible to filter tasks based on when they are scheduled. This helps declutter the tasks list by only showing tasks that are already scheduled.

A new emoji could indicate a scheduled date, e.g. ⏳ 2021-09-12. Then filtering could be done like:

```tasks
scheduled before 2021-12-30
```

With #1, filtering could be done like scheduled before tomorrow.

How does the filter description work?

Is it for keywords that are mentioned in a task? For instance, if there is the task - [ ] Task A is part of Project A #task, the filter does not work if I try this: description includes Project A.

Tasks should support block links

In the current implementation, block identifiers at the end of a line (^id123) are removed when the task status is toggled. Instead, the block identifier should remain with the task.

Due date should accept all calendar icons

Right now it can be tricky to select the correct calendar symbol when entering a due date.
Instead, Tasks should accept all calendar icons as due date:

  • 📅
  • 📆
  • 🗓

Add recurrence/repeating tasks

A task should have an optional recurrence (like an optional due date).
Recurrence should be written as natural language, like in Todoist.

Examples:

  • every Friday
  • Every weekday
  • Monthly
  • On every 1st of each Month
  • Etc.
  • Find out how to parse these ...

Once a task is set as recurring, a new task must be created once the original task is marked as DONE (or SKIPPED or DELEGATED). A new task must be created so that the original task can be marked DONE and appear in queries where I want to see tasks that were done on a certain date, as an example.
The new task should appear right above the existing task in the same file with the same indentation.
This isn’t ideal, as this could get very long. I wasn’t able to come up with something nicer which is also plain markdown. Ideas?

Ability to filter on heading

I'd like to be have a tasks search query filter on:

heading includes Tasks
To be able to grab all checklists under specific headings
### Tasks

or

heading does not include Goals
to ignore checklists under specific headings
### Goals

Command and pop-up to set priority

⚠️ Blocked by #6

I don’t want to add the priority emoji by hand.
Instead, the existing pop-up from #4 should include a field where I can set the priority.

Support filtering tasks belonging to specific projects

Sometimes one may want to better show tasks related to a project. For instance, Task A and Task B are also listed in the file Project A. Is it possible to better show this? For instance, one may add tags to Task A and Task B as follows:

Content of Project A:

- [ ] Task A #task #ProjectA
- [ ] Task B #task #ProjectA

Then one can filter #ProjectA to show these tasks.

Add status DOING

I don't know if it is doable that make DOING available.

I have a idea like this:

image

And then when I click on the red DOING it will change to TODO like above one.

Support todo.txt format

The todo.txt format is quite widely used and supported by other tools. How things are specified is clearly defined. Is there a reason not to support that format? It feels like it would extend the applicability of this - the widespread use of that format plus the power of your querying tools would make a good combination.

Switch to new metadata cache

Obsidian 12.0.0 ships with an extended metadata cache that indexes lists. I can get the tasks from the lists metadata cache instead of reading all the files myself.

Query should allow for grouping

When creating a tasks code block, it should be possible to add grouping to the query.
If tasks shall be grouped, split the cached tasks into groups after filtering, but before sorting.
Sort each group individually.
Put a h4 of the group before the grouped items (e.g. #### 2021-09-12 or #### DONE)

Grouping should be possible by:

  • Due date
  • Done date
  • Priority
  • Path/File
  • more...?

Example:

group by due date

Question: Is this really necessary? Right now you can have “groups” by having multiple ```tasks blocks below each other.

Tasks form the preview renderer should be handled better

Currently, tasks are identified by list items that contain a nodeChild of type text that starts with a task keyword (e.g. TODO).

The task, when toggled, identifies its original source in the file based on string similarity, which is not very accurate. Especially considering that the markdown to HTML renderer potentially changed the text.

Normal checkboxes are handled by offset in the file and index in the list (when a section is rendered by the markdown renderer)(Based on a discussion on discord). Does a plugin have access to this offset? Maybe in the context? That would solve it, as we could use section indices in addition to the page indices we have from the cache. We could then start at the offset and identify the task by its task index. Maybe it’s even more efficient/easier to use the existing list index? 🤔

Support customize appended text after marking a task as DONE

Currently, text like ✅ 2021-04-09 would be appended to the end of the task when it is marked as DONE. Is it possible to customize this? For instance, if ✅ [[2021-04-09]] is appended, then one can check in the Graph View what tasks have been completed on a specific date; if ✅ 202104141210 is appended, then one can know the specific time when a task is completed.

Checkboxes should have more prominent style

The checkbox of a task should have a prominent style in order to signify a task.
If possible, use existing css variables from the background/foreground to be in line with the current theme.

Queries should allow to query for priority

⚠️ #6 blocks this.

It should be possible to filter a tasks block by:

  • priority greater than <number>
  • priority less than <number>
  • priority is <number>

⚠️ If #8 is already available, also allow sorting by priority

Tasks plugin removes data-task value

On the Insider Build of Obsidian the value of a tasks checkbox is available in the data-task attribute of the list item.

- [x] Task 1
- [>] Deferred task

<li data-line="0" data-task="x" class="task-list-item is-checked">
<li data-line="1" data-task=">" class="task-list-item is-checked">

but with the Tasks plugin active this attribute no longer populates.

Noticed this when the custom CSS that relies on this behavior did not work: https://github.com/deathau/obsidian-snippets#checkboxes

Distinguish Path and File in the filter

In the latest version of Tasks, it seems that the filter path works both for path/folder/directory and file/file name. Is it possible to distinguish them as Obsidian does? Specifically, the filter path denote a folder/directory while file denotes a file name.

Auto-add Global filter to next line

Given that I use a global filter (e.g. #task)
And that I am at the end of the line of a task
When I hit enter to create the next line
That new line should be a checklist item that starts with the global filter

This way, I don’t have to write #task over and over when I want to note multiple tasks.

Tasks under a top-level checklist item should work

Given that I use a global filter #task
When I nest tasks under a general checklist item
Then the markdown preview of the file is messed up
But instead it should render as expected

The rendering in the markdown preview adds the text of the first task in the sub-list to the checklist item (replacing the checklist item's text). All other checklist items/tasks "move up by one" content-wise.

This doesn't work:

- [ ] A list of tasks:
    - [ ] #task This is my first task
    - [ ] #task This is my second task

This works:

- [ ] #task A list of tasks:
    - [ ] #task This is my first task
    - [ ] #task This is my second task

Tasks removes data-line property

Hello!
This is similar to the issue where any task handled by tasks lacked the data-task property.

There is a data-line property with the li row number in both the li and the nested input that disappears whenever I add the #task property to the todo item.

Add extra pane to show and list tasks

An optional pane independent from files and queries could list tasks. Should include filter options from Query. It must be possible to toggle status there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.