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.
34 lines
1,001 B
Lua
34 lines
1,001 B
Lua
script_name = "Absurdness"
|
|
script_description = "Benchmark renderers by testing how they react to an absurd number of \\t tags in one line, and an absurd amount of lines each with a single \\t."
|
|
script_author = "jfs"
|
|
|
|
absurd = 1000
|
|
|
|
ttext = "\\1a&H00&\\2a&H00&\\3a&H00&\\4a&H00&"
|
|
|
|
function gen_one_absurd(subs, sel)
|
|
local l = subs[sel[1]]
|
|
l.text = ""
|
|
l.start_time = 0
|
|
l.end_time = (absurd+1)*100
|
|
for i = 1, absurd do
|
|
l.text = l.text .. string.format("{\\t(%d,%d,%s)}", i*100, (i+1)*100, ttext)
|
|
end
|
|
l.text = l.text .. "a"
|
|
subs[-sel[1]] = l
|
|
aegisub.set_undo_point("absurdness 1")
|
|
end
|
|
|
|
function gen_absurd_many(subs, sel)
|
|
local l = subs[sel[1]]
|
|
for i = 1, absurd do
|
|
l.start_time = i*100
|
|
l.end_time = (i+1)*100
|
|
l.text = string.format("{\\t(0,100,%s)}a", ttext)
|
|
subs[-sel[1]] = l
|
|
end
|
|
aegisub.set_undo_point("absurdness 2")
|
|
end
|
|
|
|
aegisub.register_macro("Generate absurd line", "Absurd", gen_one_absurd)
|
|
aegisub.register_macro("Generate absurdly many lines", "Absurd", gen_absurd_many)
|