-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (33 loc) · 1.33 KB
/
Makefile
File metadata and controls
43 lines (33 loc) · 1.33 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
SHELL := /bin/bash
.PHONY: health daily weekly monthly quarterly annual watcher-log
health:
@node tools/health.cjs
daily:
@node tools/obsidian-make-note.cjs daily
weekly:
@node tools/obsidian-make-note.cjs weekly
monthly:
@node tools/obsidian-make-note.cjs monthly
quarterly:
@node tools/obsidian-make-note.cjs quarterly
annual:
@node tools/obsidian-make-note.cjs annual
watcher-log:
@journalctl --user -u soulfield-watch-obsidian.service -n 50 --no-pager
.PHONY: brain-dump
brain-dump:
@node tools/brain-dump-sort.cjs
learning-add:
@if [ -z "$(FILE)$(NAME)" ]; then echo "Usage: make learning-add FILE=workspace/docs/Obsidian/docs/learning/<file.md> (or NAME=<file.md>)"; exit 2; fi
@LEARN_DIR=workspace/docs/Obsidian/docs/learning; \
IDX=$$LEARN_DIR/index.md; \
N=$${FILE##*/}; \
[ -n "$$N" ] || N="$(NAME)"; \
if [ -z "$$N" ]; then echo "Missing NAME/FILE"; exit 2; fi; \
if [ ! -f "$$IDX" ]; then echo "Learning index not found at $$IDX"; exit 3; fi; \
if grep -qxF -- "- [[$$N]]" "$$IDX"; then echo "Already listed: $$N"; exit 0; fi; \
if grep -q '^🏷️ Tags' "$$IDX"; then sed -i "/^🏷️ Tags/ i - [["$$N"]]" "$$IDX"; else echo "- [[$$N]]" >> "$$IDX"; fi; \
git add "$$IDX"; \
git commit -m "docs(learning): add $$N to Learning index" || true; \
git push || true; \
echo "Updated $$IDX with $$N"