diff --git a/ox/file.py b/ox/file.py index 3636a0b..9ddc4c1 100644 --- a/ox/file.py +++ b/ox/file.py @@ -62,7 +62,11 @@ def oshash(filename): def avinfo(filename): if os.path.getsize(filename): - p = subprocess.Popen(['ffmpeg2theora', '--info', filename], + ffmpeg2theora = 'ffmpeg2theora' + local = os.path.expanduser('~/.ox/bin/ffmpeg2theora') + if os.path.exists(local): + ffmpeg2theora = local + p = subprocess.Popen([ffmpeg2theora, '--info', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE) info, error = p.communicate() try: diff --git a/ox/html.py b/ox/html.py index a93a868..2b7406e 100644 --- a/ox/html.py +++ b/ox/html.py @@ -160,6 +160,8 @@ def decodeHtml(html): return match.group(0) return charrefpat.sub(entitydecode, html).replace(u'\xa0', ' ') +decode_hmtl = decodeHtml + def highlight(text, query, hlClass="hl"): """ >>> highlight('me & you and $&%', 'and')