2 Commits
Author SHA1 Message Date
Scott GarrettandClaude Code 51112947fb Build sup2vob into the app bundle so it ships and stays fresh
A "Build sup2vob CLI" run-script phase on the Subler target runs the
submodule's Makefile (incremental — a no-op unless the conversion
sources changed) and installs the product to Contents/MacOS/sup2vob.
Every Subler build refreshes the CLI; a terminal sup2vob can be a
symlink into the bundle instead of a copied `make install`.

extractsubs finds that bundle-internal sup2vob automatically: PATH
first, then the script's own ../MacOS/sup2vob sibling, so running the
copy inside Subler.app/Contents/Resources works with no install at all
(verified with sup2vob absent from PATH: same 1920x1080 .sub/.idx).

The phase walks the source tree, so it opts the Subler target out of
ENABLE_USER_SCRIPT_SANDBOXING — a build-time shell-script file-access
setting only, no effect on the app's runtime security posture.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-28 23:25:40 -05:00
Scott GarrettandClaude Code c08d607baa Ship the extractsubs subtitle-extraction helper with the app
extractsubs pulls the subtitle tracks out of mkv/mp4 files with ffmpeg
stream copy — .srt/.ass/.ssa/.vtt text, .sup for PGS (then converted to
.sub/.idx with sup2vob --full) — defaulting to English tracks, --all for
every language. Output names follow the shape the app's importers probe
(<input>.<track>[.<type>].<lang>.<ext>), so extracted files drag back
into Subler already named and tagged.

The script lives in Utilities/ beside ParseFilename and is copied into
the app bundle's Resources by the build (like ParseFilename, but nothing
in the app invokes it — it's for terminal use). Dependencies are checked
up front (ffprobe/ffmpeg/sup2vob on PATH; mkvtoolnix plus python3 only
for the S_TEXT/WEBVTT rescue path).

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-28 22:58:27 -05:00