Author: arekm Date: Sat Feb 20 22:39:39 2010 GMT Module: packages Tag: HEAD ---- Log message: - drop versioning from here, revert wrong mdvd matching
---- Files affected: packages/subconv: subconv.py (1.6 -> 1.7) ---- Diffs: ================================================================ Index: packages/subconv/subconv.py diff -u packages/subconv/subconv.py:1.6 packages/subconv/subconv.py:1.7 --- packages/subconv/subconv.py:1.6 Sat Feb 20 23:30:04 2010 +++ packages/subconv/subconv.py Sat Feb 20 23:39:34 2010 @@ -1,20 +1,19 @@ #!/usr/bin/env python # -# subconv v0.2.2 -- divx subtitles converter -# (w)by Pawel Stolowski -# Julien Lerouge +# subconv +# divx subtitles converter by Pawel Stolowski, Julien Lerouge +# mpl2 by Grzegorz Zyla +# +# Maintained at http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/subconv/ # # Released under terms of GNU GPL # -# mpl2 (w) by Grzegorz Zyla import re, sys, getopt, string def usage(): sys.stderr.write(""" - subconv v0.2.2 -- DivX subtitles converter - (w)by Pawel Stolowski <[email protected]> - Julien Lerouge <[email protected]> + subconv -- DivX subtitles converter by Pawel Stolowski, Julien Lerouge Usage: subconv [-i fmt|-o fmt|-a sec|-s sec|-S h:m:s[,h:m:s,...]] input [output1, output2, ...] @@ -39,7 +38,7 @@ sys.stderr.write("FPS guessing, here are approximate length of file for several FPS :\n") most_current = [24/1.001, 25.0, 30/1.001 ] - re_mdvd = re.compile("^[\{\[](\d+)[\}\]][\{\[](\d*)[\}\]]\s*(.*)") + re_mdvd = re.compile("^\{(\d+)\}\{(\d*)\}\s*(.*)") count = len(list) - 1 m = re_mdvd.match(list[count]) while not m: @@ -69,7 +68,7 @@ returns: format (srt, tmp, mdvd) or "" if unknown """ sys.stderr.write("Guessing subs format .") - re_mdvd = re.compile("^[\{\[](\d+)[\}\]][\{\[](\d*)[\}\]]\s*(.*)") + re_mdvd = re.compile("^\{(\d+)\}\{(\d*)\}\s*(.*)") re_srt = re.compile("^(\d+):(\d+):(\d+),\d+\s*-->.*") re_tmp = re.compile("^(\d+):(\d+):(\d+):(.*)") re_sub2 = re.compile("^(\d+):(\d+):(\d+)\.\d+\s*\,.*") @@ -101,7 +100,7 @@ input: contents of a file as list returns: list of subtitles in form: [[time_start in secs, time_end in secs, line1, ...],....] """ - re1 = re.compile("^[\{\[](\d+)[\}\]][\{\[](\d*)[\}\]]\s*(.*)") + re1 = re.compile("^\{(\d+)\}\{(\d*)\}\s*(.*)") subtitles = [] while len(list)>0: ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/subconv/subconv.py?r1=1.6&r2=1.7&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
