Archive

Archive for July, 2010

Daily Scripture Reading

July 19, 2010 2 comments

I’ve been trying to follow the Orthodox lectionary readings with my family each morning at breakfast. Often times I forget or don’t have time to go look them up. So I wrote this little script that goes out and gets them and prints them. I have an entry in my crontab file that runs this script at 6:30am each morning. Running this from cron requires that you have Xvfb installed. The crontab entry looks like:

30 6 * * * xvfb-run /home/brian/bin/scripture.py

Here is the scripture.py python script:

#!/usr/bin/python

import feedparser
import os
import time

f = feedparser.parse('http://onlinechapel.goarch.org/daily-rss.asp')
for s in f['entries']:
    if 'epistle' in s.link or 'gospel' in s.link:
        os.system("firefox -P Brian -print '%s'" % s.link)
        time.sleep(5)

Using Firefox to print in this manner requires installing the Firefox Command Line Print extension.

You can follow the lectionary readings from the Saint Paul Orthodox Church website.

Categories: Christianity, Programming
Follow

Get every new post delivered to your Inbox.