CLI Tasks Resource¶
CLITasksResource(cli)
¶
Bases: BaseCLIResource
CLI resource for task operations.
Attributes:
| Name | Type | Description |
|---|---|---|
_cli |
Reference to the parent |
Source code in src/aiobsidian/cli/_base.py
list(*, path=None, daily=False, done=False)
async
¶
List tasks across the vault.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | None
|
Restrict to tasks in files under this path. |
None
|
daily
|
bool
|
If |
False
|
done
|
bool
|
If |
False
|
Returns:
| Type | Description |
|---|---|
list[dict[str, Any]]
|
List of task objects. |
Source code in src/aiobsidian/cli/tasks.py
toggle(path, line)
async
¶
Toggle a task's completion status.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to the file containing the task. |
required |
line
|
int
|
Line number of the task in the file. |
required |
Source code in src/aiobsidian/cli/tasks.py
create(content, *, tags=None)
async
¶
Create a new task.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content
|
str
|
Task text content. |
required |
tags
|
str | None
|
Comma-separated tag names to attach to the task. |
None
|
Source code in src/aiobsidian/cli/tasks.py
complete(task_id)
async
¶
Mark a task as complete.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_id
|
str
|
Identifier of the task to complete. |
required |