I’ve been using Trakt.tv to track my movies and TV shows for years. It’s great for automatic scrobbling and keeping a history, but I wanted something more personal—a way to see my media library in plain text that I could manage alongside my other notes in Emacs.
So I built a simple Python script to convert my Trakt export into org-mode tables.
The Problem
Trakt is excellent at what it does, but:
- It’s a web app—I can’t access it offline or integrate it with my local workflow
- I wanted to see at a glance which shows I’ve dropped vs. which are still airing
- My watchlist was separate from my watch history, making it hard to see everything in one place
The Solution
The converter pulls data from a Trakt JSON export and generates clean org-mode files:
| Name | IMDB | Last Episode | Progress | Status |
|--------------+------+--------------+----------+----------|
| Breaking Bad | IMDB | S05E16 | 62/62 | Complete |
| Black Mirror | IMDB | S06E01 | 22/32 | Watching |
| 30 Rock | IMDB | S04E22 | 80/138 | Dropped |
| Severance | IMDB | S00E00 | | Watchlist|
The status column is the key feature. By fetching episode counts from TMDB, the script can tell me:
- Complete: I’ve watched everything
- Watching: Show is still airing, I’m caught up or working through it
- Dropped: The show ended but I never finished it
- Watchlist: Haven’t started yet
Movies get a simpler treatment—just title, IMDB link, last watched date, and whether it’s watched or on my watchlist.
Technical Details
The stack is minimal:
- Python with
httpxfor API calls python-dotenvfor config- TMDB API for episode counts (free tier, responses cached locally)
The whole thing runs with uv run convert.py and generates three files: movies.org, shows.org, and collection.org.
One nice touch: personal Trakt lists automatically exclude items that appear in the main files, so there’s no duplication.
What’s Next
For now, this is a one-way export. The org files are my read-only reference. But org-mode tables are easy to edit, so I could potentially:
- Add a “Notes” column for my thoughts on each show
- Use org-agenda to surface shows I should pick back up
- Build a simple sync back to Trakt (someday, maybe)
The code is straightforward—about 400 lines of Python. Sometimes the best tool is the one you build yourself.
The project is available on my https://forgejo.mayer.rocks/public/trakt-to-org Feel free to adapt it for your own Trakt exports.