[mythtv-users] User Job to rip subtitles from each program

Raymond Wagner raymond at wagnerrp.com
Fri Feb 3 00:53:22 UTC 2012


On 2/2/2012 18:15, David Crawford wrote
> On 2 February 2012 22:00, Raymond Wagner <raymond at wagnerrp.com 
> <mailto:raymond at wagnerrp.com>> wrote:
>
>      As for running the extractor itself, try...
>
>     from MythTV import System
>     from MythTV.static import INSTALL_PREFIX
>     ccextractor =
>     System(path=os.path.join(INSTALL_PREFIX,'mythccextractor'))
>     ccextractor('--infile', os.path.join(sg.dirname, prog.basename))
>
>
> current command that works is:
>
> python /home/dave/uksub2srt/uksub2srt.py -i "%DIR%/%FILE%" -o 
> /home/subtitles/"%FILE%".srt
>
> is there anyway i can include the script to rename the subtitle file 
> in that command, or would it be better just to run a separate script 
> after?

from MythTV import System
ccextractor = System(path="/home/dave/uksub2srt/uksub2srt.py")
ccextractor('-i', os.path.join(sg.dirname, prog.basename),
             '-o', '/home/subtitles/{0}.srt'.format(newbase))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.mythtv.org/pipermail/mythtv-users/attachments/20120202/db69245c/attachment.html 


More information about the mythtv-users mailing list