ass_import_srt
Import SubRip (.srt) subtitles as new ASS lines for Aegisub documents, handling decimal separators, multi-line blocks, encoding, and optional time offsets.
Instructions
Import a SubRip (.srt) file as new ASS lines.
Handles , and . decimal separators, multi-line blocks, CRLF and a
UTF-8 BOM; multi-line subtitle bodies become \N hard breaks.
Args:
path: the .srt file to read.
doc_id: document to append to; the current one when omitted.
style: ASS style for the imported lines.
offset_ms: shift every imported line in time.
Returns {"doc_id", "path", "count", "indices": [<0-based indices>], "lines": [<dict>], "skipped": <blocks without a timestamp>, "style", "offset_ms"}. Snapshot-backed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| style | No | Default | |
| doc_id | No | ||
| offset_ms | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||