#doctrine-and-covenants Page 1 of 1 (8 posts) :: archive :: feeds

Old and New Testaments in JSON

Scriptures in JSON

The JSON versions of the Old and New Testaments are now available.

Also, I’ve compared all five standard works against the text on LDS.org and have fixed dozens of typos, a list of which you can see in the README changelog. (I had mistakenly assumed that my source text had been corrected, but that doesn’t seem to be the case.) None of the typos were doctrinal in nature — they’re all minor typographical fixes — but I recommend updating nonetheless.

Updated scriptures in JSON

There are now two new editions of the scriptures in JSON: flat and reference.

The flat edition is a flattened list of verses which makes it easier to iterate through the text for textual analysis and similar applications.

The reference edition structures the text so that it’s easily accessible via key: data['1 Nephi']['3']['7'], for example. (Thanks to Jon Faulkenberry for the recommendation.)

In the repo there are also the two Python scripts that I used to generate the new editions from the base edition.

Old and New Testaments are still forthcoming.

More scriptures in JSON

Scriptures in JSON

The JSON versions of the Doctrine & Covenants and the Pearl of Great Price are now available.

With the D&C, I opted to use section instead of chapter, which does mean a little inconsistency for scripts that use these JSON files, but it seemed better to be consistent with the source material.

With the Book of Abraham facsimiles in the Pearl of Great Price, I’m using the URLs to the images on LDS.org. (I don’t think I want to try to embed the images themselves.)

Old and New Testaments forthcoming.

Scriptures in Word

At someone’s request, I recently put together Microsoft Word editions of the LDS standard works, for use as study aids. (The person who requested it is using Word to highlight, annotate, and add footnotes/endnotes.) Verse numbers are included.

Process (for the curious)

I downloaded an SQLite version of the scriptures and wrote a Python script to extract the text in the right order, with markers for the headings. I then copied and pasted the whole thing into Word.

In Word, I did some wildcard-based find-and-replacing to remove the heading markers and apply the appropriate styles, and then I added a hanging indent so the verse numbers are less obtrusive.

Doctrine and Covenants reader’s edition

My new reader’s edition of the Doctrine and Covenants is now up and ready for download (PDF and EPUB).

Basically, I’ve taken the text of the D&C, stripped out all the verse numbers, reparagraphed the text, reorganized the sections chronologically (I only had to move a handful of sections), gave each section a name (based loosely on Dane Laverty’s post, but I think I only kept around 10% of his titles), and pulled the date and place of each revelation up to make them more visible.

This also marks the release of my first EPUB. I’d thought about exporting straight from InDesign, but I’m a do-it-myself kind of a guy (at least at first), so I handcrafted this one. The process: I exported the text from InDesign to a plain text file (before I did copyfitting), then used Vim and some regular expressions to put a marker in between each section. I couldn’t figure out how to split the sections into individual files from Vim, so I wrote an awk script that did it for me, then wrote a Python script to take each text file and put it into an HTML file formatted the way I wanted it. And there were a few other scripts I wrote to generate various parts of the EPUB. All in all, not too bad, though I wish EPUB readers like Stanza would give me at least a little more control over formatting. (None of my CSS worked. Sigh.)

I should add that I’ve tested the EPUB in Stanza on my iPhone and in iBooks on my iPad and it works fine in both places. Let me know if it doesn’t work on your reader (or if it looks weird).

D&C reader’s edition: sneak peek

I’ve been working on a reader’s edition of the Doctrine & Covenants for the past month and figured I’d give y’all a sneak peek at how it’s coming:

D&C Sneak Peek

I’m currently about a fourth of the way through reparagraphing the text and hope to have everything done by the end of the year.

The book will be available as a free PDF, and you’ll also be able to order a hardcover or paperback edition through Lulu.