I’ve subscribed to the various repositories and have noticed mentions of " fallen-leaves data". Does anyone have a moment to give the $.05 explanation of what this is? I’m just curious.
sujato
October 24, 2022, 8:31am
2
“Fallen leaves” are texts that have parallels but no actual text content. The main example is the Bhikkhuni patidesaniyas, where each rule is no more than a single word in a concatenated file. Thus the “leaf” (i.e. text) has “fallen” from the “tree” (i.e. hierarchical structure).
Normally on SC a text = a file = a set of parallels. But in this case since there is no actual file or text, we separate them out so we can still show parallels.
opened 01:04AM - 07 Sep 22 UTC
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](https://github.com/suttacentral/suttacentral/files/9502014/fallen-leaves-new-bilara-files.zip)
2 Likes
Fascinating. Thanks for all your hard work.
1 Like