Skip to content

Instantly share code, notes, and snippets.

@sosukeinu
Created March 12, 2014 18:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sosukeinu/8c3933f37ee835ced052 to your computer and use it in GitHub Desktop.
Save sosukeinu/8c3933f37ee835ced052 to your computer and use it in GitHub Desktop.
YouVersion iOS App link generator
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