Oh, good point. One minute, let me adjust.
Discussion
Okay, updated. What do you think?
Colons in titles aren't really a problem, as the tags are all formulated like d-tags, but I like using pipe to separate out the optional stuff.
Trying to keep chapter and verse notation Biblical, as lots of people are familiar with that.
https://wikistr.imwald.eu/nkbip-08*645eb808ac7689f08b5143fbe7aa7289baad2e3bf069c81d2a22a0d3b3589c18
hyphens are also characters used in book titles a lot. the space replacement should be underscores, which are not. i think that the spaces aren't a problem because of the separator character, and the spaces technically are part of the title, and that's how users will write them. it seems burdensome to me.
I could allow the alternative of using quotations, instead of hyphens.
`book:: Bible | "Song of Solomon" 5:1 | KJV`
`book:: "2 Ezra" preface:2-21`
`book:: "Wuthering Heights" "Ch XI":Preamble-8`
The books and chapters in the DRB have prefaces and preambles, not only verses.
that's not a big addition of complexity to parsing that field, seems reasonable.
yeah, not sure, not often appearing in titles but then you can escape them. familiar to json but not really exactly familiar to wikilinks. most wikilinks refer to URLs so they are without spaces but ... well, idk, it really depends. the point i'm making is that the [[]] and the | separators serve as anchors for segmenting and parsing the text, so spaces are bounded within it already. writing a scan through text for this is simple, first you look for [[ then once you find that you are looking for ]]. if you hit the end of the event } then nothing was found.
i really see no reason to not make it as human friendly as possible that what someone would write off the top of their head is likely in the tags as the "proper" version.
it needs a special parser. we aren't bound by the limitations of JSON. what's more important is we are bound by the lowest common denominator of the user interested in attempting to craft a valid reference token.
You have to remember that there is also a human-readable "title" tag. These are only for the macro and can be rendered prettily, for the reader.
For instance, I get rid of all hyphens in the "T" tag and display it as Title Case.
So `["T", "song-of-solomon"]` is displayed as "Song of Solomon".
so they have the () section after with human readable then?
anyway, i spotted another issue, the syntax for multiple references. i don't think you should support multiple books because that turns the data structure into a tree (each book is a branche of it, and thus how do you disambiguate the chapter/verse references)
Sections, chapters, and publications all have their own "title" tag. Completely separate to the macro tags, which are designed to machine-readable.
I handle various sorts of human-friendly formats, client-side. You can use commas between versions, for instance, instead of, or in addition to spaces.
well, it's your baby i guess. but i won't like it so much if it isn't something that I as a computer programmer requires as much thinking as writing valid JSON.
'g/isn't/is'
Most humans would stick to stuff like
`book:: 1 John 2:7-12 | KJV`
I recognize and render Bible books, Quran, and some others without hyphens or quotations. A number preceding letters is concatenated to a title. Anything that is " number:number-number" can be assumed to be chapter-number:versebeginning-verseending. And there are typical keywords like "preface" or "appendix", that can be identified. I also work with plural or singular and stuff like "Ch" "Ch." "Chapter" and Roman numerals. I can add that to the spec, as a hint to later parser-writers.
Anything more complex is probably auto-generated or written by an expert.
Another easy one is
`book:: Tale of Two Cities 8: Intro-3`
It's obvious that they mean
`book::tale-of-two-cities 8:introduction-3`
I split it up into one entry for each, for rendering or searching.
That's very human-friendly, as you can clearly denote a group of literary excerpts, that are meant to be clustered and displayed together. It's very common, with religious texts.
`book:: 2 Maccabees 6:18-31, Psalm 3:2-7, 1 John 4:10b, Luke 19:1-10` would give you today's Daily Readings, like so:
[[book:: 2 Maccabees 6:18-31, Psalm 3:2-7, 1 John 4:10b, Luke 19:1-10]]