Readwise

readwise allow tagging highlights btw, pretty sure something cool can be done with obsidian tags + readwise tags

Thanks for providing.
Struggled with the plugin but created a Python script off your code to sync with my vault!
Still needs a lot of work but you helped with the difficult bit.

Np. I pushed the thing a bit further with deep learning + Readwise:


(NLP embeddings + k-nn to find similarity in quotes) but that’s going off-topic a bit :stuck_out_tongue:

Unfortunately I noticed data from Readwise API is broken, (sometime you have some date in author etc.) maybe they’ll fix, idk.

1 Like

Interesting idea, I was going to go through my tags list and look for matching words in the highlight and hashtag the book note.

I also noticed Readwise gives you all the books in your Amazon kindle regardless. So I put a status on each book note to tell me if I have read it or not (based on if there are highlights or not)

I am hoping I can use block reference on these status and generate a book tracker note to create a status of all the books in my kindle.

you should just use Goodreads for that

Hi folks - I’ve created a Python script to fetch new books and highlights, and convert the results into markdown files in a chosen directory (i.e. Obsidian vault)

I wanted something a bit more advanced than the simple markdown export (beta) currently offered. The script:

  • Fetches all or a subset of new books and highlights from Readwise - ability to filter by a custom date from or use the last script run date
  • Groups and sorts highlights by book/article/podcast/tweet
  • Creates new markdown notes or appends data to existing ones - includes headings (h1-h5), tags, and unique Readwise highlight IDs as block references
  • Stores book and highlight data into JSON files for easy retrieval and manipulation
  • Prints the script outputs to the console and stores them in a log file for review and troubleshooting

Disclaimer: This is my first time coding in Python, and is NOT an official plugin, so please use mindfully. It’s also my first real contribution on GitHub, so I’m open to any and all feedback :angel:

Hope you enjoy, and Happy New Year! :fireworks:

Nic

4 Likes

Really nice bit of code, I am going to try and give it a go. Just as a quick FYI for posting public repos… Make sure to add your .pyc folder on the git ignore list otherwise, we can see some of the data in your code that you might not want visible…
such as your email : Ni**.ri***[email protected] and password : Ho****o*d*5Z… I stared those out of kindness, others might not be so gentle :sweat_smile: . Also I can see your access token in that file :sweat_smile:

I thought I wanted this integration too, but I’ve setup a markdown template in Readwise that plays really well with Obsidian. Now all I do is export every Wednesday and Sunday and move the items to a sources directory. It takes 1 minute.

I’ve found that there is a benefit to the intentional and manual process of putting my source notes into Obsidian.

2 Likes

Oh my! Thank you so much for letting me know… :raised_hands:

I’ve removed the pycache folder and added a .gitignore file - could you let me know if you’re still able to see any of my credentials when accessing the code?

1 Like

I have found the exact same thing. The Template in Readwise is actually really easy to set up and you can even automatically set up backlinks for categories by just embedding the [[]] around the variables.

And Like you said, because you have to manually process the highlights, it’s forces me to properly document and store the note into my vault.

2 Likes

Good job, can’t see it now :slight_smile: I would change your password if I were you though, I know people who scrape github for pycache folders for that exact data :sweat_smile:.

Good work on your first repo though! Looks good and your readme is comprehensive. If you are looking to use this as a portfolio piece I would add some unit tests to it to make it more serious :slight_smile:

1 Like

I appreciate the feedback, and will look into both suggestions! Thank you.

Great that you’re both finding benefit in being more intentional with your Readwise-to-Markdown process :ok_hand:

1 Like

Great work much better than my Python script.
I run the python script when I login into my Mac using Automator.
I download them into a Readwise folder within my Vault.

I still create a note for my thoughts on the books and link them to the highlights that I have downloaded.

Any chance you can share the template?

Any chance you can share your template?

Hey, just wanted to say thank you for putting this together! I forked your repo for my own purposes and automated its execution so that it runs every hour. It works really well, and I now have Readwise highlights automatically appearing in my vault! Thanks again!
If you’re interested, I wrote about my setup here.

3 Likes

that’s awesome! thanks for sharing

2 Likes

Thank you @nvanderhoeven, I’m glad to hear you’re enjoying this!

I’m working on the next script which will PUT (“Update”) existing highlights from directory to Readwise, and eventually the full POST (“Create”) new highlights from directory to Readwise.

2 Likes

Good day, do you have possibility to share your template for this? Thanks!

I have opened a PR ((Add new obsidian-readwise plugin by renehernandez · Pull Request #236 · obsidianmd/obsidian-releases · GitHub)) to add a new Readwise Plugin (GitHub - renehernandez/obsidian-readwise).

This will allow to sync you Readwise highlights directly within obsidian

5 Likes