Sorry if I have sounded a bit too demanding, it&#39;s just it can be very tempting to ask questions when you are desperately trying to get something to work and when you dont really know alot about python scripts.<div><br>

</div><div>I have been doing a lot of reading and using trial and error and reading and re-reading the replies but havent got it to work yet. I&#39;m guessing &quot;be&quot; is backend? Here is the latest script ive tried but still no joy</div>
<div>:( :</div><div><br></div><div><div>#!/usr/bin/env python</div><div><br></div><div>import sys</div><div>if len(sys.argv) != 3:</div><div>    raise Exception(&#39;Invalid argument count&#39;)</div><div>chanid, starttime = sys.argv[1:3]</div>
<div>import os</div><div>from MythTV import MythBE, findfile</div><div>be = MythBE()</div><div>prog = be.getRecording(&lt;chanid&gt;, &lt;be&gt;)</div><div>oldbase = prog.basename.rsplit(&#39;.&#39;,1)[0]</div><div>newbase = prog.formatPath(&#39;%m-%d_%H-%i-%s_%cN_%T&#39;).rsplit(&#39;.&#39;,1)[0]</div>
<div>sg = findfile(prog.basename, prog.storagegroup)</div><div>if sg is None:</div><div>    raise Exception(&#39;file not found&#39;)</div><div>from MythTV import System</div><div>ccextractor = System(path=&quot;/home/dave/uksub2srt/uksub2srt.py&quot;)</div>
<div>ccextractor(&#39;-i&#39;, os.path.join(sg.dirname, prog.basename),</div><div>            &#39;-o&#39;, &#39;/home/subtitles/{0}.srt&#39;.format(newbase))</div></div><div><br></div><div>dave</div>
<div><br></div><div><br><br><div class="gmail_quote">On 3 February 2012 18:52, Michael T. Dean <span dir="ltr">&lt;<a href="mailto:mtdean@thirdcontact.com" target="_blank">mtdean@thirdcontact.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 02/03/2012 01:15 PM, David Crawford wrote:<br>
&gt; Would it be &quot;be&quot; and &quot;starttime&quot; ?<br>
<br>
</div>FWIW--and speaking as an outsider to this conversation looking in (I&#39;ll<br>
admit I haven&#39;t read all the replies in this thread)--Raymond seems to<br>
have gone out of his way to help you out with this script, and it seems<br>
that you&#39;re not doing as much as you probably should to &quot;help him help<br>
you.&quot;  Perhaps you could spend a little more time trying to work through<br>
what the script is doing and how to make it do exactly what you want<br>
before asking questions--and I think if you do, you&#39;ll find that you&#39;re<br>
able to figure out many of the answers by yourself. This way, when you<br>
do ask questions they would be more-carefully-considered questions about<br>
things that you may not be able to figure out without guidance.<br>
<br>
Since the goal of your script seems to be very much a personal goal (and<br>
not one that would help the community in general--based on<br>
<a href="http://www.gossamer-threads.com/lists/mythtv/users/501301#501301" target="_blank">http://www.gossamer-threads.com/lists/mythtv/users/501301#501301</a> +<br>
<a href="http://www.gossamer-threads.com/lists/mythtv/users/501367#501367" target="_blank">http://www.gossamer-threads.com/lists/mythtv/users/501367#501367</a> , which<br>
are, to be honest, a bit cryptic about what exactly you&#39;re trying to<br>
do)--your taking the time to figure out exactly what&#39;s going on with the<br>
script would help you, too.  It would allow you to fix the script on<br>
your own when it breaks or to update or enhance it or to create your own<br>
scripts in the future.<br>
<br>
To do this will involve a lot of searching on the Internet, looking at<br>
completed/working scripts (to get an idea of how Python works in<br>
general, and to get an idea of how the MythTV Python bindings work--see,<br>
for example, <a href="http://www.mythtv.org/wiki/Category:Python_Scripts" target="_blank">http://www.mythtv.org/wiki/Category:Python_Scripts</a> ), as<br>
well as trial and error.  If you pick some of the shorter scripts and<br>
pick apart exactly what they&#39;re doing, I think it will help you figure<br>
out how the script/pieces he&#39;s provided work.  You&#39;ll also need to do<br>
some searching on the Internet to learn what&#39;s going on.  And, you may<br>
need to consult some Python scripting tutorials (search for &quot;python<br>
scripting tutorial&quot; (no quotes) with your favorite search engine).  And,<br>
lastly, probably reading and re-reading this thread--your questions and<br>
his replies.<br>
<br>
This isn&#39;t meant to be &quot;mean&quot; or in any way say that you&#39;re on your own,<br>
but is just trying to suggest some approaches that might help you to<br>
learn a new programming language.  I know that learning programming and<br>
programming languages can seem like a daunting task, but with the right<br>
tools and approach, it&#39;s quite possible.  And, if you want to create<br>
customized computer programs, chances are you&#39;re going to need to figure<br>
it out, eventually.<br>
<br>
Mike<br>
<div><div>_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://www.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
</div></div></blockquote></div><br></div>