Files

44 lines
2.1 KiB
Markdown
Raw Permalink Normal View History

# Patched reclip — source of truth
Our transcription + history additions to [averygan/reclip](https://github.com/averygan/reclip),
kept here so container updates and new machines can't lose them.
- `app.py`, `index.html` — the full patched files (deployed via bind-mounts
from `documents/reclip/` on the Unraid share; see that dir's DEPLOY.md)
- `reclip-transcript.patch` — the same delta as a diff against upstream,
for rebasing onto future upstream versions
Patch base: upstream `1d161d1` (cloned 2026-10-25).
## What the patch adds
1. `fetch_transcript()` — after each download, pull yt-dlp captions
(YouTube subs; X auto-captions) → `<stem>.txt` sidecar, never fails the job
2. `/api/transcript/<job_id>` + Transcript button + auto-save in the UI
3. Persisted download history (`history.json` in the downloads volume) +
`/api/history` + History section with a live transcript-available flag
(manual `yt-transcribe` sidecars are detected at read time)
4. `/api/file` + `/api/transcript` fall back to history, so old links
survive restarts
## Updating reclip (when upstream changes)
git clone --depth 1 https://github.com/averygan/reclip.git /tmp/reclip-new
cd /tmp/reclip-new
git apply --3way ~/Documents/dotfiles/patches/reclip/reclip-transcript.patch
Resolve any conflicts (the additions are mostly self-contained: one new
function, two routes, one status field, UI button + History section), then
copy the updated `app.py` + `templates/index.html`:
- into this directory (commit — new source of truth)
- to the share: `/Volumes/data/documents/reclip/{app.py,index.html}`
- restart the reclip container (gunicorn reloads at start; the entrypoint
also pip-updates yt-dlp at every container start)
If `git apply` fails on a drifted file, the fastest path is re-porting by
hand from the conflict markers — the four additions are small and greppable
(`fetch_transcript`, `history.json`, `resolve_download`, `saveTranscript`).
If an image update happens WITHOUT re-porting: the old patched files keep
working (bind-mounts win), you just may miss upstream improvements.