task插件

目录^toc

插件概述

= this.file.frontmatter.description

插件设置

使用方法

视频教程^skipped

Dates 日期

due📅:截止日期
scheduled⏳:计划日期,可以计划在任务到期之前完成任务。
start🛫:开始日期,在特定日期之前,无法处理任务,或者想在特定日期之前隐藏任务。在这种情况下,可以使用开始日期。
created➕:创建日期
done✅:完成日期
cancelled❌:cancelled

Priority of Dates 日期的优先权
任务可以有多种日期。当任务具有多个日期时,将根据以下优先级选择其中一个日期作为参考日期:
Due date 期限
Scheduled date 预定日期
Start date 开始日期

Priority 优先权

任务可以具有优先级。为了指定任务的优先级,您可以附加一个 “priority signifiers”,此处按优先级降序显示(如果任务根本没有优先级,则将其视为介于低优先级和中优先级之间。):

  1. 🔺 for highest priority 🔺 最高优先级
  2. ⏫ for high priority ⏫ 用于高优先级
  3. 🔼 for medium priority 🔼 用于中等优先级
  4. use no signifier to indicate no priority 使用 no signifier 表示 no priority
  5. 🔽 for low priority 🔽 对于低优先级
  6. ⏬️ for lowest priority ⏬️ for lowest priority(最低优先级)

priority is (above, below)? (lowest, low, none, medium, high, highest)
group by priority按优先级分组
hide priority 隐藏优先级

Recurring Tasks 重复任务

要指定任务的重复规则,必须附加“recurrence signifier 🔁 ”,后跟重复规则。例如:🔁 every weekday 表示任务将在每周的周一至周五重复。每个重复规则都必须以单词 every 开头。

- [ ] take out the trash 🔁 every Sunday 📅 2021-04-25

在创建定期任务时,可以决定下一次发生是基于原始日期还是完成任务的日期。默认行为会导致新创建的任务具有相对于原始任务的日期,而不是“今天”。如果要根据“完成”日期而不是原始日期计划任务,则需要将 when done 添加到定期规则的末尾。

- [ ] sweep the floors 🔁 every week when done ⏳ 2022-02-20
- [x] sweep the floors 🔁 every week when done ⏳ 2021-02-06 ✅ 2022-02-13

Limitations of Recurring Tasks重复任务的限制
重复任务必须至少具有 Due 、 Scheduled 或 Start dates 之一。所谓的 Reference date 和 Recurrence 规则必须出现在任务描述之后。

On Completion 完成时 🏁

目前,支持以下“完成时”操作

Action 行动 Behaviour 行为
Keep 保持 不会对刚刚完成的任务执行任何操作。这是默认操作。
Delete 删除 删除任务的已完成实例。
删除任务的已完成实例。
- [ ] Leave me alone too! 🏁 keep
- [ ] Delete me upon completion 🏁 delete
- [ ] Delete my completed instance, leave my next instance 📅 2021-05-20 🔁 every day when done 🏁 delete

Statuses 状态

自定义复选框
Pasted image 20241029005512.png|369

Tags 标签

任务不会从文件 Frontmatter/YAML/Properties 中读取标签(或任何其他信息):标签值仅从任务行中读取

Task Dependencies 任务依赖关系

用于告诉 Tasks 在第一个任务完成之前无法启动第二个任务:

Pasted image 20241029011012.png

In Dataview format, the above would be written as:在 Dataview 格式中,上述内容将写为:
Pasted image 20241029011127.png

id 身份证

Task id values consistent of one or more of the following allowed characters:
任务 ID 值与以下一个或多个允许的字符一致:

The following are examples of valid id values:
以下是有效 id 值的示例:

Task id values are intended to be unique across the whole vault, each different id being only used on one task. However, there is no checking for this.
任务 ID 值在整个文件库中是唯一的,每个不同的 ID 仅用于一个任务。但是,没有对此进行检查。

dependsOn

Task dependsOn values consist of:
Task dependsOn 值包括:

The following are valid dependsOn values:
以下是有效的 dependsOn 值:

- [ ] Build a first draft 🆔 4ijuhy
- [ ] Test with users ⛔ 4ijuhy

hen, if the query is not blocked is used然后,如果查询未被阻止,则使用

```tasks
is not blocked
```

We only see 'Build a first draft' 我们只看到 'Build a first draft'
Until this task is marked as complete, at which time Obsidian Tasks sees that 'Test with users' is no longer blocked, and displays it as well
直到此任务标记为完成,此时 Obsidian Tasks 会发现“Test with users”(与用户一起测试)不再被阻止,并也会显示它

Search concepts 搜索概念

id and dependsOn indicate dependency ordering relationships between tasks, that is, an order in which tasks should be done.
id 和 dependsOn 表示任务之间的依赖关系排序关系,即任务的完成顺序。

When using those dependencies in searches, we define two more relationships: blocking and blocked.
在搜索中使用这些依赖项时,我们又定义了两个关系:blocking 和 blocked。

Blocking tasks 阻止任务

Summary 总结

Tasks are blocking when:
在以下情况下,任务会阻塞

  1. they are not yet done
    他们还没有完成
  2. and there is at least one other task directly depending on them, that is also not yet done.
    并且至少还有一项直接依赖于他们的其他任务,该任务也尚未完成。

You might wish to work on blocking tasks first, in order to un-block later tasks.
您可能希望先处理阻塞任务,以便取消阻塞后面的任务。

A task is blocking if:
如果出现以下情况,则任务会阻塞

Note that: 请注意:

Search for blocking tasks with:
使用以下命令搜索阻止任务:

```tasks
is blocking
```

Non-blocked tasks 非阻塞任务

To find tasks which are not blocked and can be acted on, use:
要查找被阻止且_可_执行操作的任务,请使用:

```tasks
not done
is not blocked
```

A task is only un-blocked when all of the tasks it dependsOn have been DONE or CANCELLED (or marked as NON_TASK):
仅当任务所依赖_的所有_任务都已完成取消(或标记为 NON_TASK)时,任务才会被取消阻止:

Using Dependencies in Tasks Searches在任务搜索中使用依赖项

The built-in filters relating to task dependencies are:
与任务依赖关系相关的内置过滤器包括:

is blocking
is not blocking
is blocked
is not blocked

has id
no id
id (includes|does not include) <string>
id (regex matches|regex does not match) /<JavaScript-style Regex>/

has depends on
no depends on

Sorting 排序

The only built-in sort instruction relating to task dependencies is:
与任务依赖关系相关的唯一内置排序指令是:

sort by id

Grouping 分组

The only built-in group instruction relating to task dependencies is:
与任务依赖关系相关的唯一内置组指令是:

group by id

Obsidian Properties Obsidian 属性

Tags 标签

Show files from tasks with a specific tag in frontmatter

在 frontmatter 中显示具有特定标签的任务中的文件

filter by function task.file.property('tags').includes('#sample-tag')

Note that this is an exact tag search. It will not match #sample-tag/some-sub-tag.
请注意,这是一个精确的标签搜索。它不会匹配 #sample-tag/some-sub-tag

Do not show any tasks from files with a specific tag in frontmatter

不要在 frontmatter 中显示具有特定标签的文件中的任何任务

filter by function ! task.file.property('tags').includes('#notasks')

If you wanted to adopt such a convention throughout all your Tasks queries, you could add the above to your Global Query.
如果您想在所有 Tasks 查询中采用此类约定,则可以将上述内容添加到全局查询中。

racking projects 跟踪项目

Use a project property

使用项目属性

Suppose you have multiple files associated with a project, spread throughout your vault, and they all have a project property like this:
假设您有多个文件与一个项目相关联,分布在整个 Vault 中,并且它们都具有如下所示的项目属性:

---
project: Project 1
---

This search will find all tasks in those files:
此搜索将查找这些文件中的所有任务:

filter by function task.file.property('project') === 'Project 1'

Use #project/... tag values

使用 #project/... 标签值

Some people prefer to use properties tags to identify projects. One advantage of tags is it is easy to add multiple values.
有些人更喜欢使用 properties 标签来标识项目。标记的一个优点是很容易添加多个值。

---
tags:
  - project/project-1
---

This exact-match search will find all tasks in such files:
此精确匹配搜索将查找此类文件中的所有任务:

filter by function task.file.property('tags').includes('#project/project-1')

If you wanted to use a sub-string search to find all tasks in files with any properties tag beginning #project/ you could use optional chaining (?.) and the nullish coalescing operator (??) like this:
如果你想使用子字符串搜索来查找任何以 #project/ 开头的属性标记的所有任务,你可以使用可选的链接 (?.) 和空值合并运算符 (??),如下所示:

filter by function task.file.property('tags')?.join(',').includes('#project/') ?? false

Or you could use template literals (Template strings) like this:
或者你可以使用模板文字 (Template strings),如下所示:

filter by function `${task.file.property('tags')}`.includes('#project/')

Using date values 使用日期值

Obsidian supports Date and Date & time property values.
Obsidian 支持日期日期和时间属性值。

It stores them in the format shown in these examples:
它以以下示例所示的格式存储它们:

---
date: 2020-08-21
time: 2020-08-21T10:30:00
---

Currently, Tasks does nothing special with these, seeing them as string values.
目前,Tasks 对这些值没有任何特殊处理,而是将它们视为字符串值。

Grouping by raw date values

按原始日期值分组

creation date property might be used like this, to group tasks by the date their file was created, according to the stored property values:
创建日期属性可以像这样使用,根据存储的属性值按文件的创建日期对任务进行分组:

group by function task.file.property('creation date') ?? 'no creation date'

How does Tasks interpret Obsidian Properties?

Tasks 如何解释 Obsidian 属性?

Consider a file with the following example properties (or "Frontmatter"):
考虑一个具有以下示例属性(或“Frontmatter”)的文件:

---
sample_checkbox_property: true
sample_date_property: 2024-07-21
sample_date_and_time_property: 2024-07-21T12:37:00
sample_list_property:
  - Sample
  - List
  - Value
sample_number_property: 246
sample_text_property: Sample Text Value
sample_text_multiline_property: |
  Sample
  Text
  Value
sample_link_property: "yaml_all_property_types_populated"
sample_link_list_property:
  - "yaml_all_property_types_populated"
  - "yaml_all_property_types_empty"
aliases:
  - YAML All Property Types Populated
tags:
  - tag-from-file-properties
creation date: 2024-05-25T15:17:00
project: Secret Project
---

The following table shows how most of those properties are interpreted in Tasks queries:
下表显示了如何在 Tasks 查询中解释其中的大多数属性:

Field 田 Type 1 类型 1 Example 1 示例 1
task.file.hasProperty('creation date') boolean 布尔 true 
task.file.property('creation date') string 字符串 '2024-05-25T15:17:00'
'2024-05-25T15:17:00'
task.file.property('sample_checkbox_property') boolean 布尔 true 
task.file.property('sample_date_property') string 字符串 '2024-07-21'
task.file.property('sample_date_and_time_property') string 字符串 '2024-07-21T12:37:00'
'2024-07-21T12:37:00'
task.file.property('sample_list_property') string[] 字符串[] ['Sample', 'List', 'Value']
['样本', '列表', '值']
task.file.property('sample_number_property') number  246
task.file.property('sample_text_property') string 字符串 'Sample Text Value'
“示例文本值”
task.file.property('sample_text_multiline_property') string 字符串 'Sample\nText\nValue\n'
“样本\n文本\n值\n”
task.file.property('sample_link_property') string 字符串 '[[yaml_all_property_types_populated]]'
task.file.property('sample_link_list_property') string[] 字符串[] ['[[yaml_all_property_types_populated]]', '[[yaml_all_property_types_empty]]']
task.file.property('tags')
task.file.property('tags')
string[] 字符串[] ['#tag-from-file-properties']

命令:Tasks: Create or edit

示例

```tasks
not done
```

tasks可读取列表中的任务

1. [ ] Do first step
2. [ ] Do next step
3. [ ] Do following step

tasks可以读取 blockquotes 或 Obsidian 的内置 callouts 内的任务。
需将块链接 (^link-name) 和标签放在元数据(如日期、优先级、重复规则)之后。其他任何内容都会破坏日期、优先级和重复规则的解析。

查询

查询指令中的大写字母 - 不区分大小写,但是

  1. 组合过滤器时,AND、OR 和 NOT 等布尔运算符仍必须大写。
  2. 正则表达式

默认情况下,结果列表将列出不缩进的任务。但使用 show tree 指令缩进查询结果中的任务和列表项

Filters 过滤器

Searching for dates 搜索日期

Searching particular dates搜索特定日期

There are several options available when searching with a particular date:使用特定日期进行搜索时,有以下几个选项可用:

Absolute dates 绝对日期

绝对日期指定日历中的特定日期。它们代表同一天,而不管今天的日期如何。其首选格式是 YYYY-MM-DD。

Relative dates 相对日期

yesterday 昨天
today 今天
tomorrow 明天
next monday 下周一
last friday 上周五
14 days ago 14天前
in two weeks 两周后
14 October (the current year will be used),10 月 14 日(将使用当年)
May (1st May in the current year will be used),5 月(将使用当年的 5 月 1 日)

Note that if it is Wednesday and you write tuesday, Tasks assumes you mean "yesterday", as that is the closest Tuesday. Use next tuesday instead if you mean "next tuesday".
请注意,如果今天是星期三,而您写的是星期二,则 Tasks 会假定您指的是“昨天”,因为这是最接近的星期二。如果您指的是 “next tuesday”,请改用 next tuesday

Searching date ranges 搜索日期范围

Absolute date ranges 绝对日期范围

<date range> may be specified as 2 valid dates in YYYY-MM-DD format. <date 范围> 可以指定为 YYYY-MM-DD 格式的 2 个有效日期。

Notes: 笔记:

绝对日期范围示例:

Relative date ranges 相对日期范围

Tasks supports a very specific set of relative <date range> values: last|this|next week|month|quarter|year. The pipe (|) character means 'or'.
Tasks 支持一组非常具体的相对 <date 范围> 值: last|this|next week|month|quarter|year 。竖线 (|) 字符的意思是“或”。

Tasks will process these ranges, based on today's date, and convert them to absolute date ranges (YYYY-MM-DD YYYY-MM-DD) internally.
Tasks 将根据今天的日期处理这些范围,并在内部将其转换为绝对日期范围 (YYYY-MM-DD YYYY-MM-DD)。

Dates on either end are included, that is, it is an inclusive search.
包括两端的日期,也就是说,这是一个包容性搜索。

相对日期范围示例:

Numbered date ranges 编号日期范围

支持以下编号日期范围类型:

Text filters 文本过滤器

In the following examples, we describe the heading filter, but these comments apply to all the text filters.
在以下示例中,我们描述了标题筛选器,但这些注释适用于所有文本筛选器。

  1. heading (includes|does not include) <search text>
    • It matches all tasks in a section whose heading contains the string <search text> at least once.
      它与标题包含字符串 <search text> 的节中的所有任务至少匹配一次。
      • That is, it is a sub-string search.
        也就是说,它是一个子字符串搜索。
      • So heading includes Day Planner will match tasks in sections ## Monday Day Planner and ## Day Planner for typical day.
        因此,标题包括 Day Planner 将匹配 ## 部分、Monday Day Planner 和 ## Day Planner for typical day 部分中的任务。
    • It ignores capitalization. Searches are case-insensitive.
      它忽略了大小写。搜索不区分大小写。
      • So heading includes Day Planner will match tasks in sections ## Day Planner and ## DAY PLANNER.
        因此,标题包括 Day Planner 将匹配 ## Day Planner 和 ## DAY PLANNER 部分中的任务。
    • Any quote characters (' and ") are included in the search text.
      搜索文本中包含任何引号字符(' 和 ”)。
      • So heading includes "Day Planner" will match a section## "Day Planner".
        所以 heading includes "Day Planner" 会匹配一个部分## “Day Planner”。
      • But will not match tasks with headings like ## Day Planner.
        但不会将任务与标题(如 ## Day Planner)匹配。
  2. heading (regex matches|regex does not match) /<JavaScript-style Regex>/
    • Does regular expression match (case-sensitive by default).
      正则表达式是否匹配(默认区分大小写)。
    • Regular expression (or ‘regex’) searching is a powerful but advanced feature.
      正则表达式(或 'regex')搜索是一项强大但高级的功能。
    • It requires thorough knowledge in order to use successfully, and not miss intended search results.
      它需要全面的知识才能成功使用,并且不会错过预期的搜索结果。
    • It is easy to write a regular expression that looks correct, but which has a special character with a non-obvious meaning.
      编写看起来正确但具有含义不明显的特殊字符的正则表达式很容易。
    • Essential reading: Regular Expression Searches.
      必读:正则表达式搜索

Matching multiple filter 匹配多个筛选器

Each line of a query has to match in order for a task to be listed. In other words, lines are considered to have an 'AND' operator between them. Within each line, you can use the boolean operators NOTANDORAND NOTOR NOT and XOR, as long as individual filters are wrapped in parentheses:
查询的每一行都必须匹配才能列出任务。换句话说,行之间被认为有一个 'AND' 运算符。在每一行中,您可以使用布尔运算符 NOTANDOR 和 NOTOR NOT 和 XOR,只要各个过滤器括在括号中即可:

```tasks
(no due date) OR (due after 2021-04-04)
path includes GitHub
```

```tasks
due after 2021-04-04
(path includes GitHub) AND NOT (tags include #todo)
```

Filters for Task Statuses任务状态筛选器

从 Tasks 4.2.0 开始,现在可以使用 task.isDone 按状态进行自定义筛选

filter by function task.isDone
filter by function ! task.isDone

### Status Name 状态名称

Status Type 状态类型

从 Tasks 4.2.0 开始,现在可以使用 task.status.type 按状态类型进行自定义筛选

filter by function task.status.type === 'NON_TASK'
filter by function 'TODO,IN_PROGRESS'.includes(task.status.type)
filter by function ! 'NON_TASK,CANCELLED'.includes(task.status.type)

Filters for Task Dependencies 任务依赖关系的筛选器

Blocking Tasks 阻止任务

A task is treated as blocking if:
如果满足以下条件,则任务将被视为阻塞

- [ ] I am blocking 🆔 12345
- [ ] I am not blocking ⛔ 12345

Note also: 另请注意:

Blocked Tasks 阻止的任务

A task is treated as blocked if:
如果满足以下条件,则任务将被视为被阻止

- [ ] I am not blocked 🆔 12345
- [ ] I am blocked ⛔ 12345

Note also: 另请注意:

Id

The id field adds an identifier to a task, so that other tasks may be marked as dependsOn that task.
id 字段向任务添加标识符,以便其他任务可以标记为 dependsOn 该任务。

Depends On 取决于

The dependsOn field allows a task to be marked as depending on the id of one or more other tasks. Multiple id values are separated by commas (,) with no spaces.
dependsOn 字段允许将任务标记为取决于一个或多个其他任务的 ID。多个 id 值用逗号 () 分隔,没有空格。

Filters for Dates in Tasks 任务中的日期筛选器

Due Date 期限

Done Date 完成日期

Sc#heduled Date 计划日期

Start Date 开始日期

Created Date 创建日期

See created date for how to make Tasks record the created date on any task lines that it creates.
有关如何使 Tasks 在其创建的任何任务行上记录创建日期的信息,请参阅

Cancelled Date 取消日期

Happens 发生

happens returns any task for a matching start date, scheduled date, or due date. For example, happens before tomorrow will return all tasks that are starting, scheduled, or due earlier than tomorrow. If a task starts today and is due in a week from today, happens before tomorrow will match, because the tasks starts before tomorrow. Only one of the dates needs to match.
Happens 返回具有匹配开始日期、计划日期_或_截止日期的任何任务。例如,Happens before tomorrow 将返回所有开始、计划或截止日期早于明天的任务。如果任务从今天开始,并且从今天开始的一周内到期,则 Happens before tomorrow 将匹配,因为任务在明天之前开始。只有一个日期需要匹配。

Invalid start, scheduled or due dates are ignored by happens.
无效的开始日期、计划日期或截止日期将被 happens 忽略。

Finding Tasks with Invalid Dates 查找日期无效的任务

任何此类错误都可以通过此搜索系统地找到:

```tasks
# These instructions need to be all on one line:
(cancelled date is invalid) OR (created date is invalid) OR (done date is invalid) OR (due date is invalid) OR (scheduled date is invalid) OR (start date is invalid)

# Optionally, uncomment this line and exclude your templates location
# path does not include _templates

group by path
```

Filters for Other Task Properties 其他任务属性的筛选器

Description 描述

Priority 优先权

Recurrence 重复

Sub-Items 子项

Tags 标签

Tag Query Examples 标签查询示例

Filters for File Properties

File Path 文件路径

Note that the path includes the .md extension.
请注意,该路径包括 .md 扩展名。

Root 根

The root is the top-level folder of the file that contains the task, that is, the first directory in the path, which will be / for files in the root of the vault.
目录是包含任务的文件的顶级文件夹,即路径中的第一个目录,对于文件库根目录中的文件,该目录将为 /

File Name 文件名

Note that the file name includes the .md extension.
请注意,文件名包括 .md 扩展名。

Heading 标题

Sorting

The following instructions are the default sort order, and they are automatically appended to the end of every Tasks search:
以下说明是默认排序顺序,它们会自动附加到_每个_ Tasks 搜索的末尾

sort by status.type
sort by urgency
sort by due
sort by priority
sort by path

It first sorts tasks in the order IN_PROGRESSTODODONECANCELLED then NON_TASK to ensure that actionable tasks appear first, which is important in searches without a filter like not done.
它首先按照 IN_PROGRESSTODO、``DONE、``CANCELLED 的顺序对任务进行排序,然后NON_TASK以确保可操作的任务首先出现,这在没有过滤器(如 not done)的搜索中非常重要。

Then it sorts by Urgency, which is a calculated score derived from several Task properties.
然后,它按 Urgency 排序,Urgency 是从多个 Task 属性派生的计算分数。

The above lines are always appended to the end of any sort by instructions supplied by the user. There is no way to disable this.
以上行_总是_由用户提供的指令附加到任何种类的末尾。无法禁用此功能。

However, any sort by instructions in queries take precedence over these default ones.
但是,查询中的任何 sort by 指令都优先于这些默认指令。

Custom Sorting 自定义排序

Sort by Task Statuses 按 Task Statuses 排序

Status 地位
Status Name 状态名称
Status Type 状态类型

Sort by Task Dependencies 按任务依赖关系排序

Id

Sort by Dates in Tasks 在 Tasks 中按日期排序

Done Date 完成日期

Due Date 期限

Scheduled Date 计划日期

Start Date 开始日期

Created Date 创建日期

Cancelled Date 取消日期

Happens 发生

Sort by Other Task Properties 按其他任务属性排序

Description 描述

Priority 优先权

Urgency 紧迫性

Recurrence 重复

Tags 标签

See Tags for important information about how tags behave in the Tasks plugin.
有关标记在 Tasks 插件中的行为方式的重要信息,请参阅 标记

Sort by File Properties 按文件属性排序

File Path 文件路径

File Name 文件名

Heading 标题

Multiple sort criteria 多个排序标准

You can add multiple sort by query options, each on an extra line. The first sort has the highest priority. Each subsequent sort will sort within the existing sorting.
您可以添加多个 sort by 查询选项,每个选项位于额外的行上。第一个排序具有最高优先级。每个后续排序都将在现有排序中排序。

Reverse sorting 反向排序

After the name of the property that you want to sort by, you can add the reverse keyword. If given, the sort order will be reverse for that property.
在要作为排序依据的属性的名称后,可以添加 reverse 关键字。如果给定,则该属性的排序顺序将相反。

Note that reverse will reverse the entire result set. For example, when you sort by done reverse and your query results contain tasks that do not have a done date, then those tasks without a done date will be listed first.
请注意,reverse 将反转整个结果集。例如,当您按 done reverse 排序并且查询结果包含没有完成日期的任务时,将首先列出那些没有完成日期的任务。

Examples 例子

```tasks
not done
due today
sort by due
```

```tasks
done
sort by done reverse
```

```tasks
not done
due before next monday
sort by status
sort by description reverse
sort by path
```

Grouping 分组

Group by Task Statuses 按任务状态分组

Group by Task Dependencies 按任务依赖关系分组

Id

Group by Dates in Tasks 在 Tasks 中按日期分组

Due Date 期限

Done Date 完成日期

Scheduled Date 计划日期

Start Date 开始日期

Created Date 创建日期

Cancelled Date 取消日期

Happens 发生

Group by Other Task Properties 按其他任务属性分组

Priority 优先权

Urgency 紧迫性

Recurrence 复发

Tags 标签

Group by File Properties 按文件属性分组

File Path 文件路径

Root 根

Folder 文件夹

File Name 文件名

Heading 标题

Multiple groups 多个组

You can add multiple group by query options, each on an extra line. This will create nested groups. The first group has the highest priority.
您可以添加多个 group by 查询选项,每个选项位于额外的行上。这将创建嵌套组。第一组具有最高优先级。
Each subsequent group by will generate a new heading-level within the existing grouping:
每个后续分组 by 将在现有分组中生成一个新的标题级别:

Reversing groups 倒车组

After the name of the property that you want to group by, you can add the reverse keyword. If given, the group headings will be reversed for that property.
在要作为分组依据的属性的名称后,可以添加 reverse 关键字。如果给定,则该属性的组标题将反转。
For example: 例如:

Limiting 限制

Limit total number of tasks 限制任务总数

You can limit the total number of tasks to show as query results.
您可以限制要显示为查询结果的任务总数。

Use the query string limit to <number> tasks. This will only list the first <number> results of the query (after sorting).
将查询字符串限制用于 <number> 任务。这将仅列出查询的前 <number> 结果(排序后)。

Shorthand is limit <number>.
速记是限 <number>

Limit number of tasks in each group 限制每个组中的任务数

You can also limit the allowed number of tasks in each group, if grouping is used. Otherwise this limit is ignored.
如果使用分组,您还可以限制每个组中允许的任务数。否则,将忽略此限制。

Use the query string limit groups to <number> tasks. This will only list the first <number> tasks in each group from the results of the query.
使用查询字符串 limit groups to <number> tasks .这将仅列出查询结果中每个组中的前 <number> 任务。

Shorthand is limit groups <number>.
简写是限制组 <number>

Layout commands 布局命令

Hiding/Showing Elements 隐藏/显示元素

You can hide and show individual elements of the rendered list with the "hide" and "show" commands together with the name of the element.
您可以使用 “hide” 和 “show” 命令以及元素名称来隐藏和显示呈现列表的各个元素。

Task Elements 任务元素

The following task elements exist:
存在以下任务元素:

Query Elements 查询元素

The following query elements exist:
存在以下查询元素:

Hide and Show Tree 隐藏和显示树

Tip 提示
The new instruction show tree is the first in a long series of steps to teach the Tasks plugin to fully handle nested tasks and list items.
新的指令 show tree 是教 Tasks 插件完全处理嵌套任务和列表项的一系列步骤中的第一个。

When you use show tree, Tasks shows all found tasks, and all their nested tasks and list items (for now, regardless of whether or not the nested tasks matched the query).
当您使用 show tree 时,Tasks 会显示所有找到的任务及其所有嵌套任务和列表项(目前,无论嵌套任务是否与查询匹配)。

Full Mode Full 模式

In full mode, query results will show the emojis and the concrete recurrence rule or dates.
在完整模式下,查询结果将显示表情符号和具体的重复规则或日期。
This is the default mode.
这是默认模式。
The command is full mode.
该命令为完全模式

Short Mode 短模式

In short mode, query results will only show the emojis, but not the concrete recurrence rule or dates. You can hover over the task to see the rule and dates in a tooltip.
在 short 模式下,查询结果只会显示 emoji,而不会显示具体的递归规则或日期。您可以将鼠标悬停在任务上,以在工具提示中查看规则和日期。
The command is short mode.
命令为短模式

Ignoring the global query

忽略全局查询 
If you need to ignore the Global Query in a given Tasks block you may add ignore global query instruction to any place of the block.
如果你需要忽略给定 Tasks 块中的 Global Query,你可以在该块的任何地方添加 ignore global query 指令。

Combining Filters 组合过滤器

Task 提供的各个过滤器可以通过以下方式以强大的方式组合在一起:

  1. wrapping each of them in delimiters such as ( and ),
    将它们中的每一个包裹在分隔符中,例如  和 ),
  2. then joining them with boolean operators such as ANDOR and NOT.
    然后用 ANDOR 和 NOT 等布尔运算符将它们连接起来。

Execution Priority 执行优先级

Operators are evaluated in this order:
运算符按以下顺序计算:

  1. NOT 
  2. XOR 异或
  3. AND 
  4. OR 

NOT 不

Require the filter not to be matched
要求筛选器不匹配
For a trivial example, these two are equivalent:
举个简单的例子,这两个是等效的:

path does not include inbox
NOT (path includes inbox)

AND NOT 而不是

Require the first filter to match, and also the second one to not match
要求第一个筛选器匹配,并且第二个筛选器不匹配

For example: 例如:

(has start date) AND NOT (description includes some)

OR NOT 或不

Require either the first filter to match, or the second one to not match.
要求第一个筛选器匹配,或要求第二个筛选器不匹配。

For example: 例如:

(has start date) OR NOT (description includes special)

XOR 异或

Require only one of two filters to match
只需要两个筛选器中的一个进行匹配

XOR, or exclusive or shows tasks which match only one of the conditions provided.
XOR 或独占 或 显示仅与提供的_条件之一_匹配的任务。

For example, to show tasks:
例如,要显示任务:

```tasks
not done
(path includes inbox) XOR (description includes #inbox)
```

It will not show tasks with both inbox in the path and the tag #inbox in the task line.
它不会显示路径中同时具有 inbox 且任务行中同时具有标记 #inbox 的任务。

Delimiters 分隔符

The following delimiter characters are available:
以下分隔符可用:

Creating your own shortcut to build a task 创建自己的快捷方式以构建任务

The QuickAdd plugin can help when creating tasks. Additional to the official command to create a task, you can set up a QuickAdd command with a custom capture format.
QuickAdd 插件可以在创建任务时提供帮助。除了用于创建任务的官方命令外,您还可以设置具有自定义捕获格式的 QuickAdd 命令。

For example: 例如:

#task {{VALUE:task name}} ⏰ {{VDATE:reminder date and time,YYYY-MM-DD HH:mm}} {{VALUE:🔺,⏫,🔼,🔽, }} 🔁 {{VALUE:recurrence}} 🛫 {{VDATE:start date,YYYY-MM-DD}} ⏳ {{VDATE:scheduled date,YYYY-MM-DD}} 📅 {{VDATE:due date,YYYY-MM-DD}}