6.   Using KEYpak User Interface

KEYpak User Interface is a simple text based menu-driven program for converting documents among a wide variety of word processing systems.  The user interface allows you to:  

 

•       Convert a single document from one format to another.

•       Convert multiple documents to the specified target format.

•       Use the auto-detect function to determine the format of the source document(s).

•       Specify log, configuration and option files to customize the conversion process.

KEYpak User Interface is automatically installed on your system, along with KEYpak at the time of installation.

 

The following pages provide the step-by-step instructions on the use of KEYpak User Interface.

                        Note        KEYpak User Interface accepts standard UNIX conventions for all file names, directory names, and path names.

 

Getting Started

Start KEYpak User Interface at the UNIX prompt:

Type       keypak

Press      <Return>

 

 

Your terminal will display a screen similar to the following:

The KEYpak main screen displays six fields in which information can be entered.  You can choose one of the four option buttons as follows:

 

OPTIONS                      allows you to request a log file to record the warning messages and other data generated during the conversion process.  By default, all log information will be stored in the file keypak.log.  You can also specify configuration and option files to customize the conversion process.

TRANSLATE               converts document(s) to the desired format after verifying the information entered for each field.

HELP                              provides assistance in using KEYpak User Interface.

QUIT                              ends the document conversion session and returns you to the UNIX prompt.

 

 

Use the tab or arrow keys to move between input fields and option buttons.  Guidance messages are displayed at the bottom of the screen as you move between fields and option buttons.

 

No validation of any sort is performed when using the tab or arrow keys to move between fields and options.  Pressing the <Return> key at any input field will cause the system to verify the data in that particular input field only.  The selecting of the TRANSLATE option will cause the system to verify all the data input fields before performing the document conversion.

Entering Required Information

To convert or translate a document to another format, you need to provide information for the six fields:

 

•       source path                    •       target path

•       source file                       •       target file

•       source format             •       target format

                      Notes        •       If the information entered for a field is not valid, KEYpak will display an error window for that field.  All error windows have two or three of the following option buttons:

•       RE-ENTER                     •       CANCEL
•       LIST                               •       OVERWRITE

To use these option buttons, use the arrow or tab keys to move to the desired button and press <Return>; or press the first letter for the option button as follows:

•       R for RE-ENTER           •       C for CANCEL
•       L for LIST                      •       O for OVERWRITE

                                        •       To enter the desired information for a field, you may type in the new data or use the backspace key to re-enter.  Pressing the <ESC> key will display the original data unless you have pressed <Return>.

 

                                        •       If you want to use the auto-detect function to determine the format of the source document, leave the SOURCE FORMAT field blank.

 

                                        •       If you are converting multiple documents, leave the TARGET FILE field blank.

 

 

SOURCE PATH

This field refers to the directory where the source file resides.  By default, the current directory will be displayed for SOURCE PATH. 

 

To enter the desired directory name, move to the SOURCE PATH field and:

 

Type       <source path>

Press      <Return> or <Dn Arrow> or <TAB>

 

If you entered an invalid source path name, and pressed <Return>, you will be presented with the Source Path Error window.

 

Use <ESC> to get out of the Source Path Error window or choose one of the following options:

 

RE-ENTER             enter the correct path name for your source file and press <Return> to verify the path name.

CANCEL                leave the source path as it is.

SOURCE FILE

This field refers to the name of the document(s) you want to convert.  It allows you to:

 

•       Enter the name of a single document to be converted.

•       Select a single document or a number of documents from the list of documents in the specified directory.

•       Enter names of the multiple documents by using the wild card specifications.  For example:  *.*, *.doc, or c*.*, etc.

                        Note        If you are converting a number of documents in a directory to another format, you will enter the information only once.  KEYpak will convert all documents one by one and place them in the specified target directory. 

Converting a single document:

Type       <source file name>

Press      <Return> or <Dn Arrow> or <TAB>

 

 

If you pressed <Return> and the name you entered does not exist in the specified directory, you will be presented with the Source File Error window (Figure 6-3).

 

Use <ESC> to get out of the Source File Error window or choose one of following options:

 

RE-ENTER             enter the correct file name for your document and press <Return> to verify the source file name.

 

LIST                       see a list of files in the specified directory (Figure 6-4).  Select the appropriate file by using the tab or arrow keys and/or Page Up and Page Down keys.  Press <Return> after selecting the desired source file name.

 

CANCEL                leave the file name as it is.

 

 

Converting a single or a number of documents to another format:

Leave the Source File field blank and press <Return>.  A list of the file names in the specified directory will appear (Figure 6-4).

 

If the directory specified for SOURCE PATH does not have any files, the Source File Error window will display the message for empty directory.  Re-enter the source path.

 

Use <ESC> to leave the Source Directory File List window without choosing a file. 

 

As shown in Figure 6-4, the document to be selected is pointed by the double arrow.  Move the double arrow by using the tab or arrow keys and/or the Page Up and Page Down keys.  To select a single document press space bar and then <Return>.  The selected document will be listed in the SOURCE FILE field.

 

To select multiple documents, point and press space bar for each document to be converted.  To select all files in the specified directory, press S.  Press <Return> after selecting the desired files.  The selected files will be displayed.

Using wild cards for multiple documents:

Another way of entering the multiple documents to be converted is to use the wild card specifications, such as *.*, *.doc, or c*.* etc.  For example, to convert all files with the .doc extension:

 

Type       *.doc

Press      <Return> or <Dn Arrow> or <TAB>

A list of file names with the .doc extension will be displayed.  To select the desired document(s), use the procedure described in the previous page.  To cancel all the selected documents, press D.

SOURCE FORMAT

This field refers to the mnemonic name of the word processor on which the original document was created.  Each KEYpak supported word processor is referenced by a unique mnemonic (e.g. AF is the mnemonic for ASCII).  See Appendix A for a list of supported formats and their mnemonics. 

                      Notes        •       For converting a single document or multiple documents of the same format, you may enter the desired mnemonic or leave the SOURCE FORMAT field blank to use the auto-detect function for determining the format of the document(s). 

 

                                        •       For converting multiple documents of different formats, leave the SOURCE FORMAT field blank.  KEYpak will use the auto-detect function to determine the format of each source document.  At the time of conversion of each document, KEYpak will display one of the following:

 

•       Identified format in the SOURCE FORMAT field.

•       Source Format Not Available window (Figure 6-7).

•       A list of available formats (Figure 6-8).  Select the desired format for each document.

To enter the desired mnemonic:

 

Type       <source document's format mnemonic>

Press      <Return> or <Dn Arrow> or <TAB>

 

If the mnemonic you entered is not supported by KEYpak, your terminal will display the Invalid Source Format window.

 

Use <ESC> to get out of the Invalid Source Format window or choose one of the following options:

 

RE-ENTER             enter the correct mnemonic for your word processor and press <Return> to verify the source format mnemonic.

 

LIST                       see the list of available source formats (Figure 6-8).  Select the appropriate format by using the arrow keys or <TAB> key and/or Page Up and Page Down keys.  Press <Return> after choosing the desired source format.

 

CANCEL                leave the source format field blank.

 

 

An alternative method of entering the source format is to leave the Source Format field blank and press <Return>. 

 

If you entered information in the SOURCE FILE field and validated it by pressing <Return>, KEYpak will call upon the auto-detect function to determine the format of the source document. 

 

If auto-detect can identify the format, KEYpak will do one of the following:

•       If the format is supported by KEYpak, the source format will be displayed in the field SOURCE FORMAT. 

•       If the format is not supported by KEYpak, your terminal will display the Source Format Not Available window.

 

If auto-detect cannot identify the source format, the list of available source formats will be displayed (Figure 6-8).

 

Select the appropriate format by using the tab or arrow keys and/or Page Up and Page Down keys.  Press <Return> to accept the selected source format, or <ESC> to exit without making a choice.

 

 

                        Note        The auto-detect function will only work if the SOURCE FILE field is validated by pressing <Return>.

TARGET PATH

This field refers to the directory in which your converted target document is to be placed.  By default, the current directory will be displayed for TARGET PATH. 

 

To enter the desired directory name for the target document:

 

Type       <target path>

Press      <Return> or <Dn Arrow> or <TAB>

 

If you pressed <Return>, but entered an invalid target path, the Target Path Error window will be displayed (Figure 6-9).

 

Use <ESC> to get out of the Target Path Error window or choose one of the following options:

RE-ENTER             enter the correct path name for your target file and press <Return> to verify the path name.

 

CANCEL                leave the target path as it is.

 

 

TARGET FILE

This field refers to the file name of the converted document.  To enter the target file name:

 

Type       <target file>

Press      <Return> or <Dn Arrow> or <TAB>

 

 

                        Note        If you have selected multiple files for conversion, leave the target file field blank.  At the time of conversion, KEYpak will automatically create the target file using the same name as the source file and extension as the target mnemonic.  For example, if the document test.doc is being converted to the MultiMate (mm) format, the target file will be named as test.mm.  Any other value entered in this field will be ignored. 

 

If you are converting a single document, you must enter a file name for the converted document.  If you do not enter any file name, the screen will display the Target File Error window.

 

If the target file name you entered already exists, KEYpak will display the Target File Exists window.

 

Use <ESC> to get out of the Target File Error or Target File Exists window; or choose one of the following options:

 

RE-ENTER             enter the file name for the target document and press <Return> to verify the file name entered.

 

CANCEL                leave the filename as it is.

 

OVERWRITE        erase the existing file and overwrite with the new file.

 

 

TARGET FORMAT

This field refers to the mnemonic name of the word processor on which the converted document(s) will be used.  Each KEYpak supported target word processor is referenced by a unique mnemonic (e.g. MM is the mnemonic for MultiMate).  See Appendix A for a list of supported formats and their mnemonics. 

 

Type       <target document's format mnemonic>

Press      <Return> or <Dn Arrow> or <TAB>


If you pressed <Return> and the format you entered is not supported by KEYpak, your terminal will display the Invalid Target Format window.

 

Use <ESC> to exit from the Invalid Target Format window or choose one of the options:

 

RE-ENTER             enter the correct mnemonic for target word processor and
press <Return> to verify the target mnemonic.

 

LIST                       see a list of valid formats as in Figure 6-13.  Select the appropriate format by using the tab or arrow keys and/or Page Up and Page Down keys.  Press <Return> after choosing the desired target format.

 

CANCEL                leave the format as it is.

 

 

An alternative method for entering the target format is to leave the TARGET FORMAT field blank and press <Return>.  A list of the target formats provided at your installation will appear.

 

Select the appropriate format by using the tab or arrow keys and/or the Page Up and Page Down keys.  Press <Return> after selecting the desired target format.  Use the <ESC> key to exit the Target Format Mnemonic List window without selecting a target format.

 

 

Entering Optional Information

The KEYpak User Interface provides you the following options:

 

•       Specify a log file to record the warning messages and other data generated during the conversion process. 

•       Specify configuration files for source, target and character set configurations to customize the conversion process.

•       Specify an option file containing other configuration files.

•       Specify an extension name for target documents when converting multiple documents. 

To enter the optional information, select the OPTIONS button and press <Return>.  Your terminal will display the Translation Options window.

 

Enter the information as required.  Brief informative messages at the bottom of the screen will guide you through the process.  Select the OK button and press <Return> to confirm the use of this information when performing a conversion.

 

 

                      Notes        •       By default, KEYpak will create the log file keypak.log.  If this name or any other name already exists, KEYpak will provide you with the option of appending or overwriting the existing log file.

 

                                        •       An option file specified through the Translation Options window is used only for defining configuration files.  Therefore, the option file should not contain any other optional parameters.

 

                                        •       If you selected multiple files for the SOURCE FILE field, the TARGET FILE EXTENSION field will display the same as the TARGET FORMAT field and all target documents will be created with this extension.  If you want to have a different extension for the target documents, re-enter the desired information for this field.

 

 

For detailed information on log and option files, refer to chapter 5 “Using KEYpak Command Line” of this guide.  For detailed instructions on the modification and creation of configuration files, refer to chapter 5 of the KEYpak ODX Conversion Reference Guide.

Converting Documents

After entering all the required and/or optional information, you can convert documents by selecting the TRANSLATE option.  Press <Return>.  The system will scan all required data entered, and verify it.

 

If the information you entered is not valid, KEYpak will take you through a series of screens and allow you to re-enter the correct information.

 

If all the information you entered is valid, KEYpak will start converting the document (Figure 6-15). 

 

KEYpak will alert you when the conversion process is complete by displaying a message similar to the following:

 

Translated with no errors.  Press any key.

 

When you press a key, cursor will move back to the source PATH field.  Repeat the procedure to convert more documents. 

 

To view the converted documents, select the QUIT option.  You will be returned to the UNIX prompt.  Use the appropriate application to view the converted document.

 

 

 

Getting Assistance

To get more information on KEYpak conversion options or fields, select the HELP option and press <Return>.  Your terminal will display the Translation Help window (Figure 6-16).

 

Press <Return> to see information on the following:

 

•       KEYpak main screen

•       Field/pushbutton selection

•       Field entry

•       Using pushbuttons

•       Document translation

•       Document translation options

•       Exiting the conversion

Select the QUIT option and press <Return> to exit from the help screen.

 

 

Quitting KEYpak User Interface

To exit from KEYpak User Interface, select the QUIT option and press <Return>.  You will be returned to the UNIX prompt.

Pre-defining Input Field Values

KEYpak User Interface allows you to pre-define values for the input fields.  These values are defined in a special file called the pre-definition file.  A pre-definition file is used at the UNIX prompt when starting the KEYpak User Interface.

Pre-definition File

A pre-definition file is a simple text file and can be easily created by using any text editor.  Each pre-definition file can have the following five types of parameters, identified by its type code:

  

$source          for source fields

$target            for target fields

$log                for log file name

$config           for source, target, and character set configuration files

$option          for option file name

 

A sample pre-definition file test.kui is listed as follows:

 

;Source fields

 

        $source

        Source path = /usr/keypak/

        Source file = *.doc

        Source format = af

 

;Target fields

;The target file field is left blank for multiple documents.

 

        $target

        Target path = /usr/trg/

        Target file =

        Target format = ws

 

;Log file name

 

        $log       

        Log file = afws.log

 

;Configuration Files

 

        $config

        Configuration Files path = /usr/cfg/

        Source config file name = test.src

        Target config file name = test.trg

        Character set config file name = wsstd.cfg

 

;Option file name

 

        $option

        Option file path = /usr/opt/

        Option file name = opt.src

 

 

                      Notes        •       Each field value in the pre-definition file is set as an assignment.

 

                                        •       Blank lines and lines starting with a semi-colon are ignored. 

 

                                        •       Option file specified through the $option parameter in the
pre-definition is used only for defining configuration files.  Therefore, the option file should not contain any other optional parameters.

 

 

Using a Pre-definition File

To start the user interface with a pre-definition file, at the UNIX prompt: 

 

Type       keypak -o<pre-definition file name>

Press      <Return>

 

For example, if you pre-define values in the file test.kui:

 

Type       keypak -otest.kui

Press      <Return>

 

 

The main screen will be displayed as shown in Figure 6-17.

 

 

                        Note        The pre-definition file must exist in the current directory; or the full path name including the location of the file must be specified (For example, keypak -o/usr/test/test.kui).

 

If you press the OPTIONS button, you will see that the Translation Option window has all the fields defined as determined from the pre-definition file.  If all the information is valid, press OK and proceed with conversion as described in the previous pages.