ass_add_attachment
Attach a font or image file to an ASS subtitle document as a base64-encoded attachment, with optional name and document ID.
Instructions
Attach a file to the document, base64-encoded, like Aegisub's attach menu.
Args:
path: file to attach (read from disk; the only filesystem input of this
module besides the workspace itself).
doc_id: document id or None for the current document.
name: name stored in the document; defaults to the file's basename.
kind: "font" or "image"; inferred from the magic bytes, falling
back to the file extension, when omitted.
Returns:
{"doc_id", "name", "kind", "section", "path", "bytes", "base64_lines", "sniff", "replaced"}. An attachment with the same
name in the same section is replaced (replaced is True).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| name | No | ||
| path | Yes | ||
| doc_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||