Extracting text from twm or exe files

Share your favorite tips, workarounds and shortcuts for theWord
User avatar
Zentie
Posts: 10
Joined: Sun Dec 02, 2012 11:06 am

Extracting text from twm or exe files

Post by Zentie »

Is there any way of extracting the original text from either a twm or exe file? I have a file with many words out of place and would like to reorder them, as well as replace some inappropriate words.
Ronald.Alan
Posts: 27
Joined: Sat Nov 30, 2019 8:57 pm

Re: Extracting text from twm or exe files

Post by Ronald.Alan »

Is this a Bible or a book module?
arraybolt3
Posts: 83
Joined: Mon Jan 02, 2023 12:11 am

Re: Extracting text from twm or exe files

Post by arraybolt3 »

First of all, you'll need to find out if the module you're dealing with is encrypted or not. For a Bible module:
  1. Click on the "Help" button at the top of the screen.[/list
  2. Hover over "Bible info".
  3. Click on the module you want to check.
  4. In the "File path" field at the bottom of the info window, see if the module's file name extension ends with an "x" or not. Unencrypted modules will have a file name extension of "ot", "nt", or "ont", while encrypted modules will have a file name extension of "otx", "ntx", or "ontx".
For a book module:
  1. Click on the book module to open it in a book view.
  2. Right-click on it, then click "Module properties...".
  3. In the Properties tab, scroll down to the "System properties" section. The "Encrypted" field will tell you if the module is encrypted or not.
If the module is encrypted, you cannot modify it without breaking theWord's license agreement, which states, "Some modules are encrypted to protect their copyrighted content from unauthorized duplication. You must respect this protection and not attempt to copy, extract, modify, and/or reuse such content." So if you are faced with an encrypted module, you'll need to contact theWord staff and/or whoever originally made the module. You won't be able to fix it yourself (not legally, anyway).

If you are faced with an unencrypted module, you can fiddle with it yourself.

If you're working with an unencrypted Bible module, you'll be happy to learn that Bible modules are really just text files! You can open them in Notepad (or better yet, Notepad++) and fiddle with them as you see fit (though don't add extra lines - each line in the main part of the file corresponds to one verse). theWord uses a fancy markup language to add things like Strong's numbers, words of Christ in red, and things like that. This markup language is documented in TotheWord, which is a tool made by theWord's developers for creating new modules. (Note that I would not recommend using TotheWord for editing an existing Bible module. Use it for the documentation if you're editing an existing Bible.)

If you're working with an unencrypted book module, theWord has a book module editor built right into it. Right-click on the module, click "Module properties...", click the "Settings/Actions" tab, and check the "User module (can be edited)" box. Then click the "OK" button. You will now be able to freely edit the module directly in the book view.

If you're trying to extract the text of an unencrypted module in bulk, that may be tricky. theWord stores the text and formatting of book modules in Rich Text Format or RichView Format, and encloses this data in a SQLite database. You'll need to figure out some way of getting the raw data out of the database files, which probably isn't too hard, but I don't know as I've never tried. If the data inside is in Rich Text Format, you can probably just load it in Wordpad and then copy the text into Notepad. If it's in RichView Format, TotheWord should be able to open it, and then you can copy from it and paste into Notepad.

Hope this helps!
I'm just an unworthy servant of Christ trying to do my job. But I love my job. :D

theWord 6 on Wine Staging and Windows 11
Post Reply