1.5 KiB
1.5 KiB
Extracting notes from Kobo Aura One
I use HPI to extract annotations fro my Kobo Aura One. It's a 7" e-reader device that supports epubs, and the Overdrive library checkout system, and the sync system is more open to sideloaded documents than Amazon's devices.
- name: kobuddy cloned
git:
dest: ~/Code/kobuddy
repo: https://github.com/karlicoss/kobuddy
become: yes
become_user: "{{local_account}}"
tags:
- hpi
- name: kobuddy installed to hpi venv
shell:
cmd: ~/Code/hpi/env/bin/pip install -e .
chdir: ~/Code/kobuddy/
creates: ~/Code/hpi/env/bin/kobuddy
become: yes
become_user: "{{local_account}}"
tags:
- hpi
(pyvenv-activate "~/Code/hpi/env/")
mkdir -p ~/sync/kobo/
kobuddy backup ~/sync/kobo/
import my.kobo as kobo
res = ""
for bwh in kobo.get_books_with_highlights():
res += "* {} by {}\n".format(bwh.book.title, bwh.book.author)
for hl in bwh.highlights:
res += "** {}\n".format(hl.text)
return res