-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
267 lines (245 loc) · 7.61 KB
/
Copy pathTaskfile.yaml
File metadata and controls
267 lines (245 loc) · 7.61 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
---
version: '3'
vars:
VER: 2.5
ROOT_DIR:
sh: git rev-parse --show-toplevel
PORT: 8000
tasks:
check-missing-images:
desc: Check recipes for missing images.
cmds:
- 'uv run scripts/check_missing_images.py'
check-missing-sources:
desc: Find recipes missing a source section.
cmds:
- 'uv run scripts/find_missing_sources.py'
check-header-emojis:
desc: Check recipes for missing H1 header emoji shortcodes.
cmds:
- 'uv run scripts/check_header_emojis.py {{ .CLI_ARGS }}'
build:
desc: Build the static site
cmds:
- uv run zensical build
docs:deps:
desc: Install Zensical
cmds:
- uv pip install zensical
docs:check:
desc: Check Zensical version
cmds:
- uv pip show zensical
docs:update:
desc: Update Zensical
cmds:
- uv pip install --upgrade zensical
glite:
desc: Run Gemini with the gemini-2.5-flash-lite model.
cmds:
- gemini -m gemini-{{ .VER }}-flash-lite
gpro:
desc: 'Run Gemini with the gemini-{{ .VER }}-pro model.'
cmds:
- gemini -m gemini-{{ .VER }}-pro
gflash:
desc: Run Gemini with the gemini-2.5-flash model.
cmds:
- gemini -m gemini-{{ .VER }}-flash
add-lazy-loading:
desc: Add lazy image loading
dir: '{{.USER_WORKING_DIR}}'
cmds:
- >-
sed -i 's/\(\!\[.*\)/\1\{ loading=lazy \}/' {{ .CLI_ARGS }}
add-comments:
desc: Add a front matter tag
cmds:
- yq --front-matter="process" '.comments = "true"' {{ .CLI_ARGS }}
add-tag:
desc: Add a front matter tag
cmds:
- yq -i --front-matter="process" '.tags += ["{{ (split " " .CLI_ARGS)._0 }}"]' {{ (split " " .CLI_ARGS)._1 }}
clean:
desc: Clean markdown files from cook dir
cmds:
- find cook -name "*.md" -delete
deps:
desc: Install dependencies
cmds:
- brew install typos-cli
linkcheck:
desc: Check for dead links using lychee
cmds:
- lychee docs/
linkcheck-offline:
desc: Check for dead local links and images using lychee (offline)
cmds:
- lychee --offline docs/
linkcheck-file:
desc: Link check a given file using lychee
cmds:
- lychee {{shellQuote .FILE}}
lint:
desc: Lint the project
cmds:
- task: markdownlint
- task: yamllint
- task: shuck
lint-changed:
desc: Lint only modified/changed files (saves tokens)
cmds:
- uv run python3 scripts/lint_changed.py
git-summary:
desc: Show a token-efficient summary of git workspace status and changes
cmds:
- uv run python3 scripts/git_summary.py
shuck:
desc: Run shuck shell linter
cmds:
- shuck check scripts/
list-ingredients:
desc: List all ingredients in all cook recipes and copy to clipboard.
cmds:
- ./scripts/list_ingredients.sh
markdownlint:
desc: Run markdownlint-cli
cmds:
- rumdl check .
markdownlint-fix:
desc: Run markdownlint-cli fix
cmds:
- rumdl check --fix .
serve:
desc: Serve a local zensical server
cmds:
- uv run zensical serve
server:
desc: Serve a cook server
cmds:
- cook server
silent: true
emoji:
desc: Show available emoji
cmds:
- yq '.emoji' includes/emoji.yaml
emoji-ing:
desc: Show available ingredients emoji
cmds:
- yq '.emoji.ingredients' includes/emoji.yaml
emoji-cw:
desc: Show available cookware emoji
cmds:
- yq '.emoji.cookware' includes/emoji.yaml
emoji-search:
desc: Search for emoji
cmds:
- yq '.emoji.ingredients[]|pick(["{{ .SHORTCODE }}"])|select(length>0)' includes/emoji.yaml
emoji-sort:
desc: Sort emoji.yaml
cmds:
- yq -i 'sort_keys(.emoji)' includes/emoji.yaml
- yq -i '.emoji.cookware|=sort_by(keys | .[0])' includes/emoji.yaml
- yq -i '.emoji.ingredients|=sort_by(keys | .[0])' includes/emoji.yaml
- yq includes/emoji.yaml
sort:
desc: Sort dictionary.txt
cmds:
- sort {{ .ROOT_DIR }}/dictionary.txt -u -o {{ .ROOT_DIR }}/dictionary.txt
spellcheck:
desc: Spellcheck cook files
cmds:
- uv run scripts/generate_typos_config.py
- typos
spellcheck-file:
desc: Spellcheck a single file
cmds:
- uv run scripts/generate_typos_config.py
- typos {{shellQuote .FILE}}
commit:
desc: Commit new cook files, FILES.
cmds:
- cmd: ./scripts/commit.sh {{shellQuote .FILES }}
ignore_error: true
yamllint:
desc: Run yamllint
cmds:
- yamllint-rs .
move:
desc: Move recipes markdown file and image, FILES.
cmds:
- ./scripts/move.sh {{shellQuote .FILES }}
import-recipe:
desc: Import a recipe from a URL or GitHub issue number.
cmds:
- uv run scripts/import_recipe_workflow.py {{shellQuote .URL}} {{if .CATEGORY}}{{shellQuote .CATEGORY}}{{end}}
whitelist-typo:
desc: Whitelist words in the typos dictionary and rebuild config.
cmds:
- uv run scripts/whitelist_typos.py {{.WORDS}}
hyperlink-ingredient:
desc: Hyperlink an ingredient in a recipe markdown file
cmds:
- >-
uv run python3 scripts/hyperlink_ingredient.py
--target {{shellQuote .TARGET}}
--ingredient {{shellQuote .INGREDIENT}}
hyperlink-ingredient-global:
desc: Hyperlink an ingredient globally in all recipe markdown files
cmds:
- >-
uv run python3 scripts/hyperlink_ingredient_global.py
--ingredient {{shellQuote .INGREDIENT}}
deg:
desc: Replace temperatures with degree symbols
cmds:
- >-
sed -E -i -e 's/([[:digit:]]+)F/\1°F/'
-e 's/ degrees F/°F/'
-e 's/ degrees/°F/'
-e 's/([[:digit:]]+)[[:space:]]F/\1°F/' {{shellQuote .FILE }}
validate:
desc: Validate zensical.toml
cmds:
- uv run python -c "import tomllib, sys; tomllib.load(open('zensical.toml', 'rb'))"
preconditions:
- test: test -n "$(uv run python -c 'import tomllib' 2>/dev/null && echo 'found')"
msg: |
tomllib not found. Please install a Python version that includes tomllib (Python 3.11+).
silent: true
encrypt:
desc: Encrypt mcp_config.json and settings.json files using sops
cmds:
- |
if [ -f .agents/mcp_config.json ]; then
sops --encrypt --input-type json --output-type json \
--output .agents/mcp_config.json.enc .agents/mcp_config.json
elif [ -f mcp_config.json ]; then
sops --encrypt --input-type json --output-type json --output mcp_config.json.enc mcp_config.json
fi
- |
if [ -f .agents/settings.json ]; then
sops --encrypt --input-type json --output-type json --output .agents/settings.json.enc .agents/settings.json
elif [ -f settings.json ]; then
sops --encrypt --input-type json --output-type json --output settings.json.enc settings.json
fi
decrypt:
desc: Decrypt mcp_config.json.enc and settings.json.enc files using sops
cmds:
- |
if [ -f .agents/mcp_config.json.enc ]; then
sops --decrypt --input-type json --output-type json \
--output .agents/mcp_config.json .agents/mcp_config.json.enc
elif [ -f mcp_config.json.enc ]; then
sops --decrypt --input-type json --output-type json --output mcp_config.json mcp_config.json.enc
fi
- |
if [ -f .agents/settings.json.enc ]; then
sops --decrypt --input-type json --output-type json --output .agents/settings.json .agents/settings.json.enc
elif [ -f settings.json.enc ]; then
sops --decrypt --input-type json --output-type json --output settings.json settings.json.enc
fi
default:
cmds:
- task -a
silent: true