Files
backnotprop__plannotator/tests/manual/local/fix-vault-links.sh
Michael Ramos 6aae06500c Feat/save to obsidian (#11)
* Add Obsidian integration for auto-saving approved plans

- Auto-detect Obsidian vaults from system config
- Settings UI with vault dropdown and folder config
- Save plans with YAML frontmatter (created, source, tags)
- Extract tags heuristically from H1 title and code fence languages
- Human-readable filenames: "Title - Jan 2, 2026 2-30pm.md"
- Cross-platform support (macOS, Windows, Linux)
- Add local test script for hook simulation

* Add backlinks and improve filename generation

- Add [[Plannotator Plans]] backlink to saved notes for graph connectivity
- Extract title from H1 for human-readable filenames
- Format: "Title - Jan 2, 2026 2-30pm.md"
- Add bulk test script for ~/.claude/plans
- Add fix script to add backlinks to existing vault files

* Add Obsidian integration docs to README, landing page, and plugins

- Root README: Quick note about Obsidian support after video table
- apps/hook README: Detailed setup and example file format
- apps/opencode-plugin README: Feature list and setup instructions
- Landing page: New "Save to Obsidian" feature card

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add Obsidian Integration section to README

* Screenshot Obsidian settings

Added an implementation plan section for user authentication.

* Update README with Obsidian auto-save feature

Added information about auto-saving approved plans to Obsidian.

* Update README with Obsidian integration link

Added link to details about Obsidian integration.

* Update README to include Obsidian auto-saving feature

Clarified the new feature for saving to Obsidian with a link.

---------
2026-01-02 11:08:19 -08:00

39 lines
931 B
Bash
Executable File

#!/bin/bash
# Adds [[Plannotator Plans]] backlink to existing plan files
#
# Usage: ./fix-vault-links.sh /path/to/vault/plannotator
FOLDER="${1:-$HOME/Documents/*/plannotator}"
# Expand glob
FOLDER=$(echo $FOLDER)
if [[ ! -d "$FOLDER" ]]; then
echo "Folder not found: $FOLDER"
exit 1
fi
echo "Fixing files in: $FOLDER"
COUNT=0
for FILE in "$FOLDER"/*.md; do
# Skip if already has the link
if grep -q '\[\[Plannotator Plans\]\]' "$FILE" 2>/dev/null; then
continue
fi
# Insert [[Plannotator Plans]] after frontmatter (after second ---)
# Using awk to find the end of frontmatter and insert
awk '
/^---$/ { count++ }
{ print }
count == 2 && !inserted { print "\n[[Plannotator Plans]]"; inserted=1 }
' "$FILE" > "$FILE.tmp" && mv "$FILE.tmp" "$FILE"
COUNT=$((COUNT + 1))
echo "Fixed: $(basename "$FILE")"
done
echo ""
echo "Done. Fixed $COUNT files."