forked from mia/Aegisub
91d73ec8ea
1. cd aegisub/ 2. svn mv *cpp *h src/ 3. svn mv Makefile.am MatroskaParser.c auto4_perldata.inc bitmaps boost \ changelog.txt config gl include libosxutil libresrc md5.c msvc mythes.cxx \ mythes.hxx res.rc src/ 4. cd .. 5. svn mv FFmpegSource2/ INSTALL Makefile.am README acinclude.m4 \ autogen.sh automation/ bin build configure.in desktop dummy.txt lib \ libass/ m4macros/ packages/ po/ scripts/ universalchardet/ aegisub/ 6. mkdir -p docs/wiki_convert 7. svn add docs/wiki_convert 8. cd docs 9. svn mv aegisub_convert_docs.pl convert.bat output wiki_convert/ * See r2749 for full description. Originally committed to SVN as r2752.
33 lines
1.6 KiB
Lua
33 lines
1.6 KiB
Lua
-- Aegisub Automation demonstration script
|
|
-- Original written by Niels Martin Hansen
|
|
-- Given into the public domain
|
|
|
|
-- Comment lines (like this line) start with two hyphens, these are ignored when the script is interpreted.
|
|
-- This script does not do anything useful, it merely displays a message. Think of it as a kind of "hello world" script.
|
|
|
|
-- The following lines define some values identifying the script
|
|
-- This script is written for Automation version 3
|
|
version = 3
|
|
-- And it's a "basic ass" processing script. There are no other kinds of scripts though... but this is still required.
|
|
kind = "basic_ass"
|
|
-- This is the name of the script that shows up in Aegisub
|
|
name = "Minimal demonstration"
|
|
-- This is a longer description of the script
|
|
description = "A very minimal demonstration of the strucrure of an Automation script."
|
|
-- This defines any configuration that can be done of the script. This is demonstrated in demo 5.
|
|
-- The empty braces denote an empty table (associative array)
|
|
configuration = {}
|
|
|
|
-- This is the main function of the script.
|
|
-- This function is run whenever the script is run
|
|
function process_lines(meta, styles, lines, config)
|
|
-- The function aegisub-report_progress changes the position of the progress bar shown while the script is running
|
|
-- The value given is in percent.
|
|
aegisub.report_progress(50)
|
|
-- The aegisub,.output_debug function shows some text
|
|
aegisub.output_debug("Test script 1 running")
|
|
aegisub.report_progress(100)
|
|
-- It is very important that the process_lines function returns an array of lines, otherwise an error will occur
|
|
-- If an empty array is returned, the entire file is cleared!
|
|
return lines
|
|
end
|