Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add separate fallen-leaves data #2525

Closed
sujato opened this issue Sep 7, 2022 · 2 comments · Fixed by #2530
Closed

add separate fallen-leaves data #2525

sujato opened this issue Sep 7, 2022 · 2 comments · Fixed by #2530
Assignees

Comments

@sujato
Copy link
Contributor

sujato commented Sep 7, 2022

Certain texts have only parallels, but no texts. Currently these are handled in a clumsy way, as both are combine in the same tree.

    {
      "pli-tv-bi-vb-pd": [
        "pli-tv-bi-vb-pd1",
        "pli-tv-bi-vb-pd2-8",
        "pli-tv-bi-vb-pd2",
        "pli-tv-bi-vb-pd3",
        "pli-tv-bi-vb-pd4",
        "pli-tv-bi-vb-pd5",
        "pli-tv-bi-vb-pd6",
        "pli-tv-bi-vb-pd7",
        "pli-tv-bi-vb-pd8"
      ]
    },

Here, the same texts are listed twice, once as a range (which includes the text itself), and again as individual rules (which handle the parallels).

  • this confuses the navigation
  • it makes importing content for publications complex (because they only want the text content)

I propose we split this to the normal tree file:

    {
      "pli-tv-bi-vb-pd": [
        "pli-tv-bi-vb-pd1",
        "pli-tv-bi-vb-pd2-8"
      ]
    },

And a new fallen-leaves:

    {
      "pli-tv-bi-vb-pd": [
        "pli-tv-bi-vb-pd2",
        "pli-tv-bi-vb-pd3",
        "pli-tv-bi-vb-pd4",
        "pli-tv-bi-vb-pd5",
        "pli-tv-bi-vb-pd6",
        "pli-tv-bi-vb-pd7",
        "pli-tv-bi-vb-pd8"
      ]
    },

The normal tree remains exactly as it is. It includes:

  • text
  • navigation
  • suttaplex, including name, parallels, blurb

The only difference is that now, each item in the tree must have a text.

The fallen-leaves handles:

  • suttaplex, including name, parallels, blurb

But no text or navigation. There is no overlap between the two trees: an item must be either one or the other. When building the suttaplex-list, the two lists are combined.

Thus the fallen-leaves appear:

  • in the suttaplex list
  • as an individual suttaplex on its own URL.

When building the suttaplex list, for the sake of sorting, a range comes first:

pd1, pd2-8, pd2, pd3 …


This will fix navigation issues, for example, currently in the prev/next we have:

  • Bi Pd1 > Bi Pd 2-8 > Bi Pd 2

and that creates a bug. Instead it will be:

  • Bi Pd1 > Bi Pd 2-8 > Bi Sk 1

implementation

For the new tree files, see branch sujato-nav-tree in sc-data.

For the new text and HTML files that must be added to bilara-data:

fallen-leaves-new-bilara-files.zip

@sujato sujato changed the title add separate nav-only-tree add separate fallen-leaves data Sep 7, 2022
@thesunshade
Copy link
Collaborator

Just wanted to share appreciation for your eternal care and concern for these kinds of things!

@sujato
Copy link
Contributor Author

sujato commented Sep 7, 2022

Hey thanks! I look at it and go, "crikey, I've been fiddling with this for years and it still doesn't work properly! What an amateur!"

Anyway, we'll see if this approach works. At least it makes the data more clean, which is always a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants