raindrop-tags
v0.1.0
Published
Merging Tags
Readme
Raindrop.io Tag Consolidation Script
This script consolidates your Raindrop.io tags based on the recommendations from your tag analysis.
Setup
Get your Raindrop.io API token:
- Go to https://app.raindrop.io/settings/integrations
- Create a new app or use an existing one
- Copy the "Test token" or generate an access token
Set your API token:
export RAINDROP_TOKEN="your_token_here"Install dependencies (if using older Node.js):
# Script uses built-in modules, no dependencies needed for Node.js 18+ # For older versions, you might want to install axios: # npm install axios
Usage
Preview changes (recommended first):
node merge.js --dry-runUse an external tag consolidation file (recommended for custom mappings):
node merge.js --dry-run --tags tag_consolidation.jsonApply changes to all collections:
node merge.jsUse an external tag consolidation file and apply changes:
node merge.js --tags tag_consolidation.jsonExample tag_consolidation.json
{
"development": ["Development", "Application", "App"],
"react": ["React", "React@Square"],
"ai": ["AI", "artificial-intelligence", "ai-tools"]
}Get help:
node merge.js --helpWhat it does
The script consolidates tags in your Raindrop.io account based on a mapping. You can use the built-in mapping or provide your own via a JSON file.
- By default: Uses the built-in mapping (see
merge.jsfor details). - With
--tags path/to/file.json: Loads your custom mapping from a JSON file.
Example: Built-in mapping (partial)
- development ← Development, Application, App
- react ← React, React@Square
- ai ← AI, artificial-intelligence, ai-tools, ai-agents, ai-integration
Example: Custom mapping (from JSON)
{
"mytag": ["oldtag1", "oldtag2"]
}Safety Features
- Dry run mode: Preview changes before applying
- Rate limiting: 1 second delay between API calls
- Error handling: Continues processing even if some operations fail
- Detailed logging: Shows exactly what's happening
Example Output
🏷️ Raindrop.io Tag Consolidation Script
==========================================
🔍 Running in DRY RUN mode - no changes will be made
🔗 Using external tag consolidation file: tag_consolidation.json
📊 Found 42 tags
🔄 Consolidating tags [AI, artificial-intelligence, ai-tools] → "ai"
📥 Found 3 raindrops with tag "AI"
[DRY RUN] Would update raindrop 123456 with tags: ai, ...
...
🚀 Starting consolidation...
🔄 [DRY RUN] Merging tags [AI, artificial-intelligence, ai-tools] → "ai"
Would merge 3 tags into "ai"
...
📈 Consolidation Summary:
✅ Successful operations: 8
❌ Failed operations: 0
📊 Total operations: 8
💡 Run without --dry-run to apply changesImportant Notes
- Always run with
--dry-runfirst to preview changes - The script will wait 3 seconds before applying changes (giving you time to cancel with Ctrl+C)
- Changes are permanent - make sure you're happy with the consolidation plan
- The script includes rate limiting to respect Raindrop.io's API limits
- If you have a lot of bookmarks, the process might take a while
Testing
A simple test script is provided to validate external tag file loading and dry-run mode:
node test_merge.jsThis will:
- Create a minimal test tag mapping file
- Run
merge.jswith--dry-run --tags - Check for expected output and clean up
Troubleshooting
- "Please set your Raindrop.io API token": Set the RAINDROP_TOKEN environment variable
- "Failed to fetch tags": Check your API token and internet connection
- Rate limiting errors: The script includes delays, but you can increase them if needed
