如何在 srt 文件和 csv 文件之间进行转换?
Posted
技术标签:
【中文标题】如何在 srt 文件和 csv 文件之间进行转换?【英文标题】:How can I convert between srt file and csv file? 【发布时间】:2021-05-15 18:04:57 【问题描述】:srt 文件示例:
1
00:01:13,360 --> 00:01:14,441
I warned you.
2
00:01:14,680 --> 00:01:17,570
Did I not warn you what would come
of dealing with Dwarves?
3
00:01:17,840 --> 00:01:18,921
Now they've done it.
csv 文件示例:
ID Start_Time End_Time Text
1 00:01:13,360 00:01:14,441 I warned you.
2 00:01:14,680 00:01:17,570 Did I not warn you what would come of dealing with Dwarves?
3 00:01:17,840 00:01:18,921 Now they've done it.
srt 文件有时包含多行文本和 html 格式符号。有没有我可以用来在它们之间转换的包?还是我自己写?
【问题讨论】:
【参考方案1】:似乎有很多图书馆。我找到的第一个:
https://github.com/cdown/srt https://github.com/byroot/pysrt【讨论】:
以上是关于如何在 srt 文件和 csv 文件之间进行转换?的主要内容,如果未能解决你的问题,请参考以下文章