TL;DR check out <https://github.com/vale981/kindle_fetch>.
I "recently" treated myself to a Kindle Scribe e-ink tablet which is
somewhat like a ReMarkable[^fn:1] but on the cheap. There is no free
lunch however, and price you pay is a somewhat sub-par software. One
quite essential missing feature is convenient synchronization with
other devices. As I use the tablet mainly for calculations, I rely on
having the previous pages available at a glance (just as they would be
if I were using paper). Furthermore, I would like to integrate the
handwritten notes into my [org-roam](https://www.orgroam.com/) note taking system.
One solution would be to jailbreak the kindle, ssh into it and
automatically download a notebook when it changes. The conversion to
PDF could then be handled by the [Calibre KFX input plugin](https://www.mobileread.com/forums/showthread.php?t=291290). However,
that ship has sailed for me as the firmware on my Kindle is too new.
This led me to come up with the following [bodge](https://www.youtube.com/watch?v=lIFE7h3m40U). Amazon offers a
service that converts a notebook to PDF and sends it to your email
upon request and this we can exploit to our heart's content. I wrote a
[script](https://github.com/vale981/kindle_fetch) which monitors your email inbox via IMAP[^fn:2] using [aioimaplib](https://github.com/bamthomas/aioimaplib)
and detects incoming emails from Amazon containing download links for
the exported notebooks. Once such an email is detected, the associated
PDF is downloaded into a directory on the local file system
(`~/kindle_dump` on my machine). The name is inferred from the contents
of the email, although at the moment this doesn't include any hint
about which folder in the directory structure on the Kindle it came
from. The email is then conveniently deleted so as to not clutter your
inbox[^fn:3].
Additionally, the latest downloaded PDF is copied into to a file of
your choice (`~/kindle_dump/.latest` in my case). I then run `zathura
~/kindle_dump/.latest` which displays that PDF on my large 4K monitor
and auto refreshes each time a new Kindle email comes in. I also
configured Zathura to show four pages per row (`set pages-per-row 4`) so
that I can see eight pages at a glance (see figure below).
{{<figuresrc="/ox-hugo/screen:d22fec54-83c6-4cc6-a701-c29270868804.png"caption="<span class=\"figure-number\">Figure 1: </span>An example of what my ugly handwriting looks like :),">}}