King James Bible Wiki

I’ve created a new version.

The new wiki is at

http://scott.sauyet.com/Tiddlywiki/Demo/KingJamesBible/v3/

Supporting material is in:

http://scott.sauyet.com/Tiddlywiki/Demo/KingJamesBible/v3//sources

and the code that generates the tiddlers from their raw form is at:

http://link.sauyet.com/kjv3.

(I may look to move this to GitHub Pages for future releases; I haven’t decided.)

There are two changes.

First, I fix the problem with what seemed to me an inappropriately written template, as described in #10170. I’m no longer generating wikitext from my templates and then calling wikify on it.

Second, I add hooks for CSS styling. Now the generated HTML for a chapter looks something like this:

<div class="chapter">
<!--        ^^^^^^^^                     -->
  <p>
    <span class="verse">
<!--             ^^^^^                   -->
      <sup class="verse-number"><a class="tc-tiddlylink tc-tiddlylink-resolves" href="#Genesis%201%3A1">1</a></sup>
<!--v             ^^^^^^^^^^^^           -->
      <span class="text">In the beginning God created the heaven and the earth.</span>
<!--               ^^^^                  -->
    </span>
  
    <span class="verse">
      <sup class="verse-number"><a class="tc-tiddlylink tc-tiddlylink-resolves" href="#Genesis%201%3A2">2</a></sup>
      <span class="text">And the earth was without form, and void; and darkness <em>was</em> upon the face of the deep. And the Spirit of God moved upon the face of the waters.</span>
    </span> 
  </p>

  <p>
    <span class="verse">
      <sup class="verse-number"><a class="tc-tiddlylink tc-tiddlylink-resolves" href="#Genesis%201%3A3">3</a></sup>
      <span class="text">And God said, Let there be light: and there was light.</span>
    </span>
  
    <span class="verse">
      <sup class="verse-number"><a class="tc-tiddlylink tc-tiddlylink-resolves" href="#Genesis%201%3A4">4</a></sup>
      <span class="text">And God saw the light, that <em>it was</em> good: and God divided the light from the darkness.</span>
    </span>
  
    <span class="verse">
      <sup class="verse-number"><a class="tc-tiddlylink tc-tiddlylink-resolves" href="#Genesis%201%3A5">5</a></sup>
      <span class="text">And God called the light Day, and the darkness he called Night. And the evening and the morning were the first day.</span>
    </span>
  </p>
  <!--  ...  -->
</div>

Now on to get better templates for verses and books!

3 Likes

Actually, reflecting on you potential reasons here for tucking the text into a more obscure field (even though I continue to discourage that approach) … perhaps there should be some way in which all the actual KJV text content should live in shadow tiddlers… so that if someone accidentally mangles a verse in edit mode (or starts adding their commentary inline, bypassing the notes field), or deletes a chapter tiddler, etc. the solution recovers very easily.

I don’t understand the technical details of how shadows work, especially when you would not want the core content bogged down with system-name-space complexity… but worth checking into, perhaps?

If someone does want to mess with the text field of a verse (say, to make what they consider a translation correction), then this kind of edit should count as something like overwriting a shadow, no?

[@Scott_Sauyet , I initially posted this comment at your other thread, but I just moved it here, since it’s really not about that nested transclusion topic, but rather about best practice for a text that has a not-really-user-editable archival character.)

Two more thoughts about notes and user markup (for this and any other text has canonical version, and that is heavily commented):

It might make sense not to put the notes in a verse-specific (or chapter-specific) tiddler within a notes field.

Multiple reasons:

(1) Notes may correspond to a range (such as the set of verses corresponding to a paragraph — and you don’t have tiddlers for paragraph, though you could…), and may also be comparative in less local ways. Instead of a “compare to [[link here]] passage” located at one tiddler, a thematic "look at differences among [[this]] and [[that]] and [[the other]]" would not be tied to any one of them, but would be displayed on a view template that looks for backlinks (or the notes tiddlers have a field for verse details, etc.)

(2) relating to the shadow-tiddler issue: restoring-to-shadow would delete notes, but you might want something like a restore-kjv-content-to-shadow to be available without losing user notes.

Another thought: this is a case where some tool for semantic highlighting might really be in demand. How to store the highlighting info, toggle display on and off, assign colors and other style info, and make something like a user-configurable semantic key for the various classes involved…? Highlights, like textual notes, may ultimately deserve their own tiddler with metadata (highlighted when, by what user, with what semantic class…)

This also might be a case where something like the keywords plugin — that holds the keywords outside of the target tiddlers (sorry I can’t find it here) — would be a natural fit.

Of course, @Scott_Sauyet, this shouldn’t turn into a “no good deed goes unpunished” adventure… You might not want to tackle any of this yourself! But thinking about a showcase edition, it strikes me that there are many texts (including some in my academic field) that attract close reading, where your KJV project can illustrate best design practices for holding canonical content alongside user marks/notes.

Especially ambitious reach for future project embellishment: canonical text structural tiddlers can toggle display between different translations, or show them side by side. :open_mouth:

@Scott_Sauyet - I’m not sure which of your “bible wiki” threads to post this is so I’m posting it here as it seems to be the most general one.

I just wanted to share a cool scrolling feature here (i.e the solution there by Timani Afif). I’m thinking that the reader of such a huge text would benefit from seeing a “hierarchical position” where he’s at, by “stacking” the heading levels like illustrated there.

Just an idea.

1 Like

I haven’t decided whether I want to do that or not, but I can do so easily enough.

This is not a wiki for me; my Christian days were long ago. Ideally it’s not much of a wiki itself. I want it to work well enough as a readable bible. But I want the Verse, Chapter, and Book tiddlers to be as useful as possible for users to build their own Bible-related tools. And I would like to get it to the point where the same techniques could work for other translations of the Bible.

I do understand this reasonably well. You don’t need system-name-space in plugins; any old titles work. My Periodic Table demo keeps the Element and Compound tiddlers in plugins (hence as shadow tiddlers) and they have names like Nickel and Aspirin But they have no text fields, so I don’t know how searchable they are, if at all. The answer to that may help me decide whether to extract plugins here.

Agreed. But I’m not going to try to take this that far, at least for the moment. And the same with the semantic highlighting. I think both would be useful, and I might want to create a wiki incorporating those ideas, if for no other reason then as a learning exercise. I would hope this could be the basis for that. But I only want it to be the basis.

I do that to myself all the time. I don’t need you piling on, Springer! :laughing: 1

That could be very powerful. I think for the current text, we’d probably have to limit it to a single Biblical Book. The whole Bible might be too large. Or perhaps this would be a good candidate for Jeremy’s MWS.


1 I really, really hope that came through as the joke it was meant to be.

Yes, this is the general one. The other two were for specific questions to help with what’s under discussion here. From my perspective, one is finished, and the other will be as soon as I can post a new version and a wrap-up thread.

That is very cool. I’ve never seen such a simple web demo of that idea, although my code editor, VSCode, is doing that now for nested contexts. I could also imagine a single sticky header that shows the hierarchy as breadcrumbs. That might be harder to do, though; I’ve never tried to work with scroll behavior in TW.

This is all in the later-if-ever category for me, though. I just want the basics working well at the moment.

Thank you very much!

1 Like

With a great deal of help from much of the TW braintrust in #10177, I have created a new version that allows you to read entire books of the Bible in one tiddler. The new version is at

http://fourwindssoft.com/scott/Tiddlywiki/Demo/KingJamesBible/v4/

The supporting material is there as well, in /sources, but nothing there only a little has changed this version.

I have one more thing I really want to do before I call it done for now: Psalms needs distinct formatting. The paragraph layout from the other chapters simply doesn’t cut it. Moreover there is some missing Psalm metadata (the inscriptions above them in most versions) that I will need to source from elsewhere.

Are there other features/fixes you think it really should have to serve as a baseline wiki? Keep in mind that my goal is to have something others can build off of. I’m not trying to create the definitive Bible wiki. Are there other things that would really help in that endeavor?

Cool stuff!

I (like you, it seems) am just generally intrigued by the idea to be able to do this so I’m thinking there are many other texts that would also benefit from this treatment; obvious examples would be other holy books but also “the law” (for all jurisdictions of the world, so that’s probably even more than holy books), and there are probably encyclopedias that are very hierarchical, etc, etc. Maybe the Odessey and the Iliad? My point is, apropos “something others can build off of”, that if it somehow was an “engine” that people feed their long texts and specify their various markers for chapters/paragraphs/headings/whatever, then it would be a generally useful tool based on TW. Just an idea.

Regardless, cool stuff!

That’s very interesting. I certainly hadn’t conceived of it that way at all, but I do see the possibilities. It would probably not involve any shared code from this wiki, but might have some significant shared ideas.

For years I’ve been contemplating having a go at the Connecticut General Statutes, which have a hot mess of gigantic HTML files, cross-linked all over the place in a hierarchy of Volume > Title > Chapter > Section. Besides their main text, sections usually have metadata such as sources, references, history, annotations, and cross-reference, denoted chiefly by text color! The main text can be broken up into subsections, paragraphs, (nested) list items. and more. I’ve thought of many ways to present this information better. A few times I’ve actually started, but I get stymied every time by the initial extraction of the basic information. These days, I keep contemplating it, thinking of course of using TW to do it. But this would be much more complex than the Bible, and probably a lot larger. (I think the 13 Volumes initially referred to physical bound volumes, none of them small.

That could use a lot of the same discipline that has gone into this King James wiki Who knows? Maybe one day I’ll pick it up again.

In any case, that’s some tasty food for thought. Thanks for sharing!

2 Likes

Just for yuks, given the question by @Deniz, I copied your KJV wiki, added the freelinks plugin, and a view template like this:

<<list-links filter:"[tag[Verse]] :filter[search<storyTiddler>]">>

I then specified, in freelinks settings, that there should be freelinks pointing to any tiddler title where the tiddler is tagged “theme”.

I proceeded to make tiddlers (tagged “theme”) with titles like judgment, forgiveness, damnation, glory, satan, rejoice, Lord… And a user with serious interest in these themes could use the text field of that tiddler to reflect on connections or confusions, etc. But just the extra view template made these “theme” tiddlers into informative hubs.

Performance was not as slow as I feared! Certainly it was slower than without freelinks, and when freelinks was first loaded (before I tweaked settings) it was very sluggish. With the narrower conditions, freelinks was usable.

I see freelinks as an especially relevant tool for a canonical text, because you really don’t want to be altering the text itself to add hard links.

The list-links view template, combined with freelinks, has a nice combined effect: you can make a tiddler for any string, immediately see links to each verse that contains the title string, and then — if you click the link — you see your string of interest (plus any others that you’ve tagged as “theme”) nicely highlighted with a link to the theme’s “hub” tiddler.

(At this point, the view template searches for the string only as a literal string (whether or not it’s a whole word) and there’s no wider net for variations on the word. Meanwhile freelinks works only on whole-word appearances of the string, which means a verse mentioning “meekness” renders without any freelink to “meek” even though the “meek” theme tiddler offers links in the other direction, etc. A more thorough solution would try to address all this. But my interest here was simply to get a reality check on how freelinks performs with a text-heavy wiki like this one.)

2 Likes

Fascinating! I look forward to try it out… when I get a minute free. Getting back involved in electoral politics during a presidential election year is time- consuming.

While I’m sure I could follow your steps above, I’ve never used Freelinks. Is this something you can post somewhere?

It’s one of the official plugins! Just find it where you find good ruston(-et-al)-vetted stuff like BibTex, CodeMirror, Comments, Internals, MenuBar…, and now the Tour and Confetti plugins:

:slight_smile:

Sorry. The bit about Freelinks was simply that I hadn’t used it, so following your steps might take a bit more work. I was hoping you could post your Bible version, not Freelinks.

But mostly I was trying to avoid doing any more work during my busy evening. I’ll try it myself when I can.

Oops :rofl: Here’s a version hastily uploaded to tiddlyhost: https://minimalist-test-mode.tiddlyhost.com/

2 Likes

Thank you so much @Scott_Sauyet for your bible and @Springer for this very nice addition making this bible TW so much more useful.
This has been a very interesting thread, so much to learn from. I love it.

2 Likes

New Version

I have created a new version, mostly to handle the unique structure of Psalms. It’s at

http://fourwindssoft.com/scott/Tiddlywiki/Demo/KingJamesBible/v5/

The sources are at

http://fourwindssoft.com/scott/Tiddlywiki/Demo/KingJamesBible/v5/sources

Feature Complete

At this point, I consider this basically feature complete. While I’d love to hear suggestions for ways to make the implementation more robust, more performant, more logical, etc., I won’t be adding features soon. I will probably work on creating a better source JSON document. What I started with was great, but it’s not structured in a way I’d like to work with. That will only affect my conversion script, and not the wiki itself. That might also let me easily make an alternate version suggested by @TW_Tones in #10177/30 et. seq.. If so, I might at some point play around with that alternative approach to see which is more flexible and which is more maintainable.

At the bottom, I will discuss some potential work built atop this.

Differences in Psalms

You can easily see the visual difference between the old version (and specifically Psalm 119) the new one (again, Psalm 119).

Psalms has a number of differences from the other chapters:

  • The paragraph structure from other chapters is ignored here, even though such information is in my original source. Instead each verse is its own stand-alone line.
  • The lines are almost universally formatted more narrowly as to evoke thoughts of poetry, not prose.
  • In my original source document, in all other chapters, square brackets represent [italics]which my script converts to //italics//, but in Psalms they appear appear literally in the text.
  • More than 75% of the Psalms have an inscription, an epitaph, that’s not part of the verses.
  • Psalm 119 is broken into what we might call stanzas, each titled with a letter of the Hebrew alphabet.
  • There is a little-noted grouping of the Psalms into “Book I”, “Book II”, … “Book V”. It typically just shows up as a header on the first psalm in the group.

Implementation

The inscriptions are the biggest challenge. My original source includes them within the first verse of the relevant psalm, with no delineation. To fix this, I manually made an updated version of the raw data, Enhanced-KJV.json, adding a pipe (|) delimiter between the inscription and the actual verse text

    {
      "book_name": "Psalms",
      "book": 19,
      "chapter": 16,
      "verse": 1,
      "text": "\u00b6 Michtam of David.|Preserve me, O God: for in thee do I put my trust."
      /*                               ^--- right here                                    */             
    },

and updated my conversion script to generate these:

{
    "title": "Psalms 16",
    "tags": "Chapter [[Psalms]]",
    "book": "Psalms",
    "chapter": "16",
    "inscription": "Michtam of David.",
/*  \_______________________________/------- added */
    "psalm-section": "Book I",
    "seq": "14606"
  },
  {
    "title": "Psalms 16:1",
    "tags": "Verse [[Psalms 16]]",
    "book": "Psalms",
    "chapter": "16",
    "verse": "1",
    "text": "Preserve me, O God: for in thee do I put my trust.",
     /*     \__________________________________________________/----- reduced  */
    "seq": "14607",
    "para": "1"
  },

Then I separated $:/_/bible/templates/chapter into three parts: the general wrapper and the specific handlers $:/_/bible/templates/psalms and $:/_/bible/templates/most-books. The handler for Psalms can now manage the additional formatting and the presentation of inscriptions.

The conversion script also skipped the italic handling for Psalms. That was trivial to solve.

For the “Book I” … “Book V”, you can see a psalm-section field in the Chapter tiddler of the previous example. I created this while I processed the original source using some JS that just hard-codes the ranges:

const getPsalmBook = ((books) => (book) => books.find(({end}) => book < end).title)([
  {title: 'Book I', end: 41},
  {title: 'Book II', end: 72},
  {title: 'Book III', end: 89},
  {title: 'Book IV', end: 106},
  {title: 'Book V', end: 150},
])

(You don’t need any real knowledge of JS to see that I’ve simply associated the "Book"s with the final verse of each one.)

Finally, to handle the stanzas for Psalm 119, I added to the enhanced JSON: a “preface” tag to each verse that starts a new stanza—and I don’t know if “stanza” is what biblical scholars actually call these!—with the text that appears above: a spelled-out Hebrew letter.

To display these changes, I needed to add a stylesheet. I’d been hoping to avoid creating one. I want this wiki to be as minimal as possible. But I couldn’t see a way around it, and at least it’s still small:

.chapter.poetry {
  p {margin: .1em 1em; width: 25em;}
  p.stanza {margin: 2em 0 1em; font-weight: 500;}
  p.inscription {background: #f0f0f0; padding: .25em;}
}

Additional Fixes

There are two other minor fixes included here, ones recommended by @saqimtiaz in a separate thread.

Future Work

A number of people have suggested directions this could go. My core idea here is to collect the biblical text in a way that it can be reused. The wiki itself is meant to be a baseline that users of that textual data could either build upon or ignore entirely. So below I discuss some of the things I’d like to do, but the main point is what other users might like to try.

I’m especially intrigued by suggestions from Springer about handling “theme” metadata, and about abstracting the notions here to handle other sorts of text that inspire close exegesis. I definitely would love to see a version that has a robust commentary feature, with a many-to-many relationship between commentaries and Books/Chapters/Verses, and possibly even a meta-commentary or layered-commentary.

While this started with the King James Version, I’ve hoped all along that other translations could be handled easily. And I think they will be except for the metadata I had to add here to handle Psalms. That should be most an annoyance, though. If you have to edit the inscriptions of 116 of the Psalms, but everything else comes along for free, I think it’s still a win.

I’d like to investigate the pros and cons of moving the textual data to a plugin, making it easy to recover from overlaying the biblical text with our own. I would need to figure out how to do this without breaking the default search. I expect that wouldn’t be too hard, but I’ve never tried enhancing that.

There is one very specific layout change I would love to try. But it’s not one I’ve ever done or even seen done, and I’m not quite sure how to approach it. In the current version, the superscripted verse-number links preceding the verses are the best I could come up with quickly. But I find them a bit of an annoyance. I would love it if instead the text was clean, with no verse numbers in sight. But in a gutter to the left (or the right) of the text, lined up with the start of each verse, are those links. If you click on one, you open the corresponding verse tiddler. But if you hover, you highlight the verse, and maybe have a visible title somewhere so that when you hover, say, "7" you get the full path: "1 John 4:7".

And there’s so much more. How would you see this expanding?

1 Like

I have done some work on a similar approach for tw doco and annotations. Perhaps when you start a related thread mention me?

Basically putting the content in shadows and the annotations in edited versions.

I would also like to develop some related tweaks.

You mean storing to content in a plugin? That’s the easy part for me.

Will do. No idea if I’ll ever get to this though.

My big concern is the built-in searching, which works wonderfully right now. I would have to figure out how to include all my content shadow tiddlers in the search. I haven’t tried, and maybe it will be trivial. That’s my only concern about doing this, though. If I can get that to work, I think it would be a nice improvement.

Could you elaborate?

That is the problem I looked into. First you can simply modify the default search to include shadows, or even just the shadows in your data tiddler. However your own filters will need modifying as well.

  • I do have complementary approach but it possibly belongs in another thread.

Sorry folks. I broke something, and none of the wikis or source material are showing up on my website right now. While I figure out how to recover that, I have temporarily (?) copied the latest version to

https://crosseye.github.io/TW5-KJV/v5/

I hope to recover the other versions soon.

All fixed! We return you to your regularly scheduled wikying.