import ass | |
import os | |
import sys | |
if __name__ == "__main__": | |
filename = sys.argv[1] | |
with open(filename, "r", encoding='utf-8-sig') as fin: | |
doc = ass.parse(fin) | |
for e in doc.events: | |
if isinstance(e, ass.Dialogue) and e.style == "英": | |
print(e.text.strip()) | |