Created
February 5, 2016 11:47
-
-
Save filipebarcos/e3dbf5d4f961876a8830 to your computer and use it in GitHub Desktop.
Localize SRT files (pt-br). Rename all SRT files in nested folders to add `pt-br` in the end.
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
#!/usr/bin/env ruby | |
Dir.glob("#{Dir.pwd}/**/*.srt").each do |file| | |
newfile_name = file.sub(/\.srt$/, ".pt-br.srt") | |
File.rename(file, newfile_name) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment