Maximize Your Kobo E-Reader: RSS Integration, Calibre-Web, Custom Screensavers, and AI Integration
The man who does not read has no advantage over the man who cannot read
Recently I've switched to an e-reader from physical books and the amount I read has gone up dramatically. It reduces the friction to "be a person that reads".
Mainly since my Kobo Clara HD is so compact I can bring it everywhere in my back pocket and there's always fresh content available. But it has other benefits over physical books as well:
- Space-saving: No more need for a huge physical library. I sold all my physical books except the ones with sentimental value and exceptional illustrations (like The Way Things Work by David Macauley)
- Instant access to any content type on 1 device. Articles, pdf's, books and social media feeds.
- Customization: Adjustable text size, font style, brightness settings (reading in bed without having to turn on a light), dictionaries, translation tools, and the ability to highlight, annotate, and search text
But the stock model has some limitations so I've tweaked (#hackerman) mine to:
- Download articles from blogs I follow to my kobo through pocket
- Connect my kobo clara HD to a synology calibre library using kobo-tailscale
- Integrate Venice.ai to visualize scenes and explain difficult passages.
- Show scenic pictures when in sleep mode
Here's how:
Integrating Kobo, Pocket and RSS
Auto-Pocket
Kobo allows to connect your Pocket account which enables you to send any "saved" article to your e-reader with their browser extension.
To automate this, I've used "Auto-Pocket". It's a python script you can configure that will check for new articles on your listed RSS feeds and add them to pocket over their API.
You just have to update the Auto-Pocket.config
file to include your sources and schedule it inside a hourly/daily cron job.
[General]
Auto-Pocket-Tag = Auto-Pocket # The main tag used to identify Auto-Pocket content
cli_tag = RSS_FEED # Tag to be given to articles uploaded via command line
cli_delete_after = 7 # Delete cli uploaded articles older than 7 days
[Lyn Alden]
url = https://www.lynalden.com/feed/
delete_after = 7
days_to_add = 30
tag = article
Converting pocket images
A problem I've noticed however is that not all article images show up equally well:
To fix this, there's a shell script we can add that will automatically fix the missing images (convert to JPG). This trick I've learned from this thread; https://www.mobileread.com/forums/showthread.php?t=347036&page=2.
First, you'll have to install Nickel Menu , which allows you to add custom buttons in the Kobo UI.
Then you'll have to extract this config folder inside the .adds
directory on your Kobo. This will add the conversion script and the Nickel Menu config.
When you restart your Kobo, it should look something like this. You can start the image converting process in the background and check the status as well:
And when it's finished, you'll see that the missing article images have been fixed:
Connect kobo to a (synology) calibre-web library
On my synology NAS, I have an instance of both Calibre and Calibre-web running. I've used Kobo Tailscale to install tailscale on my Kobo Clara HD so it connects over VPN to my synology and syncs a shelf from calibre-web to my Kobo.
You could also just use a reverse-proxy (through cloudflare) to expose a public endpoint for this.
calibre:
image: ghcr.io/linuxserver/calibre
container_name: calibre
environment:
- PUID=XXXX
- PGID=XXXX
- TZ=Europe/Amsterdam
volumes:
- ./config:/config
- ./uploads:/uploads
- ./plugins:/plugins
- ./CalibreLibrary:/config/Calibre_Library
ports:
- 8080:8080
- 8081:8081
restart: unless-stopped
network_mode: host
calibre-web:
image: ghcr.io/linuxserver/calibre-web
container_name: calibre-web
environment:
- PUID=XXXX
- PGID=XXXX
- TZ=Europe/Amsterdam
volumes:
- ./calibre-web:/config
- ./CalibreLibrary:/books
restart: unless-stopped
depends_on:
- calibre
ports:
- 8083:8083
network_mode: host
Problems I've run into/figured out:
- Not enough space on device when installing kobo-tailscale: don't copy over as zip-file and try to extract. But copy over the binaries/iptables with
wget
andnpx http-server
(https://www.npmjs.com/package/http-server) - Sync failing between kobo and calibre-web. Ensure:
- Port and literal api (not magic DNS) is added correctly after the api_endpoint (
http://IP:8083/kobo/API_KEY
) in theKOBOeReader/.kobo/Kobo/Kobo eReader.conf
- Force full kobo-sync in calibre-web settings
- Check logs
/admin/logfile
to see what is being received by calibre-web
- Port and literal api (not magic DNS) is added correctly after the api_endpoint (
- Calibre-web not tracking pages/annotations: For this, I installed the calibre Kepub Output plugin and converted all my books to KEPUB format. And force-synced the library again
Integrating AI with Kobo
To upgrade the immersion/utillity of your kobo e-reader you could also use an API endpoint from openapi or venice ai to add additional functionality.
I've added the abillity to "explain like i'm 5". Basically to highlight a part of text and simplify it through AI.
First, you'll have to install the Kobostuff firmware package. This will install utils like curl
and jq
on your ereader which is needed for network calls and json parsing.
Then, through nickelmenu you can easily add some additional menu items to the selection menu:
# Generate an image from a prompt
menu_item :selection :Visualize :cmd_output :9000:quiet:/usr/bin/curl -s -X POST --url https://api.venice.ai/api/v1/image/generate --header 'Authorization: Bearer API_KEY' --header 'Content-Type: application/json' --data '{ "model": "fluently-xl", "prompt": "{1|aS|%}, masterpiece", "negative_prompt": "disfigured, ugly, blurry, watermark", "steps": 10, "width": 680, "height": 1024}' | jq -r '.images[0]' | base64 -d > /mnt/onboard/sd.png
chain_success :nickel_browser :modal:file:///mnt/onboard/sd.html
# Open browser
menu_item :selection :Open Visualizer :nickel_browser :modal:file:///mnt/onboard/sd.html
# Explain a passage in simpler language
menu_item :selection :ELI5 :nickel_wifi :enable
chain_success :nickel_wifi :autoconnect
chain_success :cmd_output :9999 :quiet :sleep 2 # to allow connection to be established
chain_success :cmd_output :9999 :/usr/bin/curl -s -X POST --url https://api.venice.ai/api/v1/chat/completions --header 'Authorization: Bearer API_KEY' --header 'Content-Type: application/json' --data '{ "model": "dolphin-2.9.2-qwen2-72b", "messages": [{"role": "system","content": "Explain in simpler language the following passage from a book I am reading: \n {1|aS|"$} "} ], "max_completion_tokens": 80, "venice_parameters": {"include_venice_system_prompt": false }}' | /usr/bin/jq -r '.choices[0].message.content' | fold -w 50 -s
This looks like this;
ELI5
This is the simplest one, it just send the highlighted text with the prompt: Explain in simpler language the following passage from a book I am reading: \n {1|aS|"$} "
. And returns the answer. It helps to explain difficult passages/concepts.
Visualizing
The next one I use when reading non-fiction and I want to immerse myself more deeply in the story. Books usually contain very in-depth descriptions of monsters, landscapes, people. AI is then great to visualize these. For example:
For this you do have to add a "sd.html" file in the root of your kobo (next to the .kobo folder).
Add the following markup to it. Since nickel menu can't open images directly we basically download the generated images on the devices and open it in a web-page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
.container {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.container img {
width: 100%;
height: 100%;
object-fit: cover;
}
</style>
</head>
<body>
<div class="container">
<img src="file:///mnt/onboard/sd.png">
</div>
</body>
</html>
Custom screensavers
This is pretty simple. Find some nice-looking and dreamy pictures on pinterest and resize them to fit your kobo device resolution.
Then just move those pictures to a folder called screensaver
. Now, everytime your kobo goes to sleep it shows a nice-looking image instead of boring books covers;
Conclusion
Switching from books and smartphones to a single-use device for consuming written content feels like an upgrade.
It enables a more thoughtful way to consume content vs the always-on social media snippets the world is starting to resent.
It's a pull-based system where you first select the signal (people, blogs, news outlets, books) and pull the content from those sources (downloading, streaming, storing) onto your own device. As opposed to going to their platforms and getting caught in a frenetic attention maximizing algorithm.
Sources
- https://code.mendhak.com/kobo-customizations/
- https://github.com/flying-sausages/ebookscripts
- https://www.mobileread.com/forums/showthread.php?t=314220
- https://github.com/janeczku/calibre-web
- https://www.mobileread.com/forums/showthread.php?t=336175
- https://www.mobileread.com/forums/showthread.php?t=347036&page=2
- https://code.mendhak.com/kobo-text-to-images-with-stable-diffusion/#limitations-and-other-notes
Comments