From 708b27bdb13a2956496835d755d10853e198d5ce Mon Sep 17 00:00:00 2001 From: j Date: Wed, 4 Oct 2017 11:04:19 +0000 Subject: [PATCH] write out srt files for each language too --- subtitles.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subtitles.py b/subtitles.py index 77a7593..31dd65a 100755 --- a/subtitles.py +++ b/subtitles.py @@ -234,6 +234,7 @@ if __name__ == '__main__': files = opts.files if not files: files = glob(os.path.join(opts.prefix, 'output/*/*.json')) + files = [f for f in files if not 'gong' in f] for item_json in files: prefix = 'public/' + item_json.split('/')[-1][0].lower() + item_json.split('/')[-2] + '.' prefix = os.path.join(opts.prefix, prefix) @@ -245,4 +246,5 @@ if __name__ == '__main__': render_subtitles(item_json, output_json, output_srt, ['no', 'en']) for lang in ('en', 'ko', 'no'): output_json = prefix + lang + '.json' - render_subtitles(item_json, output_json, None, lang) + output_srt = prefix + lang + '.srt' + render_subtitles(item_json, output_json, output_srt, lang)