This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -print0 | while IFS= read -r -d '' file; do printf "%s ($file)\n" "$(unzip -p "$file" | egrep -o '(left|right|cx|cy)="[0-9]+"|<xdr:(col|colOff|row|rowOff)>[0-9]+</xdr:(col|colOff|row|rowOff)>' | md5sum)" ; done | awk '{ if (assoc[$1] && assoc[$1] != 1) { print assoc[$1]; assoc[$1] = 1; } if (assoc[$1] && assoc[$1] == 1) { print $0; } if (!assoc[$1]) { assoc[$1] = $0; } }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Usage: python tt2srt.py source.xml output.srt | |
# Download the .xml file from youtube by using the Network tab | |
# on the browser Developer Tools, and searching for requests to | |
# the "timedtext" endpoint | |
from xml.dom.minidom import parse | |
import sys | |