This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
01.apply.yaml
85 lines (73 loc) · 2.25 KB
/
01.apply.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
##
# The actual demo which implements the two examples from readme:
#
# Apply the label `@at_work` to all tasks that:
# - are in the `Inbox` project
# - (and) have no label
# - (and) end in `at work` **or** `at the office`.
# - Remove the `at work` or `at the office`
# portion of the task when saving it with the labels
#
# For every task in the `GarageSale` project:
# - make a new project named after the task
# - locate the new project under the `GarageSale` project
# - 'Seed' the project with tasks from `sale-tasks.csv` file
# - delete the original task from `#GarageSale`
#
##
version: 1
actions:
- name: demo-apply-label
action: label_apply
enabled: Yes
description: >-
Apply work related tasks with the proper label
labels:
- "at_work"
filters:
- filter:
# Any task that...
task:
# ... ends in 'at work' or 'the office'
content:
match: '(at work$|at the office$)'
option:
# Task title will change from "do thing at the office" to "do thing" w/ the label @at_work
mutate: Yes
# *AND*
# ... has no labels
labels:
absent: Yes
# *AND*
# ... is in this project
projects:
name:
match: 'Inbox'
regex_options:
# Ignore case so tasks like 'do thing AT OFFICE' will also be included :)
- re.I
- name: demo-seed-projects
action: project_create
enabled: YES
description: >-
'Expands' tasks under 'Garage Sale 🏚️💵' project
projects:
- from:
filters:
- filter:
# Any task that...
task:
content:
match: "."
option:
delete: yes
projects:
# ... is in this project
name:
match: 'Garage Sale 🏚️💵'
# And created as child projects of `Garage Sale 🏚️💵`
parent:
project: Garage Sale 🏚️💵
# 'seed' the project from the CSV template file
template:
file: ./templates/garage-sale.csv