-
-
Notifications
You must be signed in to change notification settings - Fork 33
Basic Storybook #645
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
Draft
gmjgeek
wants to merge
14
commits into
sillsdev:main
Choose a base branch
from
gmjgeek:feature/basic-storybook-596
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Basic Storybook #645
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0d5de05 to
59776a4
Compare
2812691 to
1034015
Compare
This allows storybooks to use section headings to format regular content without confusing Proskomma about the structure of the book.
Allows multiple books to use the same USFM (as a test project does). Fixes conversion crash when mutlple books share the same audio file.
Proskomma expects all book codes to be three characters. Codes shorter than 3 characters a padded with zeros. Codes in the form X0## are shortened to X##. Other codes longer then 3 characters are not converted, but a warning is shown that the books may not load properly.
The getDamId function assumed that every book with audio would include audio for every chapter. This is not typically true for storybooks.
1034015 to
ce31743
Compare
chrisvire
reviewed
Jul 8, 2025
| return footer; | ||
| } | ||
|
|
||
| function shortenBookCode(id: string, allIds: string[]): string | null { |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed. Proskomma was changed to handle longer book code.
Member
|
After thinking about it, we don't want another renderer. We need to transform the content so that it works with Proskomma. We can use this for reference:
|
TheNonPirate
added a commit
to TheNonPirate/appbuilder-pwa
that referenced
this pull request
Jul 21, 2025
Started taking code from PR sillsdev#645. Discovered that storybook files seem to be modified before the code in convertBooks runs.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support storybooks with no audio.
Fixes #596
Implementation Notes
Conversion
SAB tends to create storybooks 4-digit book codes of the form
B00#. This is problematic for Proskomma, which only accepts 3-digit book codes. To resolve the issue, the PWA shortens these book codes toB0#when possible. If this new name would conflict with another book, the conversion process prints a warning to the console instead.In storybooks, the conversion process tends to turn all formatting markers into milestones. This approach helps keep storybooks compatible with Proskomma.
Rendering
Unlike Scripture books, storybooks are not rendered by
ScriptureViewSofria.svelte. Instead, they usesofria-render-json/SofriaRender.svelte. Here is the general process for rendering storybook text:Proskomma does not hold image data. Instead, illustrations for each storybook are listed in
config.jsand stored in theillustrationsfolder.TODO
Features
data/illustrationsfolder is not presentBugs (12 August 2024):