diff --git a/srt2fcp.py b/srt2fcp.py index 8241b92..03be93d 100755 --- a/srt2fcp.py +++ b/srt2fcp.py @@ -1,5 +1,5 @@ -#!/usr/bin/env python -from __future__ import division +#!/usr/bin/env python3 + import sys import os from optparse import OptionParser @@ -8,15 +8,17 @@ import shutil import math import time import json -import urllib +import urllib.request +import urllib.parse +import urllib.error import xml.sax.saxutils import ox -import Image +from PIL import Image base = os.path.abspath(os.path.dirname(__file__)) -generator_template = u''' +generator_template = ''' Text 3000 @@ -175,12 +177,12 @@ generator_template = u''' ''' -fcp_header = u''' +fcp_header = ''' ''' -fcp_footer = u'''''' +fcp_footer = '''''' -sequence_template = u''' +sequence_template = ''' 72DC4146-6224-4400-BAAC-2AB6E0D3D292 add @@ -306,7 +308,7 @@ class Fcp: start = int(s['in'] * fcp.fps) end = int(s['out'] * fcp.fps) if start < duration: - print "warning", start, '<', duration, value + print("warning", start, '<', duration, value) start = duration duration = end