Last active
August 29, 2015 14:14
-
-
Save line0/734f66fc69b42e91319d to your computer and use it in GitHub Desktop.
process dumb shit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
script_name="process dumb shit" | |
script_description="___" | |
script_version="0.0.1" | |
script_author="line0" | |
local LineCollection = require("a-mo.LineCollection") | |
local util = require("aegisub.util") | |
local l0Common = require("l0.Common") | |
function process(sub,sel) | |
local lines = LineCollection(sub,sel) | |
lines:runCallback(function(lines, line, i) | |
line.text = line.text:gsub("(%d:%d%d:%d%d.%d%d)%d", function(timecode) | |
return util.ms2timecode(util.timecode2ms(timecode) + tonumber(line.effect)) .. "0" | |
end) | |
end, true) | |
lines:replaceLines() | |
end | |
aegisub.register_macro(script_name, script_description, process) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment