write out srt files for each language too
This commit is contained in:
parent
baf6625bde
commit
708b27bdb1
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue