Reloading input files in SAB

I’m using a Python script to manually build both SAB’s .sfm file (in the books folder) and the contents.xml file (long story as to why that’s necessary…).

Currently as I test my script, I have to close SAB, run the script, then turn SAB back on. If I run the script after SAB has started, it appears the files are already cached and don’t get reloaded when they’re updated externally. In fact, on a number of occasions I’ve had to turn off SAB and kill the Zulu Platform x64 Architecture in the task manager.

My question is, Is there a way within SAB to force it to reload the source files it’s using?

When you are in the collection on the left, highlight all the books on the right and right click and choose Update from source. That feature has been there since the beginning I think.

I knew about that features, and don’t think it will work for what I’m asking.

In this particular project in SAB, the original location for my .sfm file is in the My Paratext Project subdirectories (because I was too lazy to point it somewhere else, and it seemed unnecessary). However that’s not really the file I want to read from. Rather I’m using a script to edit the .sfm in the Documents\App Builder\Scripture Apps\App Projects\Name_of_Project\Name_of_Project_data\books\C01 folder directly.

I could have my script create the .sfm file in a 3rd location, then have SAB Update from source while pointing to that location. So, yes, that would be a solution.

However, I’m also using the script to write directly to D:\Documents\App Builder\Scripture Apps\App Projects\Name_of_Project\Name_of_Project_data\contents\contents.xml. Is there any way to re-load that without turning SAB off and back on?


Actually, “Update from source” doesn’t work completely correctly either. While it does update the .sfm file and build the app correctly, within the Main Collection and then the book section, the “Book file” tab gets updated correctly but the “Viewer” one doesn’t. As above, I don’t see any way to reload the Viewer content without turning SAB off and on again. I actually think a solution to my question above would also answer this issue.

But since there wasn’t an immediate answer to reloading the cached files, I suspect that’s not a function that SAB can currently do.

For you contents.xml You can delete all items and screens in the Contents section then reimport a new contents zip file.

Of course the items can all be deleted together but the screens are one at a time. So if you have lots of screens then that is a chore.

Pretty sure that is not the answer you want.

With SAB closed I think I have just replaced the contents.xml and it changed when reopened.

Thank you. I figured it was a long shot, but was at least worth asking about.