From 5f1fc4cbb321401d308f8510ef184f690a173aa9 Mon Sep 17 00:00:00 2001 From: garret Date: Wed, 14 Jul 2021 16:39:13 +0100 Subject: add reporting of amount of bleeds --- scenebleed.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scenebleed.lua') diff --git a/scenebleed.lua b/scenebleed.lua index 5f4fab3..c0d3908 100644 --- a/scenebleed.lua +++ b/scenebleed.lua @@ -1,7 +1,7 @@ script_name="Scenebleed Detector" script_description="marks possible scenebleeds with an effect" script_author="garret" -script_version="2021-07-06" +script_version="2021-07-14" function main(sub, sel) local thresh = aegisub.frame_from_ms(500) @@ -9,6 +9,7 @@ function main(sub, sel) -- tried to make config file work, failed, so shit's hardcoded local keyframes = aegisub.keyframes() + local bleed_count = 0 for j,i in ipairs(sel) do line = sub[i] local start_frame = aegisub.frame_from_ms(line.start_time) @@ -21,10 +22,12 @@ function main(sub, sel) else line.effect = line.effect.."; "..bleedstring end + bleed_count = bleed_count + 1 sub[i] = line end end end + aegisub.log(bleed_count.." scenebleeds found.") aegisub.set_undo_point(script_name) return sel end -- cgit v1.2.3-70-g09d2