Skip to content

Instantly share code, notes, and snippets.

@bemitc
Created October 3, 2020 03:33
Show Gist options
  • Save bemitc/581ab610dc592507bba9b23fc4a0a34a to your computer and use it in GitHub Desktop.
Save bemitc/581ab610dc592507bba9b23fc4a0a34a to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
from pysubparser import parser
import sys
if len(sys.argv) == 1:
print(f"{sys.argv[0]} subtitle_file\n")
else:
subtitles = parser.parse(sys.argv[1])
for subtitle in subtitles:
if subtitle.text[0] != '♬':
print(subtitle.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment