ass_save
Write an Aegisub/ASS subtitle document to disk and report exactly what was written (bytes, hash, encoding, change status). Optionally create a backup and adjust encoding, BOM, or newline.
Instructions
Write a document to disk and report exactly what was written.
Args:
doc_id: document to save; the current one when omitted.
path: destination; the document's known path when omitted.
encoding: encoding override for this write.
bom: force the UTF-8/UTF-16 BOM on/off (None keeps the current one).
newline: "\n" / "\r\n" / "\r" override.
create_backup: copy the previous file to <path>.bak first.
Returns {"doc_id", "path", "bytes_written", "sha256", "changed", "encoding", "has_bom", "newline", "backup"}. changed is true when the
bytes written differ from whatever was on the destination beforehand (a
brand new destination counts as changed); has_bom is derived from the
bytes actually written. Line indices are 0-based.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bom | No | ||
| path | No | ||
| doc_id | No | ||
| newline | No | ||
| encoding | No | ||
| create_backup | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||