1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-05 08:08:02 +00:00

Compare commits

...

6 Commits

Author SHA1 Message Date
jbranchaud
ff227a39ed Turn of only dprint's unordered list formatting 2025-10-25 12:51:25 -05:00
jbranchaud
0d3975eb9c Disable dprint for README for bullet formatting 2025-10-25 12:49:33 -05:00
jbranchaud
d171c3784b Get rid of the help task, not needed now 2025-10-25 11:51:27 -05:00
jbranchaud
e6d00a94f3 Add an interactive picker for notes tasks 2025-10-25 11:50:22 -05:00
jbranchaud
0e934d8dd3 Add a default task to list all tasks 2025-10-25 10:05:38 -05:00
jbranchaud
c30b17dd68 Add a taskfile for managing notes submodule 2025-10-25 09:59:34 -05:00
2 changed files with 82 additions and 0 deletions

76
Taskfile.yml Normal file
View File

@@ -0,0 +1,76 @@
version: '3'
vars:
NOTES_DIR: notes
NOTES_FILE: '{{.NOTES_DIR}}/NOTES.md'
EDITOR: '{{.EDITOR | default "nvim"}}'
tasks:
default:
desc: Show available commands
cmds:
- task --list
notes:sync:
desc: Sync latest changes from the notes submodule
cmds:
- git submodule update --remote {{.NOTES_DIR}}
- cd {{.NOTES_DIR}} && git checkout main
silent: false
notes:edit:
desc: Edit NOTES.md (syncs latest changes first)
deps: [notes:sync]
cmds:
- $EDITOR {{.NOTES_FILE}}
interactive: true
notes:push:
desc: Commit and push changes to notes submodule
dir: '{{.NOTES_DIR}}'
cmds:
- git add NOTES.md
- git diff --cached --quiet || git commit -m "Update notes - $(date '+%Y-%m-%d %H:%M')"
- git push
silent: false
notes:status:
desc: Check status of notes submodule
dir: '{{.NOTES_DIR}}'
cmds:
- git status
notes:save:
desc: Quick save - edit, commit, and push notes
cmds:
- task notes:edit
- task notes:push
notes:pull:
desc: Pull latest changes (alias for sync)
cmds:
- task notes:sync
notes:diff:
desc: Show uncommitted changes in notes
dir: '{{.NOTES_DIR}}'
cmds:
- git diff NOTES.md
notes:log:
desc: Show recent commit history for notes
dir: '{{.NOTES_DIR}}'
cmds:
- git log --oneline -10
notes:
desc: Interactive picker for notes tasks
cmds:
- |
TASK=$(task --list | grep "^\* notes:" | sed 's/^\* notes://' | sed 's/\s\+/ - /' | fzf --prompt="Select notes task: " --height=40% --reverse)
if [ -n "$TASK" ]; then
TASK_NAME=$(echo "$TASK" | awk '{print $1}' | sed 's/:$//')
task notes:$TASK_NAME
fi
interactive: true
silent: true

6
dprint.json Normal file
View File

@@ -0,0 +1,6 @@
{
"markdown": {
"unorderedListMarker": "preserve"
},
"plugins": ["https://plugins.dprint.dev/markdown-0.16.0.wasm"]
}