Blogging Reminder Nag Script

I will admit that I have trouble from time to time remembering to keep my blog active and publish frequently. Compounding the problem is that I have many 10s of blogs out there that have become stale and effectively dead due to lack of attention. To help solve this problem I’ve put together a simple nagging script that I have scheduled which checks a bunch of my sites to see how fresh the content is. Once it breaks a specified threshold for the number of days since the last post I get a nagging email reminding me to write something for the site.

#!/usr/bin/env python 
# -*- coding: utf-8 -*-
# (C) 2010 HalOtis Marketing
# written by Matt Warren
import feedparser  # available at
import gmail
import datetime
import re
SETTINGS = [{'name':'', 'url':'', 'email':'YOUR EMAIL', 'frequency':'3'},
today =
def check_blog(blog):
    d = feedparser.parse(blog['url'])
    lastPost = d.entries[0]
    pubDate = datetime.datetime(
    if today - pubDate >  datetime.timedelta(days=7):
        print "send email - last post " + str((today-pubDate).days) + " days ago."
        gmail.send_email(blog['name'] + ' needs attention! last post ' + str((today-pubDate).days) + " days ago.", 'Please write a post', to_addr=blog['email'])
        print "good - last post" + str((today-pubDate).days) + " days ago."
if __name__ == '__main__':
    for blog in SETTINGS:

I’ve added this script to the halotis-collection on if your interested in pulling it from there.