Automate Article Downloads on Your Kobo with Pocket and RSS
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
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.
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
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
Comments