Otoom home page

 

TxtChanger manual (v. 1.5)

 

System requirements and installation

Win 10 64-bit. Freeware.

Download txtchangersetup.zip (1.2MB) and extract txtchangersetup.exe. Run the file and follow the prompts.

Please check Disclaimer and legal notices → Digital environments.

Errors
Walkthrough
Contact and bug report

Why this program

Deleting and inserting text is not exactly ground-breaking. But there is one situation where something like TxtChanger is needed: a substitute for the html copy command. It has been implemented in later HTML versions, but not all browsers can make use of it (yet). And in any case, all html pages would have to be ramped up to the new version.

Setting up the folders in a file manager first (see below and Walkthrough) may seem tedious, but because it is done outside the program any mistakes can be handled separately and that saves time in the end; it depends on one's method. With a more complex reorganisation of many files the situation can quickly escalate, especially if one file has already some error in it.

Let's say there are 50 html pages, all of which have the same layout of navigation buttons. To remove an existing button and to insert perhaps three new ones, each one of those 50 pages needs to be edited.

Using TxtChanger only one page needs to be edited. Once the result is satisfactory, drag the other 49 files into the File(s) to be processed field, click Deletion, paste the text representing the superfluous button into Text to be deleted and click the Start deletion button.

If insertion follows, keep the File(s) to be processed, click Insertion, paste the text to be inserted into the Text to be inserted field, paste the text after which the insertion needs to be made into the Text identifying start point of operation, and click the Start insertion button.

For safety purposes the resultant files can be written to a different folder (Select folder button), and/or can be renamed as copies (Make a copy - the files will be saved as [name]_copy) - it depends on the user's preferred work flow.

So in effect one file is treated as a template (rather like style sheets) and then used to edit the others. While there are many text editing programs out there, I just wanted to make sure the process respects the html formatting and submitting it to the W3C validator page returns a green tick. (The Otoom website modifications dated 23/24 Jun 22 (What's new), substituting two buttons with one other and adding one more have been made that way - 77 pages edited three times in a couple of minutes)

TxtChanger's startup window:
TxtChanger window

Every GUI comes with a tool tip, making the operation very simple.

Any text file can be used. The actual file extension doesn't matter as long as it's a text file.


AnchorArrow.jpg Errors

The following errors could be encountered:

•  The file is not a proper text file to begin with (file extensions are irrelevant);
•  a file dragged into the File(s) to be processed field is not a proper file (eg, a folder name);
•  the text used to identify the deletion and/or the starting point of an insertion could not be found.

In all of the above cases TxtChanger will come up with the appropriate error message which can be acted upon.

Should one or more files not have the required texts, a list of their names is displayed at the end of the batch process and can be saved to a text file. It is then up to the user to correct the error using this list.

The error messages are as follows:

TxtChanger_errornotextfile.jpg   TxtChanger_errornofile.jpg

TxtChanger_errornotext.jpg   TxtChanger_errorsummary.jpg

In order of appearance they indicate - a file in the batch list is not a proper text file, during the batch process a file has been identified as not really a file, during the batch process one of the files did not contain the text looked for, the summary at the end of the batch process when errors had occurred.


AnchorArrow.jpg Walkthrough

To avoid time-consuming mistakes it is recommended to observe the following steps.

1.
Choose one file out of the set to be processed and edit and test it until the desired result is obtained. Upload the file to the W3C validator page to get the green tick of approval.

2.
Create 2 new folders: one for a copy of the original files (eg, proc_folder), and one for the newly processed files (eg, proc_folder_new).

3.
Copy the rest of the files to be processed to proc_folder.

4.
Start TxtChanger.

Deletion:

5.
Drag n drop the files from proc_folder into the File(s) to be processed field and click Deletion.

6.
Click Select folder and select proc_folder_new.

7.
For testing purposes click Make a copy, otherwise keep Use same file name(s).

8.
Using one of the files in the File(s) to be processed field move the cursor across the text to be deleted and copy and paste it into the Text to be deleted field.

9.
Click Start deletion. The newly modified files can be found in proc_folder_new. Validate them via W3C validator page just to make sure they are technically correct.

10.
Copy the files from proc_folder_new to the original html folder to overwrite the ones there. Done!

Insertion:

5.
Drag n drop the files from proc_folder into the File(s) to be processed field and click Insertion.

6.
Click Select folder and select proc_folder_new.

7.
For testing purposes click Make a copy, otherwise keep Use same file name(s).

8.
Using the already edited file move the cursor across the text to be inserted and paste it into the Text to be inserted field (the header for that field will have changed).

9.
Using the already edited file move the cursor across the text after which the insertion should take place and paste it into the Text identifying start point of operation field.

10.
Click Start insertion. The newly modified files can be found in proc_folder_new. Validate them via the W3C validator page just to make sure they are technically correct.

11.
Copy the files from proc_folder_new to the original html folder to overwrite the ones there. Done!

If for some reason one or more of the files to be processed do not contain the exact text that was selected for deletion and/or insertion, an error message will come up during the batch process and the files will be displayed in the final result message window. See Errors for more details.

Note: TxtChanger makes use of all the characters found in a file, even those that may not be useful for the human reader. But it's those other characters which do matter to browsers and therefore to html editors. Therefore care has to be taken to copy a text completely (including tabs and white spaces for example) otherwise the result may not work. The W3C validator has the last word!

AnchorArrow.jpg


© Martin Wurzinger - see Terms of Use