e-alizadeh / Zotero2Readwise

A Python Library to retrieve annotations and notes from Zotero and upload them to your Readwise.
MIT License
131 stars 24 forks source link

Integrate with Zotfile #45

Open folofjc opened 1 year ago

folofjc commented 1 year ago

I know that it specifically states that this is meant for using the zotero reader.

However, I read on my tablet and then use the zotfile integration to pull back into zotero. In this case, zotfile extracts the annotations from the file and adds them as notes as well as making an "*_annotated.pdf" version of the file.

Would be great if this could pull those highlights as well.

folofjc commented 1 year ago

Zotfile pulls the highlights out and puts them in a note that is titled "Extracted Annotations." So instead of just pulling annotations from here, would need to pull itemType="note". Then would just need to parse the data.note, link to parentItem with the annotation, and maybe take out some of the HTML formatting. Each highlight begins with a <p> and ends with </p>\n.

e-alizadeh commented 1 year ago

@folofjc The functionretrieve_all_notes() here retrieves notes with itemType="note". Does that help?

folofjc commented 1 year ago

I saw that too, but I am have not looked into why those notes are not being pushed to Readwise. I have not had time to look into how the notes are formatted before being sent.