[mythtv-users] Python script for getting the next 10 recordings emailed to you

Sam Contapay totalgeekstuff at gmail.com
Mon Feb 27 05:17:19 UTC 2006

This python script sends an email to you with an email showing the
next 10 recordings. It only shows what would be recorded like that
status window for MythWeb. I use it so I can see any gaping holes in
that days schedule and schedule more recordings while I'm at work.
Plus its a way to give back to the community that has given me so much
entertainment in these last couple months.

It basically grabs the information from mythbackend and sorts through
it grabbing the next 10 movies with the recording status of "will be
recorded". You can have it run on another machine as long as you can
access the IP from the backend server on that machine.

Its GPL and if you have any improvements please let me know so I can
incorporate those changes and put it back up. I basically have it run
as a cron job around 5 AM in the morning. It will send the email
either through SENDMAIL or SMTP. Require Python 2.4 or higher (maybe
lower but thats what I used to write and test this with). My crontab
setting is:

0 5 * * * python /home/mythtv/mythtv.py 1>/dev/null 2>&1

Make sure and read the file for what variables to change and credits.
And if you have any changes please let me know at sam <at>

You can download this file at http://sam.contapay.net/?p=17 this is a
straight link to the article on my blog (not a really good blog
anyways :)) so you can post any comments, suggestions, or support
there as well. Comments are moderated though because of the thousand
of spam comments I get.

Here's a sample email that is sent out there is a date sent now in the
last line. This is basiclly the same as the backend status for

Title: [Family Guy]
Subtitle: Brian Goes Back to College
Description After writing a story for a local magazine, Brian gets a
job at The New Yorker.
Channel: 2 Start: 21:00 End: 21:30

Title: [Star Trek: The Next Generation]
Subtitle: Peak Performance
Description The Ferengi ambush the Enterprise and another vessel
during a battle simulation; guest David L. Lander.
Channel: 75 Start: 22:00 End: 23:00

Title: [Robot Chicken]
Subtitle: A Piece of the Action
Description "Pimp My Sister"; "The Surreal Life" mission; "Debbie Does
Dallas" by "Exhausted Puppet Theatre"; sci-fi convention war.
Channel: 54 Start: 23:30 End: 23:45

Title: [South Park]
Subtitle: Jewbilee
Description South Park waits for the meteor shower; Kyle and Ike go camping.
Channel: 3 Start: 00:05 End: 00:35

Title: [Futurama]
Subtitle: That's Lobstertainment
Description Dr. Zoidberg breaks into show business by making a movie
with his uncle.
Channel: 54 Start: 02:00 End: 02:30

Title: [Family Guy]
Subtitle: Petarded
Description After winning at Trivial Pursuit, Peter claims to be a
genius, so Brian asks him to take an IQ test to prove it.
Channel: 54 Start: 02:30 End: 03:00

Title: [Squidbillies]
Subtitle: School Days, Fool Days
Channel: 54 Start: 04:30 End: 04:45

Title: [Star Trek: Deep Space Nine]
Subtitle: Ties of Blood and Water
Description A Cardassian dissident needs Kira's help to die in peace.
Channel: 45 Start: 12:00 End: 13:00

Title: [Star Trek: Deep Space Nine]
Subtitle: Ferengi Love Songs
Description Quark is elated to learn his mother's lover is Grand Nagus Zek.
Channel: 45 Start: 13:00 End: 14:00

Title: [Star Trek: The Next Generation]
Subtitle: A Fistful of Datas
Description Worf and Alexander face down a Wild West ringer for Data
when the holodeck goes awry.
Channel: 45 Start: 14:00 End: 15:00


More information about the mythtv-users mailing list