Skip to content
This repository was archived by the owner on Jan 11, 2026. It is now read-only.

Conversation

@CodeBySladman
Copy link

BREAKING CHANGE: Requires Python server for highlight extraction

Problem

reMarkable firmware 3.0+ changed from .highlights/*.json files to storing text highlights as GlyphRange objects inside binary .rm files. The existing code couldn't extract highlights from modern reMarkable tablets.

Solution

  • Add Python API using rmscene library to parse v6 .rm binary files
  • Update highlights API to download .rm files and send to Python for parsing
  • Fix reMarkable cloud API endpoints that had changed
  • Update to use rmapi-js library for cloud API interactions

Changes

  • pages/api/highlights.ts: Rewritten to download .rm files and call Python API
  • pages/api/files.ts: Updated to use rmapi-js library
  • pages/api/register.ts: Fixed API endpoint URL
  • pages/api/refresh-token.ts: Fixed API endpoint URL
  • pages/index.tsx: Simplified to work with new rmapi-js
  • api/parse-highlights.py: NEW - Vercel serverless Python function
  • python-server.py: NEW - Local development Flask server
  • requirements.txt: Added rmscene>=0.5.0 and flask>=2.0.0
  • README.md: Updated with Python setup instructions

Local Development

For local development, run the Python server alongside Next.js:
python3 -m venv venv && source venv/bin/activate
pip install rmscene flask
python python-server.py # Terminal 1
npm run dev # Terminal 2

BREAKING CHANGE: Requires Python server for highlight extraction

## Problem
reMarkable firmware 3.0+ changed from .highlights/*.json files to storing
text highlights as GlyphRange objects inside binary .rm files. The existing
code couldn't extract highlights from modern reMarkable tablets.

## Solution
- Add Python API using rmscene library to parse v6 .rm binary files
- Update highlights API to download .rm files and send to Python for parsing
- Fix reMarkable cloud API endpoints that had changed
- Update to use rmapi-js library for cloud API interactions

## Changes
- pages/api/highlights.ts: Rewritten to download .rm files and call Python API
- pages/api/files.ts: Updated to use rmapi-js library
- pages/api/register.ts: Fixed API endpoint URL
- pages/api/refresh-token.ts: Fixed API endpoint URL
- pages/index.tsx: Simplified to work with new rmapi-js
- api/parse-highlights.py: NEW - Vercel serverless Python function
- python-server.py: NEW - Local development Flask server
- requirements.txt: Added rmscene>=0.5.0 and flask>=2.0.0
- README.md: Updated with Python setup instructions

## Local Development
For local development, run the Python server alongside Next.js:
  python3 -m venv venv && source venv/bin/activate
  pip install rmscene flask
  python python-server.py  # Terminal 1
  npm run dev              # Terminal 2
@CodeBySladman
Copy link
Author

Managed to get it working again for myself - so wanted to share the solution I found with the community

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant