Editing Find and replace within a book, or even within a collection

As spellings, perhaps even orthographies (haven’t faced that, but theoretically quite possible) change, it would be so handy to just find/replace within a book, at the least. Perhaps even within a collection.

Thanks for the feature request Beth.

While you’re waiting for this, if you really really need it, here is a way to get it done (for the careful and semi-technical):

  1. Install Visual Studio Code. Nevemind that is is for programmers, it’s free, fast, great editor that can handle replacing over whole folders.
  2. Quit Bloom
  3. Backup your collection in case you replace something on accident.
  4. In Windows Explorer Right-click on your Bloom Collection folder and choose “Open with Code”
  5. Ctrl+Shift+H to open the replacement tool
  6. Enter your search and replacement terms. You may not use any of the following characters or you will break your Bloom book: <,>, &
  7. In “Files to include”, type *.htm
  8. Decide what you want for the “Match whole word” and “Preserve Case” options.
  9. You can now hover the mouse over each change to approve it. Or if you think it is safe to do so, you could change everything in one click on “Replace All”.

Long words, or words with non-English characters should be safe. What is VERY NOT SAFE is if you change something in the Bloom file other than your language text. For example if you changed all occurrences of “pag” to “pàg”, this will destroy your book because when Bloom looks for a “bloom-page”, it will no longer find it. By carefully going through each change one-by-one instead of using “Replace All”, you can make sure you are only changing what should be changed.

Here is a quick screen recording showing this process:

2 Likes

Another way to do this would be to use Bloom’s import/export tool. This tool exports the content of a book to a spreadsheet. Once in the spreadsheet, you can use find/replace. You can then import the revised spreadsheet back into Bloom. This will, however, only work one book at a time.

Thanks for sharing this John. I am familiar with VS code and also think it is a great tool.

Will this editing workflow also work for a team collection?

Bart, in Bloom you will need to check out all the books you plan to modify, and then check them back in.

I can export books into Excel and edit them; I’m sure I have not edited any errors into the spreadsheets. But I have not yet succeeded in importing a revised spreadsheet back into Bloom. I get a specific error:
“Something went wrong reading the input file. Import failed. An item with the same key has already been added. Key: shape_0”

I’ve tried with Bloom 5.3.140 and Bloom-beta 5.4.540, both in Wasta 20.04, on two laptops and with various Bloom book files.

Any suggestions, please?
Thanks!
Kim Blewett

I wish I could help, but unfortunately, I’m not sure what that error means. Do your books contain audio or video?

We have successfully exported, edited, and re-uploaded several dozen books using the spreadsheet export import tool, but none of them had audio or video.

No, these books do not contain audio or video. I’m using LibreOffice Calc rather than Excel, but the Bloom 5.2 Release Announcement specifically says this new feature will help people to translate books apart from Bloom, “using Excel, Libre Office, or Google Sheets,” so I don’t think Calc is the problem.

@kblewett
I see you have reported this to our issue tracking system through Bloom. Thank you for doing that so we can investigate.
I wrote you there, too, but for the sake of other users here…

It is very possible that using Libre/Open Office is causing problems with the import.
We had another issue last week where a user was unable to use Libre/Open Office but was able to use Excel.