Update of /cvsroot/freevo/freevo/WIP/Aubin
In directory sc8-pr-cvs1:/tmp/cvs-serv23484

Added Files:
        comingup.py 
Log Message:
More of a test of something I'm going to use in my new skin...
But as it is, it's a simple tool to present what's coming up in your
scheduled listings from the command line... put into helpers/ and run
'freevo comingup' and it'll print

Today:
Tomorrow:
Later:

which is what I'd like to see in the TV menu in the OSD


--- NEW FILE: comingup.py ---
#!/usr/bin/env python
#

import tv.record_client as ri
import time

(status, recordings) = ri.getScheduledRecordings()
progs = recordings.getProgramList()

today = []
tomorrow = []
later = []

for what in progs.values():
    if what.start <= time.time() + 86400:
        today.append(what)
    if what.start <= time.time() + 172800 and what.start >= time.time() + 86400:
        tomorrow.append(what)
    if what.start >= time.time() + 172800:
        later.append(what)


if len(today) > 0:
    print "Today:",
    for m in today:
        print "\t" + str(m.title) + "\tat\t" + 
str(time.strftime('%I:%M%p',time.localtime(what.start)))

if len(tomorrow) > 0:
    print "Tomorrow:",
    for m in tomorrow:
        print "\t" + str(m.title) + "\tat\t" + 
str(time.strftime('%I:%M%p',time.localtime(what.start)))

if len(later) > 0:
    print "Later:",
    for m in later:
        print "\t" + str(m.title) + "\tat\t" + 
str(time.strftime('%I:%M%p',time.localtime(what.start)))




-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to