Advertisement
Guest User

Untitled

a guest
Jan 28th, 2015
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. script_name="process dumb shit"
  2. script_description="___"
  3. script_version="0.0.1"
  4. script_author="line0"
  5.  
  6. local LineCollection = require("a-mo.LineCollection")
  7. local util = require("aegisub.util")
  8. local l0Common = require("l0.Common")
  9.  
  10. function process(sub,sel,res)
  11. local lines = LineCollection(sub,sel)
  12. lines:runCallback(function(lines, line, i)
  13. line.text = line.text:gsub("(%d:%d%d:%d%d.%d%d)%d", function(timecode)
  14. return util.ms2timecode(util.timecode2ms(timecode) + tonumber(line.effect)) .. "0"
  15. end)
  16. end, true)
  17. lines:replaceLines()
  18. end
  19.  
  20. aegisub.register_macro(script_name, script_description, process)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement