-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a Rosary Mysteries plugin (may not be properly integrated) #1112
Open
SuperDarke14
wants to merge
1
commit into
sukeesh:master
Choose a base branch
from
SuperDarke14:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import datetime | ||
from plugin import plugin | ||
|
||
@plugin('rosary') | ||
def rosary(jarvis, s): | ||
##Provides names of the days of the week | ||
weekdayList = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', | ||
'Saturday', 'Sunday'] | ||
##Function to convert the index of the weekday into the date | ||
##(eg Monday, Tuesday) | ||
def convertDayIndexToWord(): | ||
return weekdayList[y] | ||
##Fetches the day of the week | ||
y = datetime.datetime.today().weekday() | ||
##Calls the function | ||
convertDayIndexToWord() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't really do anything. Your method just returns a string - which you are ignoring? |
||
##Displays the day of the week in user-readable format | ||
print('Today is', weekdayList[y]) | ||
##Uses the weekday to display the appropriate mysteries of the Rosary | ||
##TODO would probably have been better to write these as lists or something | ||
##instead of printing them straight out | ||
##TODO add a 'trad mode' to change Thursday's mysteries to whatever it was before | ||
##JPII introduced the Luminous Mysteries | ||
##TODO Maybe add clickable beads? | ||
if y == 1 or y == 4: | ||
print("Today's mysteries of the Rosary are the Sorrowful Mysteries.") | ||
print("The Sorrowful Mysteries are:") | ||
print("1. The Agony in the Garden") | ||
print("2. The Scourging at the Pillar") | ||
print("3. The Crowning of Thorns") | ||
print("4. The Carrying of the Cross") | ||
print("5. The Crucifixion and Death of Our Lord") | ||
elif y == 0 or y == 5: | ||
print("Today's mysteries of the Rosary are the Joyful Mysteries.") | ||
print("The Joyful Mysteries are:") | ||
print("1. The Annunciation") | ||
print("2. The Visitation") | ||
print("3. The Nativity") | ||
print("4. The Presentation in the Temple") | ||
print("5. The Finding of Our Lord in the Temple") | ||
elif y == 3 or y == 6: | ||
print("Today's mysteries of the Rosary are the Glorious Mysteries.") | ||
print("The Glorious Mysteries are:") | ||
print("1. The Resurrection") | ||
print("2. The Ascension") | ||
print("3. The Descent of the Holy Spirit at Pentecost") | ||
print("4. The Dormition of the Theotokos") | ||
print("5. The Crowing of the Theotokos as Queen of Heaven") | ||
elif y == 3: | ||
print("Today's mysteries of the Rosary are the Luminous Mysteries.") | ||
print("The Luminous Mysteries are:") | ||
print("1. The Baptism of Our Lord") | ||
print("2. The Wedding at Cana") | ||
print("3. The Preaching of the Gospel") | ||
print("4. The Transfiguration of Our Lord") | ||
print("5. The Institution of the Holy Eucharist") | ||
else: ##Input Validation | ||
print('Oops! Something went wrong with fetching the date.') |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
y isn't really defined?