A number of Lua modules are included with Aegisub. Some of these, such as Karaskel implement subtitle-specific functionality, while others such as Re fill holes in the Lua standard library.
Simply write modulename = require 'aegisub.modulename'
at the top level of a script.
For example, to include the Re modules, re = require 'aegisub.re'
.
Note that if you look at older scripts you will probably see several other methods for including modules, such as include
.
These have been deprecated in favor of following the modern lua module style introduced with Lua 5.2.
To use modules in Karaoke Templater, place the require statement in a code once line.
Note that karaskel.lua
, utils.lua
and unicode.lua
do not have to be require
d in Karaoke Templater, as they are automatically imported.
Overview: | Automation Manager • Running macros • Using export filters • Standard macros |
---|---|
Karaoke Templater reference: | Declaring
templates • Execution
order • Modifiers • Inline-variables ($-variables)
Code lines and blocks • Execution envirionment |
Lua API reference: | Registration • Subtitles object • Progress reporting • Dialogs • Misc. APIs |
Lua Modules: | karaskel.lua • util • unicode • cleantags.lua • clipboard • re |
Karaskel concepts: | Style tables • Dialogue line tables • Syllable tables • Inline effects • Furigana |