Picture Book App: changing an image in the source text will not change it in the project

I have created a Picture Book app with synchronized audio, motion on images and background music clips. Now I would like to change a particular image to a different one. In the source book file (TXT) I have changed the image file for page 34 from Kande 15.png to Kande 12.png. I have reopened SAB and although, the source text has been changed, SAB refuses to change the image to Kande 12.png. Here are a couple screenshots that show this:

I know that I can get it to work by deleting the book from the project and reimporting it. But doing this means that I have to redo all the work of putting motion on the images and adding background music files. The real issue is the work in adding motion. This would be about three hours of work for this particular project.

So my questions are:

  • Does anyone know of a way to force SAB to relook through the source file to check for changes and apply them to the project?
  • Is there any way to save the Ken Burns motion that I have established? Then I could delete the book, reimport it and bring in the motion that I’ve created.

Actually, a way to save motion would be incredibly useful. I’m hoping to make this app available in additional languages… when importing a different language book that uses all the same photos, it would be very helpful to also be able to import the motion I’ve created for each of those images.

Thanks for your help!

Hi Neil, I know what you mean, I’ve had some hours recreating sound files after making small changes - for this do you know if the Update from Original Source option does away with your timings and motion in addition to updating the source?

Thanks @Corey_Garrett for this great suggestion! I’ve used “Update from Original Source” for Paratext files, but I somehow never thought to try using it for this Picture Book app.

So, I tried it this morning and unfortunately, it doesn’t resolve my issue… It seems that for apps where the file is found within the project folder, SAB automatically checks for updates. To test that this is true, at 10:03 today I modified and saved the TXT file, then I opened SAB and found that it already had the last modified version of the file (10:03). Then of course when clicking on “Update from Original Source” a dialog box popped up saying “No files were updated.”

It seems that APPDEF file simply refuses to be updated with new data (at least image file data) in the TXT source file.

I’m speaking from a fair amount of ignorance, and don’t really have time to look into the details right now myself… but all of the information about the app is stored in the source directory, and primarily in the .addDef file, located here:

C:\Users\<user>\Documents\App Builder\Reading Apps\App Projects\<project>\<project>.appDef

If you aren’t feint of heart, my guess is that you can poke through this file (and maybe some files in the <project>_data folder, especially the books subfolder) and find where those images and motions are defined, and modify them or copy them to other projects. E.g. I’m pretty sure you could change the file source in the books subfolder (or maybe a subfolder under that) to force that line to be

\img Kande 15.png

NOTE: Make a backup of your project directory first! (Or at least any individual files that you change.) Then you can feel free to play around and experiment, and if it doesn’t work, just restore the project folder, and you are back where you were before. Go wild!

1 Like

Yes as update from original source isn’t working I second this from @jeff_heath, I’ve had a couple things I have had to fix that way. If that doesn’t work @NeilZubot upload your project to OneDrive/Google Drive etc and send me the link, I don’t know positively that I can do anything about it but I can look through it and try to see what I can see.

Thanks @jeff_heath and @Corey_Garrett. That did it!

In starting this thread, I was hoping that there would be some legitimate way to make it work. Too bad that there doesn’t seem to be.

But it was really good to hear from you guys about going into the APPDEF file. Up to this point, I had not dared touching APPDEFs, nor had I heard of anyone else out there who was manipulating them. Good to hear from you guys about it! It gave me the courage and has saved me hours of work. Thanks!

What?! Modifying an XML file isn’t legitimate? Well, it certainly is less user-friendly…

It might be helpful for other people if you could share just a couple of details of how you were able to make the changes. What XML tags did you find, and where were they in the structure? Just a little bit of documentation might help someone else down the road.

@NeilZubot you have been helped with a workaround.

I have updated the bug list after recreating the issue.

Thanks to all for the input on this one.

Haha :slight_smile: , I suppose that it is legitimate for people who know what they are messing with in that file and that it won’t corrupt anything.

So, to describe what I did… using a text editor (Sublime Text) to open the file, I simply did a search for the page number (Page 34) and changed the image for that page from ‘15’ to ‘12’. Very easy! :slight_smile:

I think I’ll be poking around in APPDEF files more often. The line right under the image name holds the motion (Ken Burns effect) details. In the future I will be able to use those details (copy and paste them) for any translations of this same book that I want to add in to this app. Great! That’s a solution to the second question I had :slight_smile:

That’s great! Thanks @mcquayi

If anyone wants to manually edit a .appdef file then please use a text editor that has syntax highlighting for XML documents. That way if you mess with the XML markup the syntax should change and give you a visual indication.

Sublime Text is one such editor.
Notepad ++ is another.
My workhorse is FOXE (First Object XML Editor)
There are many others.

In contrast if you just use Notepad you won’t have any syntax highlighting and if you mess up something it won’t indicate any difference then your project won’t open.

XML documents are very precise on what is allowed and what is not. In contrast HTML that looks very similar accepts many badly formatted documents and still loads them.

1 Like