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:
@@ -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**:
|
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
|
## 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**:
|
2. **Check file paths**:
|
||||||
- Use absolute paths from vault root
|
- 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
|
## Available Tools
|
||||||
|
|
||||||
@@ -240,10 +240,10 @@ Once working, you can use these in Claude:
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Analyze an image
|
# Analyze an image
|
||||||
Use gemini-vision to analyze 05 Attachments/screenshot.png
|
Use gemini-vision to analyze 05_Attachments/screenshot.png
|
||||||
|
|
||||||
# Extract text (OCR)
|
# 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
|
# Compare images
|
||||||
Use gemini-vision to compare image1.png and image2.png
|
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
|
# 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
|
# Analyze a YouTube video
|
||||||
Use gemini-vision to analyze YouTube video https://www.youtube.com/watch?v=VIDEO_ID
|
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`
|
- **Server code**: `.claude/mcp-servers/gemini-vision.mjs`
|
||||||
- **Dependencies**: `package.json`
|
- **Dependencies**: `package.json`
|
||||||
- **This guide**: `07 Readme/GEMINI_VISION_QUICK_START.md`
|
- **This guide**: `.claude/mcp-servers/GEMINI_VISION_QUICK_START.md`
|
||||||
- **Detailed docs**: `07 Readme/GEMINI_VISION_INSTALLATION.md`
|
|
||||||
- **Development guide**: `07 Readme/MCP_DEVELOPMENT_GUIDE.md`
|
|
||||||
|
|
||||||
## Need Help?
|
## Need Help?
|
||||||
|
|
||||||
|
|||||||
+10
-1
@@ -30,8 +30,13 @@ Scrapes multiple URLs and auto-generates filenames.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Requires FIRECRAWL_API_KEY environment variable
|
# Requires FIRECRAWL_API_KEY environment variable
|
||||||
|
|
||||||
|
# Basic usage - saves to 00_Inbox/Clippings/
|
||||||
.scripts/firecrawl-batch.sh <url1> <url2> <url3>
|
.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
|
### Transcript Extraction
|
||||||
@@ -41,7 +46,11 @@ Scrapes multiple URLs and auto-generates filenames.
|
|||||||
Extracts transcripts from YouTube videos.
|
Extracts transcripts from YouTube videos.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Basic usage - saves to 00_Inbox/Clippings/
|
||||||
.scripts/transcript-extract.sh <youtube-url>
|
.scripts/transcript-extract.sh <youtube-url>
|
||||||
|
|
||||||
|
# Custom output directory
|
||||||
|
.scripts/transcript-extract.sh <youtube-url> 01_Projects/Research/
|
||||||
```
|
```
|
||||||
|
|
||||||
## NPM Scripts
|
## NPM Scripts
|
||||||
|
|||||||
@@ -1,16 +1,34 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Firecrawl batch scraper script
|
# 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
|
# Automatically generates filenames based on page titles and dates
|
||||||
# Requires: FIRECRAWL_API_KEY environment variable
|
# Requires: FIRECRAWL_API_KEY environment variable
|
||||||
|
|
||||||
# Source .zshrc to get the API key
|
# Default output directory
|
||||||
source ~/.zshrc
|
OUTPUT_DIR="00_Inbox/Clippings/"
|
||||||
|
URLS=()
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
# Parse arguments
|
||||||
echo "Usage: $0 <url1> <url2> ..."
|
while [[ $# -gt 0 ]]; do
|
||||||
echo "Scrapes multiple URLs and saves them to 00 Inbox/Clippings/"
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -21,7 +39,7 @@ fi
|
|||||||
|
|
||||||
# Get today's date
|
# Get today's date
|
||||||
TODAY=$(date +"%Y-%m-%d")
|
TODAY=$(date +"%Y-%m-%d")
|
||||||
CLIPPINGS_DIR="00 Inbox/Clippings"
|
CLIPPINGS_DIR="$OUTPUT_DIR"
|
||||||
|
|
||||||
# Create clippings directory if it doesn't exist
|
# Create clippings directory if it doesn't exist
|
||||||
mkdir -p "$CLIPPINGS_DIR"
|
mkdir -p "$CLIPPINGS_DIR"
|
||||||
@@ -41,7 +59,7 @@ SUCCESS_COUNT=0
|
|||||||
FAIL_COUNT=0
|
FAIL_COUNT=0
|
||||||
|
|
||||||
# Process each URL
|
# Process each URL
|
||||||
for URL in "$@"; do
|
for URL in "${URLS[@]}"; do
|
||||||
echo "Processing: $URL"
|
echo "Processing: $URL"
|
||||||
|
|
||||||
# Make the API call and save to temp file
|
# Make the API call and save to temp file
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ if (args.length !== 2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const [oldName, newName] = args
|
const [oldName, newName] = args
|
||||||
const newPath = `05 Attachments/Organized/${newName}`
|
const newPath = `05_Attachments/Organized/${newName}`
|
||||||
|
|
||||||
console.log(`Fixing links: ${oldName} → ${newName}`)
|
console.log(`Fixing links: ${oldName} → ${newName}`)
|
||||||
|
|
||||||
@@ -59,9 +59,9 @@ walkDir('.', (filepath) => {
|
|||||||
const pattern1 = new RegExp(`!\\[\\[${escapedOld}\\]\\]`, 'g')
|
const pattern1 = new RegExp(`!\\[\\[${escapedOld}\\]\\]`, 'g')
|
||||||
content = content.replace(pattern1, `![[${newPath}]]`)
|
content = content.replace(pattern1, `![[${newPath}]]`)
|
||||||
|
|
||||||
// Pattern 2: ![[05 Attachments/oldname]]
|
// Pattern 2: ![[05_Attachments/oldname]]
|
||||||
const pattern2 = new RegExp(
|
const pattern2 = new RegExp(
|
||||||
`!\\[\\[05 Attachments/${escapedOld}\\]\\]`,
|
`!\\[\\[05_Attachments/${escapedOld}\\]\\]`,
|
||||||
'g',
|
'g',
|
||||||
)
|
)
|
||||||
content = content.replace(pattern2, `![[${newPath}]]`)
|
content = content.replace(pattern2, `![[${newPath}]]`)
|
||||||
@@ -70,9 +70,9 @@ walkDir('.', (filepath) => {
|
|||||||
const pattern3 = new RegExp(`(?<!!)\\[\\[${escapedOld}\\]\\]`, 'g')
|
const pattern3 = new RegExp(`(?<!!)\\[\\[${escapedOld}\\]\\]`, 'g')
|
||||||
content = content.replace(pattern3, `[[${newPath}]]`)
|
content = content.replace(pattern3, `[[${newPath}]]`)
|
||||||
|
|
||||||
// Pattern 4: [[05 Attachments/oldname]] without !
|
// Pattern 4: [[05_Attachments/oldname]] without !
|
||||||
const pattern4 = new RegExp(
|
const pattern4 = new RegExp(
|
||||||
`(?<!!)\\[\\[05 Attachments/${escapedOld}\\]\\]`,
|
`(?<!!)\\[\\[05_Attachments/${escapedOld}\\]\\]`,
|
||||||
'g',
|
'g',
|
||||||
)
|
)
|
||||||
content = content.replace(pattern4, `[[${newPath}]]`)
|
content = content.replace(pattern4, `[[${newPath}]]`)
|
||||||
|
|||||||
@@ -2,16 +2,16 @@
|
|||||||
|
|
||||||
# Transcript extraction script for YouTube videos
|
# Transcript extraction script for YouTube videos
|
||||||
# Usage: .scripts/transcript-extract.sh <youtube-url> [output-path]
|
# Usage: .scripts/transcript-extract.sh <youtube-url> [output-path]
|
||||||
# Default output: 00 Inbox/Clippings/
|
# Default output: 00_Inbox/Clippings/
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
URL="$1"
|
URL="$1"
|
||||||
OUTPUT_PATH="${2:-00 Inbox/Clippings}"
|
OUTPUT_PATH="${2:-00_Inbox/Clippings/}"
|
||||||
|
|
||||||
if [ -z "$URL" ]; then
|
if [ -z "$URL" ]; then
|
||||||
echo "Usage: $0 <youtube-url> [output-path]"
|
echo "Usage: $0 <youtube-url> [output-path]"
|
||||||
echo "Default output path: 00 Inbox/Clippings/"
|
echo "Default output path: 00_Inbox/Clippings/"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
import fs from 'node:fs'
|
import fs from 'node:fs'
|
||||||
import path from 'node:path'
|
import path from 'node:path'
|
||||||
|
|
||||||
const organizedDir = '05 Attachments/Organized'
|
const organizedDir = '05_Attachments/Organized'
|
||||||
const args = process.argv.slice(2)
|
const args = process.argv.slice(2)
|
||||||
const specificFile = args[0]
|
const specificFile = args[0]
|
||||||
|
|
||||||
@@ -69,24 +69,24 @@ walkDir('.', (filepath) => {
|
|||||||
const pattern1 = new RegExp(`!\\[\\[${escapedFile}\\]\\]`, 'g')
|
const pattern1 = new RegExp(`!\\[\\[${escapedFile}\\]\\]`, 'g')
|
||||||
content = content.replace(
|
content = content.replace(
|
||||||
pattern1,
|
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(
|
const pattern2 = new RegExp(
|
||||||
`!\\[\\[05 Attachments/${escapedFile}\\]\\]`,
|
`!\\[\\[05_Attachments/${escapedFile}\\]\\]`,
|
||||||
'g',
|
'g',
|
||||||
)
|
)
|
||||||
content = content.replace(
|
content = content.replace(
|
||||||
pattern2,
|
pattern2,
|
||||||
`![[05 Attachments/Organized/${filename}]]`,
|
`![[05_Attachments/Organized/${filename}]]`,
|
||||||
)
|
)
|
||||||
|
|
||||||
// Pattern 3: [[filename]] without ! (for PDFs and other non-embedded links)
|
// Pattern 3: [[filename]] without ! (for PDFs and other non-embedded links)
|
||||||
// Only if not already pointing to Organized
|
// Only if not already pointing to Organized
|
||||||
const pattern3 = new RegExp(`\\[\\[${escapedFile}\\]\\]`, 'g')
|
const pattern3 = new RegExp(`\\[\\[${escapedFile}\\]\\]`, 'g')
|
||||||
const pattern3Organized = new RegExp(
|
const pattern3Organized = new RegExp(
|
||||||
`\\[\\[05 Attachments/Organized/${escapedFile}\\]\\]`,
|
`\\[\\[05_Attachments/Organized/${escapedFile}\\]\\]`,
|
||||||
'g',
|
'g',
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -94,18 +94,18 @@ walkDir('.', (filepath) => {
|
|||||||
if (!pattern3Organized.test(content)) {
|
if (!pattern3Organized.test(content)) {
|
||||||
content = content.replace(
|
content = content.replace(
|
||||||
pattern3,
|
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(
|
const pattern4 = new RegExp(
|
||||||
`\\[\\[05 Attachments/${escapedFile}\\]\\]`,
|
`\\[\\[05_Attachments/${escapedFile}\\]\\]`,
|
||||||
'g',
|
'g',
|
||||||
)
|
)
|
||||||
content = content.replace(
|
content = content.replace(
|
||||||
pattern4,
|
pattern4,
|
||||||
`[[05 Attachments/Organized/${filename}]]`,
|
`[[05_Attachments/Organized/${filename}]]`,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -12,8 +12,8 @@ and this project adheres to
|
|||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- New `/install-claudesidian-command` for creating shell alias/function to launch
|
- New `/install-claudesidian-command` for creating shell alias/function to
|
||||||
vault from anywhere
|
launch vault from anywhere
|
||||||
- iCloud Drive vault detection and import support in `/init-bootstrap` (macOS
|
- iCloud Drive vault detection and import support in `/init-bootstrap` (macOS
|
||||||
only)
|
only)
|
||||||
- Fish shell support for launcher command with proper function syntax
|
- Fish shell support for launcher command with proper function syntax
|
||||||
|
|||||||
Reference in New Issue
Block a user