-
-
Save sosukeinu/8c3933f37ee835ced052 to your computer and use it in GitHub Desktop.
YouVersion iOS App link generator
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
import sys | |
book = raw_input("Please enter the book: ") | |
chapter = input("Please enter the chapter: ") | |
lowverse = input("Please enter the first verse: ") | |
highverse = input("Please enter the last verse: ") | |
if book in ['Matthew', 'matthew', 'MATT', 'matt', 'MA', 'ma', 'MT', 'mt']: | |
book = 'MAT' | |
elif book in ['Mark', 'mark', 'MRK', 'mrk', 'MK', 'mk']: | |
book = 'MRK' | |
elif book in ['Luke', 'luke', 'LUK', 'luk', 'LU', 'lu', 'LK', 'lk']: | |
book = 'LUK' | |
elif book in ['John', 'john', 'JHN', 'jhn', 'JN', 'jn']: | |
book = 'JHN' | |
verselist = []; | |
if lowverse < highverse: | |
while lowverse < highverse : | |
if 'count' in locals(): | |
incremnum = 1 | |
else: | |
incremnum = 0 | |
lowverse = lowverse + incremnum | |
i = book + "." + str(chapter) + "." + str(lowverse) | |
verselist.append(i) | |
count = 1 | |
verselink = "youversion://bible?reference=" + '+'.join(map(str, verselist)) | |
sys.stdout.write(verselink) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment