avendesora / pythonbible

A python library for validating, parsing, normalizing scripture references and retrieving scripture texts (for open source and public domain versions)
https://docs.python.bible
MIT License
58 stars 11 forks source link

No bible book abbreviations #90

Closed rswhiting closed 1 year ago

rswhiting commented 1 year ago

It would be very helpful if there was an easy way to utilize the bible book abbreviations. A simplified method would just have a direct dictionary, but there are several variants on each book (anywhere from 2-4 letter abbreviations). For example:

bible_book_abbreviations = {
    "Genesis": "Ge",
    "Exodus": "Ex",
    "Leviticus": "Le",
    "Numbers": "Nu",
    "Deuteronomy": "De",
    "Joshua": "Jos",
    "Judges": "Jg",
    "Ruth": "Ru",
    "1 Samuel": "1S",
    "2 Samuel": "2S",
    "1 Kings": "1K",
    "2 Kings": "2K",
    "1 Chronicles": "1Ch",
    "2 Chronicles": "2Ch",
    "Ezra": "Ez",
    "Nehemiah": "Ne",
    "Esther": "Es",
    "Job": "Job",
    "Psalms": "Ps",
    "Proverbs": "Pr",
    "Ecclesiastes": "Ec",
    "Song of Solomon": "So",
    "Song of Songs": "So",
    "Isaiah": "Is",
    "Jeremiah": "Je",
    "Lamentations": "La",
    "Ezekiel": "Ez",
    "Daniel": "Da",
    "Hosea": "Ho",
    "Joel": "Joe",
    "Amos": "Am",
    "Obadiah": "Ob",
    "Jonah": "Jon",
    "Micah": "Mic",
    "Nahum": "Na",
    "Habakkuk": "Hab",
    "Zephaniah": "Zep",
    "Haggai": "Hag",
    "Zechariah": "Zec",
    "Malachi": "Mal",
    "Matthew": "Mt",
    "Mark": "Mk",
    "Luke": "Lk",
    "John": "Jn",
    "Acts": "Ac",
    "Romans": "Ro",
    "1 Corinthians": "1Co",
    "2 Corinthians": "2Co",
    "Galatians": "Ga",
    "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": "Re"
}
avendesora commented 1 year ago

I agree that this would be useful. I'll keep it in mind for something to include in a future release. Not the next release, since the work on that one is pretty much done and just being tested, but possibly the next after that.

Thanks for the suggestion!