Created
May 1, 2012 22:00
-
-
Save niktto/2571772 to your computer and use it in GitHub Desktop.
Simple script to fix QNapi subtitles
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/python3 | |
import codecs | |
import sys | |
try: | |
inp = codecs.open(sys.argv[1],'r','cp1250') | |
except IndexError: | |
print('You need to give me text file with qnapi subtitles as an argument. Thanks.') | |
else: | |
sub = inp.read() | |
inp.close() | |
outp = codecs.open(sys.argv[1],'w','UTF-8') | |
outp.write(sub) | |
outp.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment