Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- def get_day_today():
- return datetime.datetime.today().weekday()
- def mystery(n):
- MONDAY = 0
- TUESDAY = 1
- WEDNESDAY = 2
- THURSDAY = 3
- FRIDAY = 4
- SATURDAY = 5
- SUNDAY = 6
- GLORIOUS = 0
- JOYFUL = 1
- SORROWFUL = 2
- LUMINOUS = 3
- joyful_mysteries = ['The Annunciation', 'The Visitation', 'The Nativity', 'The Presentation',
- 'The Finding in the Temple']
- sorrowful_mysteries = ['The Agony in the Garden', 'The Scourging at the Pillar', 'The Crowning with Thorns',
- 'The Carrying of the Cross', 'The Crucifixion']
- glorious_mysteries = ['The Resurrection', 'The Ascension', 'The Descent of the Holy Spirit', 'The Assumption',
- 'The Coronation of Our Lady']
- luminous_mysteries = ['The Baptism of Christ in the Jordan', 'The Wedding Feast at Cana',
- 'The Announcement of the Kingdom', 'The Transfiguration', 'The Institution of the Eucharist']
- day_today = get_day_today()
- mystery = 0
- current_mystery = ''
- if day_today == SUNDAY or day_today == WEDNESDAY:
- mystery = GLORIOUS
- elif day_today == MONDAY or day_today == SATURDAY:
- mystery = JOYFUL
- elif day_today == TUESDAY or day_today == FRIDAY:
- mystery = SORROWFUL
- elif day_today == THURSDAY:
- mystery = LUMINOUS
- name = ''
- if mystery == GLORIOUS:
- name = 'glorious'
- current_mystery = glorious_mysteries[n]
- elif mystery == JOYFUL:
- name = 'joyful'
- current_mystery = joyful_mysteries[n]
- elif mystery == SORROWFUL:
- name = 'sorrowful'
- current_mystery = sorrowful_mysteries[n]
- elif mystery == LUMINOUS:
- name = 'luminous'
- current_mystery = luminous_mysteries[n]
- print 'The ' + nth(n + 1) + ' ' + name + ' mystery is ' + current_mystery
- def nth(n):
- if n == 1:
- return str(n) + 'st'
- elif n == 2:
- return str(n) + 'nd'
- elif n == 3:
- return str(n) + 'rd'
- else:
- return str(n) + 'th'
- def pray_rosary(num_times=1):
- NUM_MYSTERIES = 5
- for i in xrange(num_times):
- print '\nRosary #' + str(i + 1) + '\n'
- sign_of_the_cross()
- apostles_creed()
- #if i == num_times - 1:
- #pause = raw_input()
- print ''
- our_father()
- print ''
- hail_mary(3)
- print ''
- glory_be()
- for j in xrange(NUM_MYSTERIES):
- print ''
- mystery(j)
- print ''
- our_father()
- print ''
- hail_mary(10)
- #pause = raw_input()
- print ''
- glory_be()
- print ''
- o_my_jesus()
- print ''
- print ''
- hail_holy_queen()
- def print_lines(lines):
- for i in lines:
- print i
- def sign_of_the_cross(num_times=1):
- for i in xrange(num_times):
- print ''
- print '*sign*'
- print 'In the name of the father, and of the son, and of the holy spirit. Amen.'
- print ''
- def get_lines(file_name):
- text = open(file_name, 'r')
- lines = []
- for line in text:
- line = line.replace('\n', '')
- lines.append(line)
- text.close()
- return lines
- def apostles_creed(num_times=1):
- lines = get_lines('ApostlesCreed.txt')
- for i in xrange(num_times):
- print ''
- print_lines(lines)
- print ''
- def our_father(num_times=1):
- lines = get_lines('OurFather.txt')
- for i in xrange(num_times):
- print ''
- print_lines(lines)
- print ''
- def hail_mary(num_times=1):
- lines = get_lines('HailMary.txt')
- for i in xrange(num_times):
- print ''
- print_lines(lines)
- print ''
- def glory_be(num_times=1):
- lines = get_lines('GloryBe.txt')
- for i in xrange(num_times):
- print ''
- print_lines(lines)
- print ''
- def o_my_jesus(num_times=1):
- lines = get_lines('OMyJesus.txt')
- for i in xrange(num_times):
- print ''
- print_lines(lines)
- print ''
- def hail_holy_queen(num_times=1):
- lines = get_lines('HailHolyQueen.txt')
- for i in xrange(num_times):
- print ''
- print_lines(lines)
- print ''
- print 'Rosary Automator'
- print '----------------'
- num_rosaries = input('\nHow many rosaries would you like to pray?:\t')
- pray_rosary(num_rosaries)
- pause = raw_input('\n\nPrayer/s finished. Press ENTER to exit.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement