Raindrop.io CSV to Zettelkasten Markdown CLI
Project description
Raindrop.io CSV to Zettelkasten-based Markdown
A Python CLI tool to parse a CSV export from Raindrop.io and create a directory of individual markdown files - one per bookmark - using Zettelkasten-style filenames.
Table of Contents
Features
- Parses Raindrop.io CSV exports
- Extracts bookmarks and highlights
- Creates a directory of markdown files (one per bookmark)
- Zettelkasten-style filenames:
{YYYYMMDDHHMM}_{title}.md - Interactive CLI to show, edit, remove, and search bookmarks in the directory
- Fuzzy search across all bookmarks
- Robust error handling and logging
- Comprehensive unit tests
Requirements
- Python 3.8+
Installation
-
Clone the repository:
git clone <repository-url>
-
Navigate to the project directory
cd <project-directory>
-
(Optional) Create and activate a virtual environment
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
Usage
- Place your Raindrop.io CSV export anywhere on your system.
- Run the script to create a directory of markdown files:
python raindropMD.py create <your_csv_file.csv> <output_directory>
Example:python raindropMD.py create ~/Downloads/raindrop.csv bookmarks/
- Use the CLI to manage your bookmarks:
- List all bookmarks:
python raindropMD.py list <output_directory>
- Edit a bookmark interactively:
python raindropMD.py edit <output_directory>
- Remove a bookmark interactively:
python raindropMD.py remove <output_directory>
- Fuzzy search bookmarks:
python raindropMD.py search <output_directory> <query>
- List all bookmarks:
Template System
This tool supports user-editable markdown templates for generating bookmark notes. Templates are written using the Jinja2 templating language and must follow these conventions:
Template File Requirements
- Templates must be placed in the
templates/directory and have the.md.j2extension (e.g.,bookmark_template.md.j2). - The template filename is used as its identifier and is referenced in the YAML frontmatter of each generated note.
Template Syntax
- Use Jinja2 variable syntax for bookmark fields, e.g.
{{ title }},{{ url }},{{ tags }}. - Standard bookmark fields available:
title,url,cover,tags,created,favorite,excerpt,note,highlights
- You may define additional user sections by adding new variables (e.g.,
{{ user_notes }}) in the template. These will be preserved and editable in the CLI. - To render highlights as a list, use a Jinja2 loop:
{% if highlights %} ### Highlights: {% for h in highlights %} > {{ h }} {% endfor %} {% endif %}
- You can use any valid Jinja2 syntax for formatting, conditionals, and loops.
YAML Frontmatter
- Each generated note includes YAML frontmatter indicating the template used:
--- template: bookmark_template.md.j2 ---
- The tool uses this field to ensure the correct template is used for editing and parsing.
Example Template
## [{{ title }}]({{ url }})
{% if cover %}{% endif %}
**Tags:** {{ tags }}
**Created:** {{ created }}
{% if favorite %}⭐ **Favorite**{% endif %}
{% if excerpt %}
_Excerpt:_ {{ excerpt }}
{% endif %}
{% if note %}
_Note:_ {{ note }}
{% endif %}
{% if highlights %}
### Highlights:
{% for h in highlights %}
> {{ h }}
{% endfor %}
{% endif %}
User-Defined Sections
- Any variable in the template that is not a standard bookmark field is treated as a user-defined section (e.g.,
{{ user_notes }}). - The CLI will prompt for these sections when creating or editing notes, and will preserve their content on update.
Template Best Practices
- Use clear section headers (e.g.,
### Notes) for user-defined sections. - Avoid duplicate variable names.
- Test your template with a sample bookmark to ensure all fields render as expected.
See the templates/ directory for working examples.
TODOs
- Improve CLI output
- Add markdown template customization
- Improve bookmark editing
- Add note title customization
- Add GitHub Action to create, test, and publish package
- Add Raindrop API use to automate CSV export
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file raindropmd-0.1.1.tar.gz.
File metadata
- Download URL: raindropmd-0.1.1.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49c40cbb9744e377ac3c159608e1b01c6016986d279b61beb601e07b17415f58
|
|
| MD5 |
8ee9effa040745c855d3c1304e1b57c2
|
|
| BLAKE2b-256 |
9b6636358ecd5009a928080bfb7d6045f2e5c24fb213a4a2e8241e20e7fdc578
|
File details
Details for the file raindropmd-0.1.1-py3-none-any.whl.
File metadata
- Download URL: raindropmd-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b7a93a548568f31dc927800470a46ad9021b93588e9046e7e67007117fffaa2
|
|
| MD5 |
a45d6911663d5373cabf38075662381c
|
|
| BLAKE2b-256 |
0fb2e32cdeada578682abe16f5296ecb9c94466419f361359866951eb0bb6e29
|