Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export bookmarks and annotations #370

Open
rrrnld opened this issue Jul 28, 2024 · 2 comments
Open

Export bookmarks and annotations #370

rrrnld opened this issue Jul 28, 2024 · 2 comments

Comments

@rrrnld
Copy link

rrrnld commented Jul 28, 2024

Is there a way to export bookmarks or annotations? It looks like this should be scriptable, given how all the properties have serde annotations and will be serialized somehow, but I haven't found the files or any docs describing how to find them.

@rrrnld
Copy link
Author

rrrnld commented Jul 29, 2024

I found that this is stored in /.reading-state/$FINGERPRINT.json in a nicely readable JSON format (with full-text excerpts for the annotations). I'm not sure yet if there's an easy way to generate the fingerprint given an epub, which I think is calculated here:

fn fingerprint(&self, epoch: SystemTime) -> io::Result<Fp> {

EDIT They way to go seems to be via /.metadata.json, which contains entries like this, where the topmost property is the fingerprint.

{
  "53514746012C0011": {
    "title": "Ways of Being",
    "author": "James Bridle",
    "year": "2023",
    "language": "en",
    "publisher": "Penguin Books Ltd",
    "file": {
      "path": "Bridle, James/Ways of Being - James Bridle.epub",
      "kind": "epub",
      "size": 19660817
    },
    "added": "2024-04-17 17:43:54"
  }
}

@ABeehive
Copy link

ABeehive commented Jul 31, 2024

Thanks @heyarne!, this gave me the idea to write this script :

https://github.com/ABeehive/PlatoHighlights2Readwise

Which works for me!

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

No branches or pull requests

2 participants