Home

 

Examples

 

Technical

 TextMaestro

 

2003 TextMaestro Technologies

 

Technical

1.

Introduction

2.

Main Toolbar

3.

Session Toolbar

4.

FTP Toolbar

5.

File Attributes

6.

Project Manager

7.

Account Manager

8.

Browse Remote
System

9.

Text Conversion Dialog

10.

Text Conversion Attributes

11.

Text Conversion Libraries

12.

Text Conversion Rules

13.

Text Conversion Batch Mode

14.

Text Conversion Command Line

15.

Report

16.

Diff-and-Merge

17.

Cross Listings

18.

Program Options

19.

Save Program Data

 

13. Text Conversion In Batch Mode

Batch conversion is regarded as the production mode of text conversion. Recall, in interactive mode of conversion, TextMaestro converts text found in Input window and places it on Output window. In batch conversion one can convert a set of input files and direct output files to specified names and directories.

It is convenient if one has to convert hundreds of files for legacy documents or books. Typically these are the steps one follows:

Load input files in the list.

Select a library.

Specify the names and locations of output files.

Preview conversion.

Persist conversion changes.

There is a lot to say on Batch Conversion. See Example 19 and 20 to get started.

 

Hold down Shift key and click on Text Conversion button from Main toolbar, and the Batch Text Conversion dialog will appear as shown below.

;

Figure 2:

Then the following dialog will appear, assuming that the current conversion type is Find and Replace:

Batch Conversion for Find and Replace:

 

Launches a batch process to create all find-and-replace instances based on the current conversion library, and lists those instances.

After the process is complete, files marked with indicate that at least one instance was found in it, while indicates found none.

Various icons are used for instances. They have certain meanings. They are listed below:

This instance has source access information. I.e., double click on this item, it will take you straight to the source where this instance is located.

This instance does not have source access information, because Build source access table check box was turned off. We often turn off this check box to reduce memory usage for extremely large files.

When an instance has this icon, double-clicking on it will not take you to the source code.

You will not see this icon, if you have Build source access table checked, which is the default behavior.

This instance has been marked as skipped. That means if you hit Write to files button now, the scheme will skip this instance while writing takes place.

This instance has been marked as manually modified. That means if you hit Write to files button now, the scheme will use the text that you have supplied in the Replace edit box (the lower edit box) instead of what the conversion scheme concocted originally.

For all cases however, note that alternate colors (blue and red) are used to distinguish instances from one macro to those from another macro. Here is an example.

Suppose current Find-and-Replace library contains 3 macros and for a certain file, first macro generated 8, second macro 7 and third macro 6 instances. Then the right list will display total 21 instances, where first 8 instances will have blue icons, next 7 red icons and the last 6 blue icons again.

Opens the conversion library to be used for the batch conversion.

Creates output filenames and fills up the second column of the list. This opens the following dialog:

where you get three choices:

Same as input names:

In this method, the output filenames are exactly the same with input filenames. Caution: If you do not Change the Output location, you are likely to overwrite the original files.

 

Using text from Output window:

In this method, the output filenames are retrieved from Output window sequentially. Number of lines in Output window must match or exceed the number of selected items on this list. Caution: It is user's responsibility to make sure that the names listed on Output window follows Windows file-naming conventions.

Using Prefix, Suffix, and Extension as noted above, you can change the output names for the items currently selected in the list. Enumerate adds 1, 2, 3, ..., n etc. to the filenames. This is convenient if you want to enumerate file names.

Preserve extension leaves the original extension intact.

Specify a valid location where the output should be generated. Hit Change after editing the location to reflect the changes on the output filenames (2nd column).

If the destination directory for any output file does not exist, it is created during the batch conversion.

After you have created find-and-replace instances for the selected files (using the 1st button in this list), you can write the results into output files using this button.

Stops an on-going batch conversion process. A Stop request may not take place immediately.

Removes selected items from the list.

Removes the second column for the selected items.

Select an instance in the Instance list. A dialog will appear on the left that displays the Find and Replace text. At this point if you modify the Replace text, and hit this button, this instance will be saved as a modified instance, and TextMaestro will place your new text in Replace when you write the results to the output files.

This is called last-minute override of instance. A modified instance displays one of these icons: , .

Select an instance in the Instance list. Hit this button. This will mark the instance as skipped. This means, TextMaestro will simply ignore this instance when you write the results to the output files.

This is simply called skip of instance. A skipped instance displays one of these icons: , .

 

If the current conversion type is Token Parameter or Key Lookup, then the following dialog will appear:

Batch Conversion for Key Look Up:

 

Adds files to the list that are selected in the main application window.

Opens the conversion library to be used for the batch conversion.

Generates output names for selected items. See above.

Launches batch conversion for the files set up in the list using current conversion scheme and library. This process will parse the input files and write results into output files as found in the list above. You should hi this button after you have specified the output names of file and specified a library.

Stops an on-going batch conversion process. A Stop request may not take place immediately.

Removes selected items from the list.

Removes the 2nd column for the selected items.

Top