How to keep drafted text out of the app?

Is there an easy way to have SAB only use the checked and publishable parts of the translation? You can select which books to include in the app, is it possible to do the same with individual chapters, without having to delete the drafted texts out of paratext before building the app?

I’ve got a Batch file that runs to delete (unchecked Psalms) from our USFM files (after they have been copied out to the target location from Paratext). It calls a CC table which rips out the unwanted chapters.

begin > use(main)
c -----------------------------------------------------------
c WARNING: This CCT deletes Data! Only use on a COPY of the original data
c Purpose is to remove unchecked Psalms from Scripture App Source files
c -----------------------------------------------------------


c Note that Psalms 1-30 are passed through untouched
'\c 31' > next  c This is the 1st Psalm that gets erased...
'\c 55' > next
'\c 68' > next
'\c 101' > next
'\c 111' > next
'\c 115' > next
'\c 122' > next
'\c 124' > next
'\c 134' > next
'\c 149' > next
'\c 999 ' > store(erase) use(eraseTillwanted)

c -----------------------------------------------------------

c Keep only these Psalms 1-30, 53, 54, 67, 100, 110, 114, 121, 123, 133, 148

'\c 53' > next
'\c 67' > next
'\c 100' > next
'\c 110' > next
'\c 114' > next
'\c 121' > next
'\c 123' > next
'\c 133' > next
'\c 148' > next
'\c 999 ' > endstore dup use(main)

You can use a .BAT file like this to call Consistent Changes to run the CC table:
It copies the book of Psalms to a file called Temp.txt; and then passes it through the CC table to delete unwanted Psalms and overwirtes the original book of Psalms. Finally it deletes the Temp.txt

set SABdir=C:\My Documents\App Builder\Scripture Apps\App Projects\{ProjectName} (Code)\{ProjectName} (Code)_data\books
copy "%SABdir%\WSG\19PSASGA.SFM" Temp.txt
ccw32.exe -n -q -b -u -t DELeteUnCheckedPsalms.cct -o "%SABdir%\WSG\19PSASGA.SFM" Temp.txt
del Temp.txt

I hope that helps! Shout if you need more help.

1 Like

Sorry, I know very little about programming and don’t really know where to start. I’m assuming I would have to rewrite the batch file / have a different batch file for each book that contains drafted text. How would I do I that?
Seems to me there should be an easier way. I think I’ll go ahead and start a thread to that extent in the feature requests.

Yes, you are right. You would need a different CCT for each book, and that language is anything but obvious! And yes, you would have to update the .BAT file for each CC/Book combination. So I agree that it should be easier than that! I’ve commented on your feature request, and voted for it. I hope others do so as well.

Good news. The developer will add a feature for each book, he will add a choice (a) include all chapters, or (b) include selected chapters.

Will this be in the next release? I’m not sure, but in the development plans.