An experimental plugin to synchronize Readwise highlights into your Obsidian Vault.
- Sync highlights on Obsidian startup
- Update existing notes with new highlights
- Customization for note header and highlights through templating
After installation, it will ask for an API token. This is required in order to pull the highlights from Readwise into your vault.
If you don't configure the API token on installation, you can always configure it on the Settings section.
NOTE: The token is stored using localStorage and it may have conflicts if the same vault were to be open on 2 different windows.
Readwise: Sync highlights
: Will pull any new highlights from Readwise since the last time it was synced.
The plugin supports templating the header of a note and each individual highlight. Templates are only evaluated during note creation and when adding new highlights.
The templating system in use is Nunjucks.
The default header template is:
- **URL:** {{ source_url }}
- **Author:** {{ author }}
- **Tags:** #{{ category }}
- **Date:** [[{{ updated }}]]
---
This can be overwritten by configuring the Custom Header Template Path
setting to the path of a different template. The available parameters for a custom header template are:
title
source_url
author
category
updated
num_highlights
The default highlight template is:
{{ text }} %% highlight_id: {{ id }} %%
{%- if note %}
Note: {{ note }}
{%- endif %}
This can be overwritten by configuring the Custom Highlight Template Path
setting to the path of a different template. The available parameters for a custom highlight template are:
text
note
id
location
If the custom highlight template doesn't include highlight_id: <id>
, then this will be appended at the end of the rendered content as %% highlight_id: <id> %%
( will be replaced by the actual highlight's id).
Note: You can find examples of custom templates under tests/data folder.
Readwise API Token
: Add/update your Readwise API token.Sync on startup
: If enabled, will sync highlights from Readwise when Obsidian startsCustom Header Template Path
: Path to template note that overrides how the note header is writtenCustom Highlight Template Path
: Path to template note that overrides how the highlights are writtenDisable Notifications
: Toggle for pop-up notifications
The plugin will sync from Readwise only the new highlights since the last time it was executed (or since it was installed). The process works as follows:
- Check if there is a file with the same name (it checks for notes in top level of the vault only. Issue #22 tracks expanding support for customizing the location.
- If not, it creates a new file using the template from
Custom Note Header Template
or the default template.
- If not, it creates a new file using the template from
- Read the content of the note, and add the highlights if they are not found. The search for highlight is based on the
highlight_id
from Readwise and not the text of the highlight. The exact match the plugin looks for is of the formhighlight_id: <id>
where is the actual id of the current highlight being rendered.
You can install this plugin from Settings > Community Plugins > Readwise
.
Download zip archive from GitHub releases page. Extract the archive into <vault>/.obsidian/plugins
.
- It can only pull the most recent 1000 highlights from Readwise (should be solved eventually as part of the implementation for this issue: issues/7
This plugin is being tested with Obsidian v0.11.9 and up