diff options
author | garret <garret@airmail.cc> | 2021-09-30 00:23:28 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2021-09-30 00:37:09 +0100 |
commit | 04a61982e82a5df1cb2ec77a5d9752782a7c41e0 (patch) | |
tree | 35ec751a28b717a7cc6158f84357408173339bff /a-b.lua | |
parent | 2a9e07ff9a5f7084d3e2e54ff5d065f9b0a93591 (diff) | |
download | aegisub-scripts-04a61982e82a5df1cb2ec77a5d9752782a7c41e0.tar.gz aegisub-scripts-04a61982e82a5df1cb2ec77a5d9752782a7c41e0.tar.bz2 aegisub-scripts-04a61982e82a5df1cb2ec77a5d9752782a7c41e0.zip |
macro folder
the beginning of becoming like every other cartel-aproved script repo in existence
Diffstat (limited to 'a-b.lua')
-rw-r--r-- | a-b.lua | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/a-b.lua b/a-b.lua deleted file mode 100644 index 994361f..0000000 --- a/a-b.lua +++ /dev/null @@ -1,34 +0,0 @@ -script_name = "A-B" -script_description = "makes checking pre-timing possible." -script_author = "garret" -script_version = "2021-07-10" - -function switch_number(i) - if i == "a" then - return "b" - elseif i == "b" then - return "a" - end -end - -function main(sub, sel) - local i = "a" - for si,li in ipairs(sel) do - line = sub[li] - if line.actor == "" then - indicator = i - else - indicator = line.actor.." "..i - end - if line.text == "" then - line.text = indicator - elseif line.text:gsub("{[^}]-}","") == "" then - line.text = indicator.." "..line.text - end - sub[li] = line - i = switch_number(i) - end - aegisub.set_undo_point(script_name) -end - -aegisub.register_macro(script_name, script_description, main) |