mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 09:16:55 +00:00
* feat(cli): let transcribe --to write srt or vtt straight from a media file * fix(cli): fail a missing transcribe --output folder before decoding * fix(cli): reject a transcribe --output that names a folder * test(cli): check CJK caption grouping on the parsed cues * fix(cli): keep transcribe --output from overwriting the media or its transcript - Refuse an --output that resolves to the input file or the transcript.json the run writes, before the engine starts. - When the caption file cannot be written after transcribing, say the transcript was saved and name the caption path and reason, instead of reporting a failed transcription. - Docs: a one-run export groups cues for languages without spaces; exporting the saved transcript later may split them differently. * fix(cli): refuse caption paths that alias the media or transcript - The overwrite check compares files, not path text: an existing target is matched by device and inode, a new one by its real folder and its name ignoring letter case. Links, folder aliases such as /var and /private/var, and other letter case are all refused. - The check also covers the default caption path, so exporting transcript.srt to srt no longer rewrites its own input. - A trailing -o with no path fails before transcribing. - One constant names transcript.json for the engines, the import and the check. * fix(cli): refuse caption links to the transcript before it exists - A caption path that is a link is followed to where the write would land, so a link to the transcript.json the run is about to create is refused before transcribing. - A test pins the folder letter-case check on a case-insensitive disk, and says which branch ran. * fix(cli): check the caption file against the transcript right before writing it - Right before the caption write, by when the transcript exists, a destination that is the same file as the input or transcript.json is refused. The OS resolves every link, relative link and alias, so the hand-written link following is gone. - The run keeps the transcript and says the caption file could not be written and why. An export whose caption write fails now says so too, instead of crashing. - The check before transcribing stays as an early refusal for the common cases. * fix(cli): compare caption paths by name when the disk reports no inode - Some network shares report inode 0 for every file; such a pair is compared by folder and name instead of being called the same file. The check before transcribing and the one at write time now share one comparison. - The link-through-a-file tests accept ENOENT as well as ENOTDIR, the code Windows reports. * fix(cli): resolve both caption paths fully when the disk reports inode 0 - When either file reports inode 0 and both exist, compare their fully resolved real paths, so a link to the media or the transcript is still refused. The folder and name compare stays for a path that does not exist yet. - Tests zero the inode on every path, on the caption path only, or on the protected file only. * test(cli): say plainly why the caption-write test accepts two error codes