'Create a generic cover for recipes that don\'t have a cover'

def default_cover(self, cover_file):

    try:
        from calibre.ebooks.covers import create_cover
        title = (self.title if isinstance(self.title, unicode) else self.title.decode(preferred_encoding, 'replace'))
        date = strftime(self.timefmt).replace('[', '').replace(']', '')
        img_data = create_cover(title, [date])
        cover_file.write(img_data)
        cover_file.flush()
    except:
        self.log.exception('Failed    to    generate    default    cover')
        return False
    return True
