# [Jelly], 80 bytes ḢfØDV‘2ị=”JƲ}¡o1 ɠ⁻⁶x8¤$пYœṣ”¶x5¤Ỵ€ Ḳ-ị¢Ḣw¥Ƈị@ÑKœṣḲṪ¹⁾1:;$f?”:Ʋ2ịwⱮØD;€”:¤œPƊḢḊ [Try it online!][TIO-lp8tjnn5] [Jelly]: https://github.com/DennisMitchell/jelly [TIO-lp8tjnn5]: https://tio.run/##pVjfixzHEX6fv6If/DgxupVtSSeMcxcJ@c6WZHRyRPzWs9O707qZ6U33zI32ICDlJeC8JPjFfggkjvISQiAiGAlBAicsyJ9x948oX1V1z@6ezjiQfZr@VV31VdVX1fvQ1PXyzZvT59/OXn194@dnj7@enL787Ydnj/@w//rZr07@5Lay//zx7MnLsyffPbp68vSdV787@fcvvv/q9MWfseXku0fvnzw9ffnPs1//LTt9/uwnOHryLWQNJ395/RsMfvrq95/wZiyevvjryYuzJ//a2r7@zuwjnN5@/YzuGs7@8XdcfR0yaPLk6fdfffb6Swg5ff7lmzf3K6PumEHdN6HTjWk75Waqw@Qntp2rfUwFtWuL2mT0o923XFiYWu1Mp86XtKlz6kBbnLytO5wcsG9re0vR3sK5wyRwblrjdWddSzP7JvRB/azyNnQ5rwdZuKGPbMkzWZzZKbyudPMuiZ2kkSrMXHdqL2g9va50W8pnnN7XU1fINH@m6b7UIaPZygZVeNNV3rTX1db2ZbVDe2k97v2s0h620@YvtNekyH3cqz2LzeKy7L0ZvGvkOv6M0zteNyT8PRZOo7TQ2FaXurjOuqRRXLyjdYDlIi4O4tKBrhvH@r7PImWcyeKuc8ek5T09rXQ0nudk@W5hSl7uu0oWeYYXM3gjGJL7geBAw3iO/cEOOoSz5eTmXJRx4GrXiMcq47GKw5WmG0zLewc7M7T6ubc60GVXxIh4TqTcc4XTEUv5TpgVVss0faXJoEnQVQE46GSOC3qB@2MExFEKAufTBfyZ8DmOWl0jYRkPxxMa1oxneJAUANbHUS36TAFxbA5JHCXCJVYuzsT127qFX02Qk2k0Rkfy/s7K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6lvSi/1ekyjZuejiWuDVWpr5yldKDBzSRTYlhuCGK49oM63W2RrS0sQWnh/96nyMnKKbSfqepIDOCbpbHFmZwoF3tUabEORmolwNp/X/D8V8JwTBWmrXasVZXGMdkm6ATixVBsHLH2sNhzSfwAzoP02wW5Sy5Y0LPShT4e7rRa/GA5prYUfgdFM7/kPJbVHhkQDPL5wkSocwG79aW5@iPOGRn3BMfFH6EN0oY2aNgQiWnSJZPdR/iG5TaMmwRo6/F19zYi/FDw@g1atDt28ygRmbI1nlsnSRiVk/oxXjwf/DE3K2qQmprpMVIzZLYlJHW0VUh/rO0mdVnj78Jqkan/y7//azi7038p5nd9l8 "Jelly – Try It Online" A full program that takes the pg10.txt file via STDIN and the required biblical reference as its only argument. TIO fails with the full document (presumably because the POST exceeds the maximum size), and the links to TIO on CGCC are even more limited because of length. However, it should work with the full text if run locally. ## Explanation ``` ḢfØDV‘2ị=”JƲ}¡o1 # Helper link 1: Takes a bible reference and returns which number book should be used that matches the textual part of the reference; half the code is to handle the John letters Ḣ # Head fØD # Keep only digits V # Evaluate (will be 0 if no digits) 2ị=”JƲ}¡ # If the second remaining character is a J: ‘ # - Increment by 1 o1 # Or 1 (replaces 0s with ones) ɠ⁻⁶x8¤$пYœṣ”¶x5¤Ỵ€ # Helper link 2: Called niladically, reads the bible from STDIN and splits up into books ɠ $п # Read lines from STDIN until the following is false: ⁻⁶x8¤ # - The read line is not equal to eight spaces Y # Join with newlines œṣ”¶x5¤ # Split at five consecutive newlines Ỵ€ # Split each book at newlines Ḳ-ị¢Ḣw¥Ƈị@ÑKœṣḲṪ¹⁾1:;$f?”:Ʋ2ịwⱮØD;€”:¤œPƊḢḊ # Main link: takes a bible reference as its argument and returns the verse Ḳ # Split at spaces -ị # Penultimate part (will be the last word of the book title) ¢Ḣw¥Ƈ # Keep those books (from helper link 2) where the first line contains this as a sublist ị@Ñ # Index into this using the result of calling helper link 1 on the original reference (so returning a single book) K # Join at spaces œṣ Ʋ # Split at the substring determined by calling following on the original reference: Ḳ # - Split at spaces Ṫ # - Tail (i.e. the verse or chapter:verse) f?”: # - If contains a colon: ¹ # - Leave as is ⁾1:;$ # - Else: prepend "1:" 2ị # Take the second part (i.e. the bit immediately after the chapter:verse reference) wⱮØD;€”:¤œPƊ # Find the position of every sublist that comprises of a digit followed by a colon ḢḊ # Take the first remaining part, and then remove the first character (which will be the space left just after the original chapter:verse marker) 💎 ``` Created with the help of [Luminespire](https://vyxal.github.io/Luminespire).