Skip to content

feat: import digest highlights as Readwise-style markdown#83

Open
mccurdyc wants to merge 1 commit into
philips:mainfrom
mccurdyc:feat/import-digest
Open

feat: import digest highlights as Readwise-style markdown#83
mccurdyc wants to merge 1 commit into
philips:mainfrom
mccurdyc:feat/import-digest

Conversation

@mccurdyc

@mccurdyc mccurdyc commented Jun 21, 2026

Copy link
Copy Markdown

📢 things to highlight with this PR:

1: it's ai-generated.
2: don't feel any obligation to merge (literally zero hard feelings :smiling), i just figured i'd contribute to your upstream incase others would find it useful as SuperNotes' "digest" feature is literally why I purchased the device over other e-ink devices because I saw your plugin existed and assumed it had this functionality and if it didn't i was just going to fork your amazing plugin ❤️

(Thank so much for your amazing work on this plugin! ❤️)

3: if you want, I could record a demo similar to the ones in the README to demonstrate the functionality.

Summary

Add a new "Import digest" command that converts Supernote digest .txt exports into Readwise-style Obsidian markdown files.

image

How to use

  1. On your Supernote, open the Digest app
  2. Select all highlights and export as .txt
  3. In Obsidian, open the command palette and run Import digest
  4. Select your exported digest .txt file

Output folder is configurable in Settings (default: Supernote Digests).

Digest file format

The digest export is a series of blocks, each representing a single highlight. The schema is this block repeated:

[
linkinfo:
  path: file://Document/Books/Non-Fiction/The Origins of Efficiency -- Brian Potter -- 1, 2025 -- Stripe Press -- isbn13 9781953953520.epub
  page: 1
  chapter: 15-0[528-587]
  size: 5555786
identity:
  unique_id: 8e169189632f4a357312d853c2102300
create_time:
  timestamp: 1781640656835
modify_time:
  timestamp: 1781640656835
content:
  they tend to converge on a common form: continuous processes
]

Sorting

The digest output appears to be unsorted, so the plugin sorts highlights by chapter (if it exists -- articles may not have chapters), then page, then modify time.

Confirmed that SuperNote digests are NOT unsorted, but rather sorting is based on page alone (which is often not what you want) this is a limitation of the SuperNote partner app digest sorting functionality.

image

Output format

The output format is inspired by Readwise's Obsidian plugin. One markdown file per book/document:

# The Origins of Efficiency

## Metadata
- Author: [[Brian Potter]]
- Full Title: The Origins of Efficiency
- Year: 2025
- Category: #books

## Highlights
- Children don't dream of growing up to be efficiency experts. (Page 1, Chapter 6)
- This perspective, while perhaps not entirely mistaken, misses the larger picture... (Page 1, Chapter 6)
...

Design decisions

  • Metadata extraction: Title, author, and year are parsed from the ---delimited filename in the path. Category is derived from the directory structure (/Books/#books, /Articles/#articles).
  • Idempotent imports: Re-importing the same digest overwrites existing files. Users are encouraged not to modify the generated files directly but instead link to them and annotate elsewhere.
  • Configurable output folder: Defaults to Supernote Digests, configurable in plugin settings.

Testing

Tested locally via BRAT - Beta Reviewer's Auto-update Tool for Obsidian (GitHub).

I did test overwriting behavior (just edited an imported digest manually to delete the highlights section) then re-imported the digest

Changing the import location / folder name

image

Things I have NOT tested

  • what if you make digest changes on the SuperNote (presumably, it just overwrites everything again, hence why I chose a simple "overwrite" import strategy instead of merges)

  • digests can contain handwritten annotations. I did not test these. I think they just get dropped.

Have a great rest of your day! 👋

@mccurdyc mccurdyc force-pushed the feat/import-digest branch from d1e1099 to b50fb2e Compare June 21, 2026 14:14
Add a new 'Import digest' command that converts Supernote digest
.txt exports into Readwise-style Obsidian markdown files.

- Parse digest blocks extracting title, author, year from path
- Derive category from directory structure (#books, #articles, etc.)
- Group highlights by book, one markdown file per book
- Sort highlights by chapter, then page, then modify time
- Configurable output folder (default: 'Supernote Digests')
- Overwrites existing files on re-import (idempotent)
@mccurdyc mccurdyc force-pushed the feat/import-digest branch from b50fb2e to ddf2e63 Compare June 22, 2026 15:00
@mccurdyc

Copy link
Copy Markdown
Author

Update: Added two improvements since the initial PR:

  1. Read Date metadata — Each generated markdown file now includes a Read Date field derived from the modify_time timestamp of the last (most recent) highlight. This gives a rough "last read" date without any manual input.

  2. Graceful handling of files without -- delimiters — Documents like PDFs in INBOX/ (e.g. RFC8216 - HTTP Live Streaming.pdf) do not follow the Title -- Author -- Year naming convention. The parser now falls back to using the full filename as the title, with author and year omitted from the metadata.

  3. Suppress Chapter 0 — Some documents report all highlights as chapter 0, which is not meaningful. The location now displays only Page N when the chapter number is 0.

Example output for an RFC PDF:

# RFC8216 - HTTP Live Streaming

## Metadata
- Full Title: RFC8216 - HTTP Live Streaming
- Category: #highlights
- Read Date: 2026-06-17

## Highlights
- allows a receiver to adapt the bit rate (Page 3)
- in order to maintain uninterrupted playback at the best possible quality (Page 4)
...

@mccurdyc

Copy link
Copy Markdown
Author

Note on path format variability: The digest file path format varies depending on where the document is stored on the Supernote. Books in organized folders follow a Title -- Author -- Year -- Publisher -- ISBN -- hash -- source.epub convention with -- delimiters, but documents in INBOX/ or other locations (e.g. file://INBOX/RFC8216 - HTTP Live Streaming.pdf) have no -- delimiters at all.

The parser handles this gracefully by falling back to the full filename (minus extension) as the title when fewer than 2 -- segments are found, with author and year omitted from the metadata output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant