A collection of import scripts for raindrop.io bookmark manager. Includes tools to convert various bookmark formats to CSV and directly import into Raindrop.io using their API.
- Clone this repository
- Install Poetry (if not already installed):
curl -sSL https://install.python-poetry.org | python3 -
- Install the dependencies:
poetry install
- Run the unified CLI using Poetry:
Or activate the Poetry shell first:
poetry run python raindrop_import.py [source] [options]
poetry shell python raindrop_import.py [source] [options]
- See below for specific examples
The unified CLI provides a single entry point for all import sources:
python raindrop_import.py [source] [options]
Available sources:
evernote
: Import from Evernote ENEX filespocket
: Import from Pocket HTML export fileschrome
: Import from Chrome bookmarks JSON filesfirefox
: Import from Firefox bookmarks JSON filesraindrop-api
: Import directly to Raindrop.io using their API
For help with a specific source:
python raindrop_import.py [source] --help
You can configure the import scripts in three ways, in order of precedence:
- Command-line arguments: Highest precedence, overrides all other settings
- Configuration file: YAML file with default settings
- Environment variables: Loaded from a
.env
file
Create a raindrop_import.yaml
file in the current directory or ~/.raindrop_import.yaml
in your home directory:
global:
log-file: raindrop_import.log
dry-run: false
pocket:
input-file: pocket_export.html
output-file: pocket.csv
raindrop-api:
api-token: your_api_token_here
collection-id: 0
batch-size: 50
Create a .env
file in the current directory or ~/.raindrop_import.env
in your home directory:
# Global settings
RAINDROP_LOG_FILE=raindrop_import.log
RAINDROP_DRY_RUN=false
# Raindrop API settings
RAINDROP_API_TOKEN=your_api_token_here
See .env.example
for more examples.
Import bookmarks directly into Raindrop.io using their API:
# Using OAuth authentication (recommended)
python raindrop_import.py raindrop-api --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET --input-file bookmarks.csv --collection-id 0
# Using API token (deprecated)
python raindrop_import.py raindrop-api --api-token YOUR_API_TOKEN --input-file bookmarks.csv --collection-id 0
Authentication Options:
--client-id
: Your Raindrop.io OAuth client ID (recommended)--client-secret
: Your Raindrop.io OAuth client secret (recommended)--api-token
: Your Raindrop.io API token (deprecated)
Other Options:
--input-file
: CSV file with bookmarks to import (required)--collection-id
: Raindrop.io collection ID to import into (default: 0 for Unsorted)--batch-size
: Number of bookmarks to import in each batch (default: 50)--dry-run
: Validate imports without sending to API
To get OAuth credentials, go to Raindrop.io Developer Settings and create a new app. You'll need both the client ID and client secret for OAuth authentication.
Import bookmarks from Evernote ENEX files:
python raindrop_import.py evernote --input-file export.enex --output-file evernote.csv --use-markdown
Options:
--input-file
: ENEX file to import (required)--output-file
: CSV file to write (required)--use-markdown
: Convert notes to Markdown format (optional)--dry-run
: Validate imports without writing files
Importing ENEX files directly into raindrop.io is a bit tricky due to filesize limitations. It's better to convert to CSV first, then import to Raindrop.io.
This functionality is based on YuriyGuts/enex2csv modified to work with Raindrop.io.
Import bookmarks from Pocket HTML export files:
python raindrop_import.py pocket --input-file ril_export.html --output-file pocket.csv
Options:
--input-file
: HTML file to import (required)--output-file
: CSV file to write (required)--dry-run
: Validate imports without writing files
In order to get your exported HTML file from pocket, go to https://getpocket.com/export and download the file. Their help page about the export can be found here.