Skip to content

fix: use base_text_order for commentary book ordering#43

Merged
kdroidFilter merged 1 commit intodevfrom
fix/book-ordering-base-text-order
Jan 24, 2026
Merged

fix: use base_text_order for commentary book ordering#43
kdroidFilter merged 1 commit intodevfrom
fix/book-ordering-base-text-order

Conversation

@kdroidFilter
Copy link
Owner

Summary

Sefaria's table_of_contents.json doesn't provide an order field for commentary books. Instead, it provides base_text_order which indicates the order of the base text being commented on.

Changes

  • Parse base_text_order as fallback when order is not available
  • Look up book order by Hebrew title in addition to English title

Before

Most commentary books had orderIndex=999 (default value).

After

Commentary books will have proper ordering based on the order of their base text.

Closes kdroidFilter/Zayit#263

Sefaria's table_of_contents.json doesn't provide an 'order' field for
commentary books. Instead, it provides 'base_text_order' which indicates
the order of the base text being commented on.

Changes:
- Parse base_text_order as fallback when order is not available
- Look up book order by Hebrew title in addition to English title

This fixes the issue where most commentary books had orderIndex=999.

Closes kdroidFilter/Zayit#263
@kdroidFilter kdroidFilter merged commit fd3d191 into dev Jan 24, 2026
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 this pull request may close these issues.

1 participant