King James Bible Wiki

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.

Great work! I love the organization of this.

I’m wondering if there’s an easy tweak to remove the verse and/or chapter number notations for someone who just wants to read the text in each book without it being broken up by numbers. Would that be a simple change to a template, and where would that be located?

Your work really makes me think about the importance of considering how a project should be organized before you even begin. This is so elegant. One day I will be like that. One day.

1 Like

It’s easy enough to suppress the verse numbers, or style them however you like.

Add a tiddler with tag $:/tags/Stylesheet and content:

.verse-number  {visibility:hidden;}

(To figure out what css class is being applied to something you want to suppress or style differently, the browser’s inspect tool can be really helpful.)

1 Like

Yes. Let’s look at verse numbers first. By far the simplest way of hiding them would be to use CSS, adding

.verse-number {display: none;}

But this will leave some odd spacing artifacts.1

Instead we can change the templates easily enough. Chapters are handled by $:/_/bible/templates/chapter, which then delegates to a specific template for Psalms, $:/_/bible/templates/psalms, and a more general-purpose one for everything else, $:/_/bible/templates/most-books.

We can fix them by removing the related markup from both:

<$eventcatcher selector="a" $click=<<open-verse>>  tag="div" class="chapter" >
<$set name=verses filter="[<currentTiddler>tagging[]tag[Verse]]">
<$list filter="[enlist<verses>get[para]unique[]nsort[]]" variable="thisPara">
  <p><$list filter="[enlist<verses>para<thisPara>sort[seq]]">
    <span class="verse">
      <sup class="verse-number">
        <a class="tc-tiddlylink" data-verse=<<currentTiddler>> href=`#$(currentTiddler)$`>{{!!verse}}</a>
      </sup>&nbsp;<span class="text">{{!!text}} </span>
    </span>
  </$list></p>
</$list>
</$set>
</$eventcatcher>

This looks fine in the rest of the chapters, but it removes the indentation of the Psalms and looks wrong. I would add some CSS for this:

.chapter.poetry p {text-indent: 1em;}

The chapter headers are in the template $:/_/bible/templates/book, and you could just remove this line:

<h2><$link><<header>> {{!!chapter}}</$link></h2>

But I think we’d still want the chapter headers for Psalms, so I think it’s better to replace this:

<$let header={{{ [<currentTiddler>book[Psalms]then[Psalm]else[Chapter]] }}} >
<h2><$link><<header>> {{!!chapter}}</$link></h2>
<$transclude $tiddler="$:/_/bible/templates/chapter" />
</$let>

with this:

<% if [<currentTiddler>book[Psalms]] %>
<h2><$link>Psalm {{!!chapter}}</$link></h2>
<% endif %>
<$transclude $tiddler="$:/_/bible/templates/chapter" />

There’s one more thing we’ve sort of broken in this: The inscriptions above many psalms have an indent they probably shouldn’t. So we can add text-indent: 0; to the p.inscription rule.

To do all that, you can download the following and drag it to the wiki. Once you import, you should see everything looking reasonably good:

HideChapterAndVerseNumbers.json (2.1 KB)

An interesting alternative would be to add a toggle to the sidebar that lets you switch this behavior as you like. I leave that to you, however.

Finally, I just have to quote from an earlier post. This is what I would really like to do:

And now that I think of a toggle button, I would love to do so for this gutter too, if I even spend time on such a change.


1 Also, I see Springer has beaten me to this suggestion. visibility: hidden is an interesting alternative. It leaves all the space where verse numbers had been, which lets you know where the verses start and end, without inserting the actual numbers.

1 Like

Very nice, thank you! There are some good lessons here for me to learn. I will play around with this.