Skip to content

Instantly share code, notes, and snippets.

@line0
Last active August 29, 2015 14:14
Show Gist options
  • Save line0/734f66fc69b42e91319d to your computer and use it in GitHub Desktop.
Save line0/734f66fc69b42e91319d to your computer and use it in GitHub Desktop.
process dumb shit
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