add 000-configs/, dashboard, templates, .obsidian/, bin/, model-identity

This commit is contained in:
stateofshit
2026-07-29 13:29:47 +00:00
parent c22bd80fe1
commit 36eca4ca89
31 changed files with 1127 additions and 17 deletions
View File
+23
View File
@@ -0,0 +1,23 @@
---
title: "bin"
status: "active"
folder: "bin"
tags: [scripts, index]
created: "2026-07-29"
updated: "2026-07-29"
version: "1.0.0"
---
# bin
Helper shell scripts.
## Current
- [[daily.sh]] — auto-create today's daily note from `tpl/daily.md`. Run from cron on the main server, not from openwebui.
## Adding a script
- Filename: `snake_case.sh`
- Must be executable (`chmod +x`)
- Add to this README
Executable
+39
View File
@@ -0,0 +1,39 @@
#!/bin/bash
# bin/daily.sh — auto-create today's daily note from template
# Cron: 0 6 * * * /home/user/02-repos/shit_in_a_vault/bin/daily.sh
VAULT="/home/user/02-repos/shit_in_a_vault"
TPL="$VAULT/tpl/daily.md"
DEST_DIR="$VAULT/01-logs/daily"
DEST="$DEST_DIR/$(date +%Y-%m-%d).md"
DATE_STR=$(date +%Y-%m-%d)
YESTERDAY=$(date -d "yesterday" +%Y-%m-%d)
mkdir -p "$DEST_DIR"
if [ -f "$DEST" ]; then
echo "Daily note $DEST already exists, skipping."
exit 0
fi
if [ ! -f "$TPL" ]; then
echo "Template not found: $TPL" >&2
exit 1
fi
# Substitute {{date:YYYY-MM-DD}} and {{date:}} placeholders
sed -e "s|{{date:YYYY-MM-DD}}|$DATE_STR|g" \
-e "s|{{date:}}|$DATE_STR|g" \
-e "s|{{yesterday:YYYY-MM-DD}}|$YESTERDAY|g" \
"$TPL" > "$DEST"
echo "Created: $DEST"
# Commit and push
cd "$VAULT" || exit 1
git add "$DEST"
if git diff --cached --quiet; then
echo "Nothing to commit."
exit 0
fi
git commit -m "daily: $DATE_STR" && git push