Files

152 lines
5.6 KiB
Markdown
Raw Permalink Normal View History

2026-01-17 23:47:52 +13:00
<div align="center">
<h4>Your subtitles deserve metadata. Sublogue adds it.</h4>
</div>
2026-01-17 23:01:41 +13:00
2026-04-18 07:51:16 +12:00
Sublogue is a lightweight private tool for enriching SRT files. Pull metadata from OMDb, TMDb, or TVMaze and automatically append plot summaries, runtimes, directors, and cast details to the start or end of your subtitles.
2026-01-17 23:01:41 +13:00
2026-04-18 07:51:16 +12:00
Additionally, Sublogue can clean junk out of your subtitles automatically or on demand.
2026-01-19 02:35:37 +13:00
2026-01-18 02:03:45 +13:00
Why? Because if the cast list and IMDb/RT rating show up in the first minute, my wife asks fewer questions and we actually get to watch the movie.
2026-01-18 00:13:29 +13:00
2026-01-18 01:49:34 +13:00
## Features
2026-01-18 01:53:58 +13:00
- Insert plot summaries into existing .srt files without shifting timings
2026-01-19 00:33:07 +13:00
- Fetch metadata (plot, runtime, director, cast, IMDb/RT ratings) using OMDb, TMDb, TVMaze and Wikipedia - add these integrations under Settings before scanning
2026-01-27 10:49:12 +13:00
- Automatically strips OCR junk, music-only lines, timecodes, and other subtitle noise for a cleaner, more readable SRT.
- Preserve original dialogue and timing with safe insertion logic while cleaning watermarks (YTS, OpenSubtitles, etc.)
- Automation rules can run cleanup-only mode on schedules, or combined cleanup + metadata enrichment
- Folder Rules to have seperate logic for different folders (for example TV shows could have runtime but not actors, etc)
- Clean, fast web UI for scanning and batch processing built with Svelte (frontend) + Python/Flask (server)
2026-01-18 01:53:58 +13:00
- Three themes included: OLED, Ocean, and Dracula White
2026-01-18 00:20:02 +13:00
2026-01-17 23:47:52 +13:00
## Getting started
2026-04-18 07:51:16 +12:00
All top-level documentation and runtime logs are kept in the repository root:
2026-01-21 09:38:48 +13:00
2026-04-18 07:51:16 +12:00
- `AGENT.md` for setup and operating notes
- `docker-compose.yml` for a direct local deployment
- `docker-compose.proxy.yml` for deployments behind Nginx Proxy Manager
- `sublogue.log` for runtime logging after the server starts
2026-04-18 07:51:16 +12:00
**Quick start with Docker:**
2026-01-19 02:25:53 +13:00
```sh
2026-04-18 07:51:16 +12:00
docker build -t sublogue:local .
2026-01-19 02:25:53 +13:00
docker run -d \
--name sublogue \
-p 5050:5000 \
-v /path/to/config:/config \
-v /path/to/media:/media \
2026-04-18 07:51:16 +12:00
sublogue:local
2026-01-19 02:25:53 +13:00
```
2026-04-18 07:51:16 +12:00
**Installation methods**
2026-01-19 02:26:54 +13:00
2026-01-18 00:07:41 +13:00
<details>
<summary>⚓ Docker Compose</summary>
2026-01-17 23:05:02 +13:00
Create `data/` and `media/` folders next to the compose file, then run:
```yaml
version: "3.9"
services:
sublogue:
2026-04-18 07:51:16 +12:00
build:
context: .
image: sublogue:local
2026-01-17 23:05:02 +13:00
container_name: sublogue
restart: unless-stopped
environment:
- TZ=Pacific/Auckland
2026-01-17 23:05:02 +13:00
volumes:
- ./data:/config
- ./media:/media
ports:
- "5000:5000"
```
2026-01-17 23:47:52 +13:00
Start the stack:
2026-01-17 23:05:02 +13:00
```bash
2026-04-18 07:51:16 +12:00
docker compose up -d --build
2026-01-17 23:05:02 +13:00
```
2026-01-17 23:47:52 +13:00
Open `http://localhost:5000`.
2026-01-18 00:07:41 +13:00
</details>
2026-01-17 23:10:36 +13:00
2026-01-18 00:05:44 +13:00
<details>
<summary>🦎 Komodo</summary>
2026-01-17 23:10:36 +13:00
2026-01-17 23:47:52 +13:00
Create a new stack and paste a Komodo template like this:
2026-01-17 23:10:36 +13:00
```yaml
version: "3.9"
services:
2026-01-17 23:47:52 +13:00
sublogue:
2026-04-18 07:51:16 +12:00
build:
context: .
image: sublogue:local
2026-01-17 23:10:36 +13:00
container_name: sublogue
ports:
2026-01-17 23:47:52 +13:00
- "5000:5000"
2026-01-17 23:10:36 +13:00
environment:
2026-01-17 23:47:52 +13:00
- TZ=Etc/UTC
- PUID=1000
- PGID=1000
2026-01-17 23:10:36 +13:00
volumes:
2026-01-17 23:47:52 +13:00
- /volume1/Docker/sublogue/data:/config
- /volume1/Media:/media
2026-01-17 23:10:36 +13:00
restart: unless-stopped
networks:
- npm_network
networks:
npm_network:
external: true
```
2026-01-18 00:05:44 +13:00
</details>
2026-01-18 00:09:02 +13:00
2026-01-19 02:29:18 +13:00
## Timing And Insertion Logic
Sublogue never shifts existing subtitle timing. It only inserts metadata blocks into safe gaps.
| Decision | What Sublogue checks | Outcome |
| --- | --- | --- |
| Find insertion gap (start) | Time before the first dialogue subtitle (minus a 500ms safety buffer) | Uses that gap for intro blocks |
| Find insertion gap (end) | Time after the last dialogue subtitle (plus a 500ms safety buffer) | Uses that gap for outro blocks |
| Insufficient gap | No space to fit the intro/outro blocks | Skips insertion and reports “Insufficient Gap” |
| Reading speed | Word count vs a 160 WPM target (min 1.2s, max 6.0s per block) | Splits plot into readable blocks |
| Existing Sublogue blocks | Looks for `{SUBLOGUE}` markers or legacy signatures | Removes old blocks before inserting new ones |
2026-01-19 00:33:52 +13:00
## Integrations
| Provider | Signup / API key | Rate limits (see provider for current limits) | Notes |
| --- | --- | --- | --- |
| OMDb | https://www.omdbapi.com/apikey.aspx | Free tier has a daily cap 1000 | Requires API key |
| TMDb | https://www.themoviedb.org/settings/api | Per-second rate limit | Requires API key |
| TVmaze | https://www.tvmaze.com/api | Polite usage limits | No API key required |
| Wikipedia | https://www.mediawiki.org/wiki/API:Main_page | No hard limits, be polite | No API key required; strict title matching |
## Limitations
- API rate limits: OMDb is tight, TMDb is better, TVMaze is polite-but-limited. Heavy scans may hit caps.
- Metadata gaps: If providers dont have it, Sublogue wont either. Ratings/plots can be missing or stale.
- Localisation: Only TMDb supports proper language/region data. OMDb/TVMaze are mostly English-only.
- Long plots: Big summaries go in as-is. Your TV may split them across multiple screens.
- Formats: Only .srt is supported. No WebVTT, ASS/SSA, or embedded subs yet.
2026-04-18 07:51:16 +12:00
- Duplicate inserts: Reprocessing the same file may stack multiple plot blocks.
- Offline use: Requires internet for metadata lookups — no offline mode.
- File access: Read-only or locked files cannot be processed.
2026-01-18 22:31:23 +13:00
## Roadmap
2026-01-18 22:32:45 +13:00
- [x] TVMaze integration
- [ ] More UI themes (OLED variants, Ocean+, and high-contrast)
- [ ] Poster + backdrop previews in results
- [ ] Smart duplicate-detection (dont re-insert plot blocks)
- [ ] Automatic rate-limit backoff + retry logic
- [ ] Optional “short plot mode” for long summaries
- [ ] Expanded localisation using TMDb (title, plot, cast where available)
- [ ] Multi-format subtitle support (WebVTT, ASS/SSA)
- [ ] Offline caching of recent metadata lookups
- [ ] Per-scan analytics: success/fail counts, rate-limit warnings
- [ ] CLI mode for batch operations