Last active
June 3, 2024 20:14
-
-
Save danott/615135 to your computer and use it in GitHub Desktop.
YouVersion.com URL Abbreviations
This file contains hidden or 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
/*! | |
* youversion_abbreviations.js | |
* JSON of YouVersion.com Bible Book URL Abbreviations. | |
*/ | |
var books = { | |
'gen': 'Genesis', | |
'exo': 'Exodus', | |
'lev': 'Leviticus', | |
'num': 'Numbers', | |
'deu': 'Deuteronomy', | |
'jos': 'Joshua', | |
'jdg': 'Judges', | |
'rut': 'Ruth', | |
'1sa': '1 Samuel', | |
'2sa': '2 Samuel', | |
'1ki': '1 Kings', | |
'2ki': '2 Kings', | |
'1ch': '1 Chronicles', | |
'2ch': '2 Chronicles', | |
'ezr': 'Ezra', | |
'neh': 'Nehemiah', | |
'est': 'Esther', | |
'job': 'Job', | |
'psa': 'Psalm', | |
'pro': 'Proverbs', | |
'ecc': 'Ecclesiastes', | |
'sng': 'Song of Solomon', | |
'isa': 'Isaiah', | |
'jer': 'Jeremiah', | |
'lam': 'Lamentations', | |
'ezk': 'Ezekiel', | |
'dan': 'Daniel', | |
'hos': 'Hosea', | |
'jol': 'Joel', | |
'amo': 'Amos', | |
'oba': 'Obadiah', | |
'jon': 'Jonah', | |
'mic': 'Micah', | |
'nam': 'Nahum', | |
'hab': 'Habakkuk', | |
'zep': 'Zephaniah', | |
'hag': 'Haggai', | |
'zec': 'Zechariah', | |
'mal': 'Malachi', | |
'mat': 'Matthew', | |
'mrk': 'Mark', | |
'lke': 'Luke', | |
'jhn': 'John', | |
'act': 'Acts', | |
'rom': 'Romans', | |
'1co': '1 Corinthians', | |
'2co': '2 Corinthians', | |
'gal': 'Galatians', | |
'eph': 'Ephesians', | |
'php': 'Philippians', | |
'col': 'Colossians', | |
'1th': '1 Thessalonians', | |
'2th': '2 Thessalonians', | |
'1ti': '1 Timothy', | |
'2ti': '2 Timothy', | |
'tit': 'Titus', | |
'phm': 'Philemon', | |
'heb': 'Hebrews', | |
'jas': 'James', | |
'1pe': '1 Peter', | |
'2pe': '2 Peter', | |
'1jn': '1 John', | |
'2jn': '2 John', | |
'3jn': '3 John', | |
'jud': 'Jude', | |
'rev': 'Revelation' | |
} |
Thanks for the info @wsurles, I've updated the file appropriately. (And changed it to JSON, as that has more use cases)
The Luke abbreviation is now 'luk'.
Thanks for your work!
I wrote script to fetch the abbreviations from Bible.com in case they've changed again. This needs to be run from a browser developer console with a bible.com page loaded. You have to specify the Bible version. I doubt the abbreviations are different per version but they could be in theory.
There is an official api available as well: https://scripture.api.bible/
async function fetchAbbreviations(versionCode) {
try {
const response = await fetch(`https://www.bible.com/api/bible/version/${versionCode}`);
if (!response.ok) {
throw new Error('Network response was not ok');
}
const data = await response.json();
const abbreviations = {};
data.books.forEach(b => {
abbreviations[b.usfm] = b.human;
})
console.log(JSON.stringify(abbreviations, null, 4));
} catch (error) {
console.error(error);
}
}
let versionCodes = {
LSB: 3345,
ESV: 59,
KJV: 547,
};
fetchAbbreviations(versionCodes.LSB);
var books =
{
"GEN": "Genesis",
"EXO": "Exodus",
"LEV": "Leviticus",
"NUM": "Numbers",
"DEU": "Deuteronomy",
"JOS": "Joshua",
"JDG": "Judges",
"RUT": "Ruth",
"1SA": "1 Samuel",
"2SA": "2 Samuel",
"1KI": "1 Kings",
"2KI": "2 Kings",
"1CH": "1 Chronicles",
"2CH": "2 Chronicles",
"EZR": "Ezra",
"NEH": "Nehemiah",
"EST": "Esther",
"JOB": "Job",
"PSA": "Psalm",
"PRO": "Proverbs",
"ECC": "Ecclesiastes",
"SNG": "Song of Songs",
"ISA": "Isaiah",
"JER": "Jeremiah",
"LAM": "Lamentations",
"EZK": "Ezekiel",
"DAN": "Daniel",
"HOS": "Hosea",
"JOL": "Joel",
"AMO": "Amos",
"OBA": "Obadiah",
"JON": "Jonah",
"MIC": "Micah",
"NAM": "Nahum",
"HAB": "Habakkuk",
"ZEP": "Zephaniah",
"HAG": "Haggai",
"ZEC": "Zechariah",
"MAL": "Malachi",
"MAT": "Matthew",
"MRK": "Mark",
"LUK": "Luke",
"JHN": "John",
"ACT": "Acts",
"ROM": "Romans",
"1CO": "1 Corinthians",
"2CO": "2 Corinthians",
"GAL": "Galatians",
"EPH": "Ephesians",
"PHP": "Philippians",
"COL": "Colossians",
"1TH": "1 Thessalonians",
"2TH": "2 Thessalonians",
"1TI": "1 Timothy",
"2TI": "2 Timothy",
"TIT": "Titus",
"PHM": "Philemon",
"HEB": "Hebrews",
"JAS": "James",
"1PE": "1 Peter",
"2PE": "2 Peter",
"1JN": "1 John",
"2JN": "2 John",
"3JN": "3 John",
"JUD": "Jude",
"REV": "Revelation"
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I searched for youversion url book abbreviations this was the top hit. But this is two years old. The new app (as of 2013-04-24) has the following abbreviations:
Genesis,gen
Exodus,exo
Leviticus,lev
Numbers,num
Deuteronomy,deu
Joshua,jos
Judges,jdg
Ruth,rut
1 Samuel,1sa
2 Samuel,2sa
1 Kings,1ki
2 Kings,2ki
1 Chronicles,1ch
2 Chronicles,2ch
Ezra,ezr
Nehemiah,neh
Esther,est
Job,job
Psalm,psa
Proverbs,pro
Ecclesiastes,ecc
Song of Solomon,sng
Isaiah,isa
Jeremiah,jer
Lamentations,lam
Ezekiel,ezk
Daniel,dan
Hosea,hos
Joel,jol
Amos,amo
Obadiah,oba
Jonah,jon
Micah,mic
Nahum,nam
Habakkuk,hab
Zephaniah,zep
Haggai,hag
Zechariah,zec
Malachi,mal
Matthew,mat
Mark,mrk
Luke,lke
John,jhn
Acts,act
Romans,rom
1 Corinthians,1co
2 Corinthians,2co
Galatians,gal
Ephesians,eph
Philippians,php
Colossians,col
1 Thessalonians,1th
2 Thessalonians,2th
1 Timothy,1ti
2 Timothy,2ti
Titus,tit
Philemon,phm
Hebrews,heb
James,jas
1 Peter,1pe
2 Peter,2pe
1 John,1jn
2 John,2jn
3 John,3jn
Jude,jud
Revelation,rev