Skip to content

9highlander/Raindrop_scripts

Repository files navigation

Raindrop Scripts

A collection of Python scripts to interact with Raindrop.io bookmarks and collections using the Raindrop REST API.

Scripts

  • all_bookmarks_df.py: Export all Raindrop bookmarks to a CSV file (all_bookmarks.csv) using pandas DataFrame
  • create_collection.py: Create a new collection in Raindrop (optionally under a specified group)
  • list_collections.py: List all collections and display top-level groups
  • tag_to_collection.py: Add a specified tag to all bookmarks in a specific collection

Features

  • Export bookmarks to CSV with selected columns (ID, title, link, tags, excerpt, created, lastUpdate)
  • Create new collections with optional parent group
  • List and filter collections by top-level groups
  • Bulk add tags to collections while skipping existing tags
  • Direct integration with Raindrop REST API
  • Rate limiting to respect API limits (0.1s delay between calls)
  • Environment-based configuration for security

Prerequisites

  • Python 3.6+
  • A Raindrop account with API access

Installation

  1. Clone this repository

  2. Install dependencies:

    pip install -r requirements.txt
  3. Copy .env_example to .env and fill in your values:

    cp .env_example .env

Configuration

Edit the .env file with your Raindrop credentials and script parameters:

  • RAINDROP_API_TOKEN: Your Raindrop API token (get from Raindrop settings > Integrations)
  • RAINDROP_COLLECTION_ID: The ID of the collection to modify (used by tag_to_collection.py)
  • RAINDROP_TAG: The tag to add to bookmarks (used by tag_to_collection.py)
  • NEW_COLLECTION_NAME: Name for the new collection (used by create_collection.py)
  • GROUP_ID: Optional parent group ID for new collection (used by create_collection.py)

Usage

Export All Bookmarks to CSV

Run the script to export all bookmarks:

python all_bookmarks_df.py

This will create all_bookmarks.csv with all your Raindrop bookmarks.

Create a New Collection

Run the script to create a collection:

python create_collection.py

Requires NEW_COLLECTION_NAME in .env. Optionally uses GROUP_ID for nested collections.

List Collections

Run the script to list all collections:

python list_collections.py

Displays the total number of collections and lists top-level groups.

Add Tag to Collection

Run the script to add a tag to all bookmarks in a collection:

python tag_to_collection.py

Requires RAINDROP_COLLECTION_ID and RAINDROP_TAG in .env. Skips bookmarks that already have the tag.

API Token

To get your Raindrop API token:

  1. Go to Raindrop.io
  2. Open Settings > Integrations
  3. Generate a new API token
  4. Copy the token to your .env file

Rate Limiting

Scripts include delays between API calls to respect Raindrop's rate limits (0.1 second delay in tag addition script).

Error Handling

  • Invalid API token results in 401 Unauthorized
  • Invalid collection ID results in 404 Not Found
  • Network errors are caught and displayed
  • Missing environment variables raise ValueError

License

This project is open source. Feel free to use and modify as needed.

About

bunch of example of raindrop scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages