# HG changeset patch # User gabucino # Date 1003342060 0 # Node ID 2c6c21e1a1a1c3b9362630471f962ddb704d37bc # Parent 5d476d03e2b342201390f8ba61fbef66cabab836 converts all subtitles in . to mpsub format diff -r 5d476d03e2b3 -r 2c6c21e1a1a1 TOOLS/x2mpsub.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TOOLS/x2mpsub.sh Wed Oct 17 18:07:40 2001 +0000 @@ -0,0 +1,20 @@ +#!/bin/sh +# +# This script converts the subtitles in the current directory into +# MPsub format (into ./converted-subtitles/*) +# +# Gabucino. No warranty. :) +# + +TMP="x2mpsub-$RANDOM" +mkdir "$TMP" +touch "$TMP/$TMP" + +for x in *; do + echo "Converting $x" + mplayer "$TMP/$TMP" -sub "$x" -dumpmpsub -quiet > /dev/null 2> /dev/null + mv dump.mpsub "$TMP/$x" +done + +rm "$TMP/$TMP" +mv "$TMP" converted-subtitles