aboutsummaryrefslogtreecommitdiffstats
path: root/examples/tools
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tools')
-rw-r--r--examples/tools/task_add.toml20
-rw-r--r--examples/tools/task_delete.toml8
-rw-r--r--examples/tools/task_edit.toml28
-rw-r--r--examples/tools/tasks.toml24
4 files changed, 80 insertions, 0 deletions
diff --git a/examples/tools/task_add.toml b/examples/tools/task_add.toml
new file mode 100644
index 0000000..b8b9caa
--- /dev/null
+++ b/examples/tools/task_add.toml
@@ -0,0 +1,20 @@
+description = "Add a to-do task to the user's Vikunja, with an optional due date, notes and project. Prints the new task's line."
+command = ["vikunja.py", "add", "{title}", "{description}", "{due}", "{project}"]
+cloud = ["hetzner"]
+timeout = 20
+
+[params.title]
+type = "string"
+description = "Short title, an action in the user's language (e.g. Buy milk)."
+
+[params.description]
+type = "string"
+description = "Longer notes, Markdown. Empty for none."
+
+[params.due]
+type = "string"
+description = "Due date: YYYY-MM-DD (end of that day) or YYYY-MM-DD HH:MM, local time, from today's date. Empty for none."
+
+[params.project]
+type = "string"
+description = "Project name. Empty puts it in Inbox."
diff --git a/examples/tools/task_delete.toml b/examples/tools/task_delete.toml
new file mode 100644
index 0000000..362bab8
--- /dev/null
+++ b/examples/tools/task_delete.toml
@@ -0,0 +1,8 @@
+description = "Delete a task from the user's Vikunja (it goes to Vikunja's trash). A finished task is closed with task_edit done=1, not deleted. Before calling, read the task with tasks by its id, tell the user its title, and ask; call only after they say yes."
+command = ["vikunja.py", "delete", "{id}"]
+cloud = ["hetzner"]
+timeout = 20
+
+[params.id]
+type = "string"
+description = "The task's id, from tasks."
diff --git a/examples/tools/task_edit.toml b/examples/tools/task_edit.toml
new file mode 100644
index 0000000..89b3a3d
--- /dev/null
+++ b/examples/tools/task_edit.toml
@@ -0,0 +1,28 @@
+description = "Change a task in the user's Vikunja: rename it, replace its notes, change or remove its due date, move it to another project, or mark it done or not done. Only the fields given change. Find the id with tasks first."
+command = ["vikunja.py", "edit", "{id}", "{title}", "{description}", "{due}", "{project}", "{done}"]
+cloud = ["hetzner"]
+timeout = 20
+
+[params.id]
+type = "string"
+description = "The task's id, from tasks."
+
+[params.title]
+type = "string"
+description = "New title. Empty keeps it."
+
+[params.description]
+type = "string"
+description = "New notes, Markdown; replaces the old ones. Empty keeps them."
+
+[params.due]
+type = "string"
+description = "New due date: YYYY-MM-DD or YYYY-MM-DD HH:MM, local time; none removes it. Empty keeps it."
+
+[params.project]
+type = "string"
+description = "Project name to move it to. Empty keeps it."
+
+[params.done]
+type = "string"
+description = "1 marks it done, 0 reopens it. Empty leaves it."
diff --git a/examples/tools/tasks.toml b/examples/tools/tasks.toml
new file mode 100644
index 0000000..5c5e645
--- /dev/null
+++ b/examples/tools/tasks.toml
@@ -0,0 +1,24 @@
+description = "The user's to-do tasks in Vikunja. Lists open tasks, one per line: #id [project] title, due date, sorted by due date. Filter by words in the title, by project or by due date; give an id to read one task with its notes. Call it to find a task's id before editing or deleting it."
+command = ["vikunja.py", "list", "{query}", "{project}", "{due_before}", "{all}", "{id}"]
+cloud = ["hetzner"]
+timeout = 20
+
+[params.query]
+type = "string"
+description = "Words the task's title contains. Empty for every task."
+
+[params.project]
+type = "string"
+description = "Project name. Empty for every project."
+
+[params.due_before]
+type = "string"
+description = "Only tasks due up to this date, included: YYYY-MM-DD or YYYY-MM-DD HH:MM, local time, from today's date. Empty for no limit."
+
+[params.all]
+type = "string"
+description = "1 to include done tasks. Empty for open tasks only."
+
+[params.id]
+type = "string"
+description = "A task id, to read that one task in full. Empty to list."