Skip to content

Instantly share code, notes, and snippets.

@cbolyard
Created August 25, 2025 23:10
Show Gist options
  • Save cbolyard/71ae3ee5d5a2d79b8e9d3962b08269a8 to your computer and use it in GitHub Desktop.
Save cbolyard/71ae3ee5d5a2d79b8e9d3962b08269a8 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Prompt user for note input using AppleScript
NOTE=$(osascript -e 'Tell application "System Events" to display dialog "Enter meeting note keyword:" default answer ""' -e 'text returned of result' 2>/dev/null)
# Use an environment variable MEETING_NOTES_FOLDER if defined, else default to "$HOME/Documents/Meetings"
FOLDER="${MEETING_NOTES_FOLDER:-$HOME/Documents/Meetings}"
# Get current date
DATE=$(date +%Y-%m-%d)
# Sanitize note input
SAFE_NOTE=$(echo "$NOTE" | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g' | sed 's/[^a-z0-9\-]//g')
# Compose filename
FILENAME="${DATE}-meeting-${SAFE_NOTE}.md"
FULLPATH="${FOLDER}/${FILENAME}"
# Ensure folder exists
mkdir -p "$FOLDER"
# Create file if doesn't exist, add detailed markdown template content
if [ ! -f "$FULLPATH" ]; then
cat <<EOF > "$FULLPATH"
# Meeting Notes: $NOTE
Date: $DATE
## Attendees
-
## Agenda
-
## Notes
-
## Action Items
| Task | Owner | Due Date |
|------|-------|----------|
| | | |
EOF
fi
# Open the file in VSCode
code -g "$FULLPATH:15:3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment