Skip to content

Latest commit

 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moonwise

How do you get book highlights out of MoonReader without Readwise?

It turns out you can use MoonReader's real-time Readwise sync feature with any url, so you can just point it to an endpoint you control. See @ynhhoJ's helpful setup guide.

If you want to get old highlights out of a MoonReader backups this is how I'm doing so.

Get the backup file ending in .mrstd or .mrpro and unzip it. The unzipped com.flyersoft.moonreader folder contains a bunch of numbered .tag files (1.tag, 2.tag, ...) whose human-readable file names are in the corresponding line of _names.list. The file with the main sqlite3 database is mrbooks.db. So, we can open with:

sqlite3 $(awk '/mrbooks.db$/ {print FNR".tag"}' _names.list)

You'll notice the db has several tables and that your highlights are in notes. import.py has an example script.

The rest of this repo is a simple "vibe coded" flask site for managing my own highlights. Live (with limited functionality if not logged in) here.

Setup

  1. Create and .env file with variables:
PASSWORD=
SESSION_SECRET=
MOON_READER_TOKEN=
N_REVIEW_PASSAGES=
N_FAVORITES_IN_REVIEW=
  1. Run uv run --env-file .env main.py
  2. Optionally, setup cron job to run review.py. For example:
0 13 * * * cd ~/moonwise && uv run review.py && sh notify.sh

If you ever drop the highlights_fts table, re-populate it with:

INSERT INTO highlights_fts(rowid, highlight_text, note)
SELECT id, highlight_text, note FROM highlights;

About

Sync highlights from MoonReader without Readwise

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages