searching-documents-with-google-drive
Google Drive Document Access
Overview
Search for and download documents from Google Drive using rclone. Google Docs are automatically exported as Markdown for easy reading and processing.
Scripts are located at scripts/.
Reference Documentation:
- scripts/ — Shell scripts for search, download, and sync operations
- digital-science-reference.md — Digital Science documentation links
Authentication: See the Authentication section in digital-science-reference.md for rclone setup. The remote must be named gdrive.
Quick Start
# Check rclone is configured
./scripts/check_rclone.sh
# Search for files
./scripts/search_gdrive.sh "meeting notes"
# Search shared files
./scripts/search_gdrive.sh "standup" --shared
# Download a file (exports Google Docs as Markdown)
./scripts/download_gdrive.sh "Documents/Report" ./output
# Download by file ID
./scripts/download_gdrive.sh --id "FILE_ID" ./output
# Download matching shared files
./scripts/download_gdrive.sh --shared --include "pattern*" ./output
Common Tasks
| Task | Command |
|---|---|
| Check setup | ./scripts/check_rclone.sh |
| Search files | ./scripts/search_gdrive.sh "pattern" |
| Search shared files | ./scripts/search_gdrive.sh "pattern" --shared |
| Download file | ./scripts/download_gdrive.sh "path/to/file" ./output |
| Download by ID | ./scripts/download_gdrive.sh --id "FILE_ID" ./output |
| Download folder | ./scripts/download_gdrive.sh "Folder" ./output --bulk |
| Download shared files | ./scripts/download_gdrive.sh --shared --include "pattern*" ./output |
| Limit downloads | ./scripts/download_gdrive.sh --shared --include "pattern*" ./output --limit 20 |
Export Formats
Google Docs can be exported in different formats:
| Format | Flag | Use Case |
|---|---|---|
| Markdown | --format md (default) |
Easy reading and processing |
| Word | --format docx |
Office compatibility |
--format pdf |
Final documents | |
| Plain text | --format txt |
Minimal formatting |
| HTML | --format html |
Web content |
Example: ./scripts/download_gdrive.sh "Report" ./output --format docx
File ID Extraction
Extract file IDs from Google Drive URLs:
https://docs.google.com/document/d/FILE_ID/edit→ use FILE_IDhttps://drive.google.com/file/d/FILE_ID/view→ use FILE_ID
Preview Before Download
Use dry-run to see what would be downloaded:
./scripts/download_gdrive.sh "Large Folder" ./output --bulk --dry-run
Direct rclone Commands
For advanced use cases:
rclone ls gdrive:"Documents" # List files
rclone lsjson gdrive:"path" --no-traverse # Get file info as JSON
rclone sync gdrive:"Source" ./local --drive-export-formats md # Sync folder
Troubleshooting
| Issue | Solution |
|---|---|
| "remote not configured" | Run rclone config to set up gdrive remote |
| "Cannot connect" | Run rclone config reconnect gdrive: |
| Empty search results | Check path spelling; try searching from root |
| File not downloading | Verify file permissions; check if file is in Trash |
| Shared files not found | Use --shared flag |
| Too many files | Use --limit N to download only N most recent |
More from kjgarza/marketplace-claude
vscode-extension-builder
Comprehensive guide for creating VS Code extensions from scratch, including project scaffolding, API usage, activation events, and packaging. Use when user wants to create/build/generate/develop a VS Code extension or plugin, asks about VS Code extension development, needs help with VS Code Extension API, discusses extension architecture, wants to add commands/webviews/language support, or mentions scaffolding a VS Code project.
94detect-code-smells
Detect common code smells and anti-patterns providing feedback on quality issues a senior developer would catch during review. Use when user opens/views code files, asks for code review or quality assessment, mentions code quality/refactoring/improvements, when files contain code smell patterns, or during code review discussions.
10scientific-visualization
Create publication figures with matplotlib/seaborn/plotly. Multi-panel layouts, error bars, significance markers, colorblind-safe, export PDF/EPS/TIFF, for journal-ready scientific plots.
9searching-academic-outputs-with-dimensions
Search for academic literature, empirical evidence, and scholarly research using the Dimensions database. Use when seeking research papers to support product decisions, find empirical studies, conduct literature reviews, explore funding patterns, validate hypotheses with academic sources, or discover research trends. Supports publications, grants, patents, clinical trials, and researcher profiles. Triggers on requests for "academic evidence", "empirical research", "find studies", "literature search", or "research to support decisions".
8scholar-evaluation
Systematic framework for evaluating scholarly and research work based on the ScholarEval methodology. This skill should be used when assessing research papers, evaluating literature reviews, scoring research methodologies, analyzing scientific writing quality, or applying structured evaluation criteria to academic work. Provides comprehensive assessment across multiple dimensions including problem formulation, literature review, methodology, data collection, analysis, results interpretation, and scholarly writing quality.
8project-scaffold
>
8