fix: correct hardcoded folder paths to use underscores

- Fix transcript-extract.sh: `00 Inbox/Clippings` → `00_Inbox/Clippings/`
- Fix firecrawl-batch.sh: `00 Inbox/Clippings` → `00_Inbox/Clippings/`
- Add `-o|--output-dir` flag to firecrawl-batch.sh for custom paths
- Fix update-attachment-links.js: `05 Attachments` → `05_Attachments`
- Fix fix-renamed-links.js: `05 Attachments` → `05_Attachments`
- Fix GEMINI_VISION_QUICK_START.md example paths
- Update README.md with new flag documentation

All folder paths now match actual repo structure (underscores not spaces).
This prevents scripts from failing due to incorrect directory references.

Fixes #9

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Noah Brier
2025-10-12 21:25:52 -04:00
co-authored by Claude
parent d2a3b58937
commit 5b00b25240
7 changed files with 62 additions and 37 deletions
@@ -145,7 +145,7 @@ After adding, you'll need to edit the `.mcp.json` file to add your API key:
3. **Test with an actual command**:
```
Use gemini-vision to extract text from 05 Attachments/[any-image.png]
Use gemini-vision to extract text from 05_Attachments/[any-image.png]
```
## Troubleshooting
@@ -230,7 +230,7 @@ After adding, you'll need to edit the `.mcp.json` file to add your API key:
2. **Check file paths**:
- Use absolute paths from vault root
- Example: `05 Attachments/image.png` not `./05 Attachments/image.png`
- Example: `05_Attachments/image.png` not `./05_Attachments/image.png`
## Available Tools
@@ -240,10 +240,10 @@ Once working, you can use these in Claude:
```
# Analyze an image
Use gemini-vision to analyze 05 Attachments/screenshot.png
Use gemini-vision to analyze 05_Attachments/screenshot.png
# Extract text (OCR)
Use gemini-vision to extract text from 05 Attachments/document.jpg
Use gemini-vision to extract text from 05_Attachments/document.jpg
# Compare images
Use gemini-vision to compare image1.png and image2.png
@@ -259,7 +259,7 @@ Use gemini-vision to analyze multiple: image1.png, image2.png, image3.png
```
# Analyze a local video file
Use gemini-vision to analyze video 05 Attachments/video.mp4
Use gemini-vision to analyze video 05_Attachments/video.mp4
# Analyze a YouTube video
Use gemini-vision to analyze YouTube video https://www.youtube.com/watch?v=VIDEO_ID
@@ -298,9 +298,7 @@ Then open a new Claude window and test.
- **Server code**: `.claude/mcp-servers/gemini-vision.mjs`
- **Dependencies**: `package.json`
- **This guide**: `07 Readme/GEMINI_VISION_QUICK_START.md`
- **Detailed docs**: `07 Readme/GEMINI_VISION_INSTALLATION.md`
- **Development guide**: `07 Readme/MCP_DEVELOPMENT_GUIDE.md`
- **This guide**: `.claude/mcp-servers/GEMINI_VISION_QUICK_START.md`
## Need Help?
+10 -1
View File
@@ -30,8 +30,13 @@ Scrapes multiple URLs and auto-generates filenames.
```bash
# Requires FIRECRAWL_API_KEY environment variable
# Basic usage - saves to 00_Inbox/Clippings/
.scripts/firecrawl-batch.sh <url1> <url2> <url3>
# Files saved to 00_Inbox/Clippings/
# Custom output directory
.scripts/firecrawl-batch.sh -o 01_Projects/Research/ <url1> <url2>
.scripts/firecrawl-batch.sh --output-dir 03_Resources/Articles/ <url1> <url2>
```
### Transcript Extraction
@@ -41,7 +46,11 @@ Scrapes multiple URLs and auto-generates filenames.
Extracts transcripts from YouTube videos.
```bash
# Basic usage - saves to 00_Inbox/Clippings/
.scripts/transcript-extract.sh <youtube-url>
# Custom output directory
.scripts/transcript-extract.sh <youtube-url> 01_Projects/Research/
```
## NPM Scripts
+26 -8
View File
@@ -1,16 +1,34 @@
#!/bin/bash
# Firecrawl batch scraper script
# Usage: ./firecrawl-batch.sh <url1> <url2> ...
# Usage: ./firecrawl-batch.sh [-o|--output-dir <dir>] <url1> <url2> ...
# Automatically generates filenames based on page titles and dates
# Requires: FIRECRAWL_API_KEY environment variable
# Source .zshrc to get the API key
source ~/.zshrc
# Default output directory
OUTPUT_DIR="00_Inbox/Clippings/"
URLS=()
if [ $# -eq 0 ]; then
echo "Usage: $0 <url1> <url2> ..."
echo "Scrapes multiple URLs and saves them to 00 Inbox/Clippings/"
# Parse arguments
while [[ $# -gt 0 ]]; do
case $1 in
-o|--output-dir)
OUTPUT_DIR="$2"
shift 2
;;
*)
URLS+=("$1")
shift
;;
esac
done
if [ ${#URLS[@]} -eq 0 ]; then
echo "Usage: $0 [-o|--output-dir <dir>] <url1> <url2> ..."
echo "Default output directory: 00_Inbox/Clippings/"
echo ""
echo "Options:"
echo " -o, --output-dir <dir> Specify custom output directory"
exit 1
fi
@@ -21,7 +39,7 @@ fi
# Get today's date
TODAY=$(date +"%Y-%m-%d")
CLIPPINGS_DIR="00 Inbox/Clippings"
CLIPPINGS_DIR="$OUTPUT_DIR"
# Create clippings directory if it doesn't exist
mkdir -p "$CLIPPINGS_DIR"
@@ -41,7 +59,7 @@ SUCCESS_COUNT=0
FAIL_COUNT=0
# Process each URL
for URL in "$@"; do
for URL in "${URLS[@]}"; do
echo "Processing: $URL"
# Make the API call and save to temp file
+5 -5
View File
@@ -23,7 +23,7 @@ if (args.length !== 2) {
}
const [oldName, newName] = args
const newPath = `05 Attachments/Organized/${newName}`
const newPath = `05_Attachments/Organized/${newName}`
console.log(`Fixing links: ${oldName}${newName}`)
@@ -59,9 +59,9 @@ walkDir('.', (filepath) => {
const pattern1 = new RegExp(`!\\[\\[${escapedOld}\\]\\]`, 'g')
content = content.replace(pattern1, `![[${newPath}]]`)
// Pattern 2: ![[05 Attachments/oldname]]
// Pattern 2: ![[05_Attachments/oldname]]
const pattern2 = new RegExp(
`!\\[\\[05 Attachments/${escapedOld}\\]\\]`,
`!\\[\\[05_Attachments/${escapedOld}\\]\\]`,
'g',
)
content = content.replace(pattern2, `![[${newPath}]]`)
@@ -70,9 +70,9 @@ walkDir('.', (filepath) => {
const pattern3 = new RegExp(`(?<!!)\\[\\[${escapedOld}\\]\\]`, 'g')
content = content.replace(pattern3, `[[${newPath}]]`)
// Pattern 4: [[05 Attachments/oldname]] without !
// Pattern 4: [[05_Attachments/oldname]] without !
const pattern4 = new RegExp(
`(?<!!)\\[\\[05 Attachments/${escapedOld}\\]\\]`,
`(?<!!)\\[\\[05_Attachments/${escapedOld}\\]\\]`,
'g',
)
content = content.replace(pattern4, `[[${newPath}]]`)
+3 -3
View File
@@ -2,16 +2,16 @@
# Transcript extraction script for YouTube videos
# Usage: .scripts/transcript-extract.sh <youtube-url> [output-path]
# Default output: 00 Inbox/Clippings/
# Default output: 00_Inbox/Clippings/
set -e
URL="$1"
OUTPUT_PATH="${2:-00 Inbox/Clippings}"
OUTPUT_PATH="${2:-00_Inbox/Clippings/}"
if [ -z "$URL" ]; then
echo "Usage: $0 <youtube-url> [output-path]"
echo "Default output path: 00 Inbox/Clippings/"
echo "Default output path: 00_Inbox/Clippings/"
exit 1
fi
+10 -10
View File
@@ -11,7 +11,7 @@
import fs from 'node:fs'
import path from 'node:path'
const organizedDir = '05 Attachments/Organized'
const organizedDir = '05_Attachments/Organized'
const args = process.argv.slice(2)
const specificFile = args[0]
@@ -69,24 +69,24 @@ walkDir('.', (filepath) => {
const pattern1 = new RegExp(`!\\[\\[${escapedFile}\\]\\]`, 'g')
content = content.replace(
pattern1,
`![[05 Attachments/Organized/${filename}]]`,
`![[05_Attachments/Organized/${filename}]]`,
)
// Pattern 2: ![[05 Attachments/filename]] (file in root being moved)
// Pattern 2: ![[05_Attachments/filename]] (file in root being moved)
const pattern2 = new RegExp(
`!\\[\\[05 Attachments/${escapedFile}\\]\\]`,
`!\\[\\[05_Attachments/${escapedFile}\\]\\]`,
'g',
)
content = content.replace(
pattern2,
`![[05 Attachments/Organized/${filename}]]`,
`![[05_Attachments/Organized/${filename}]]`,
)
// Pattern 3: [[filename]] without ! (for PDFs and other non-embedded links)
// Only if not already pointing to Organized
const pattern3 = new RegExp(`\\[\\[${escapedFile}\\]\\]`, 'g')
const pattern3Organized = new RegExp(
`\\[\\[05 Attachments/Organized/${escapedFile}\\]\\]`,
`\\[\\[05_Attachments/Organized/${escapedFile}\\]\\]`,
'g',
)
@@ -94,18 +94,18 @@ walkDir('.', (filepath) => {
if (!pattern3Organized.test(content)) {
content = content.replace(
pattern3,
`[[05 Attachments/Organized/${filename}]]`,
`[[05_Attachments/Organized/${filename}]]`,
)
}
// Pattern 4: [[05 Attachments/filename]] without !
// Pattern 4: [[05_Attachments/filename]] without !
const pattern4 = new RegExp(
`\\[\\[05 Attachments/${escapedFile}\\]\\]`,
`\\[\\[05_Attachments/${escapedFile}\\]\\]`,
'g',
)
content = content.replace(
pattern4,
`[[05 Attachments/Organized/${filename}]]`,
`[[05_Attachments/Organized/${filename}]]`,
)
})
+2 -2
View File
@@ -12,8 +12,8 @@ and this project adheres to
### Added
- New `/install-claudesidian-command` for creating shell alias/function to launch
vault from anywhere
- New `/install-claudesidian-command` for creating shell alias/function to
launch vault from anywhere
- iCloud Drive vault detection and import support in `/init-bootstrap` (macOS
only)
- Fish shell support for launcher command with proper function syntax