TransPad 1.1
User's Manual

  1. Introduction
  2. Installation
    1. System Requirements
    2. Trial Version
    3. Full License Key
  3. Getting Started
    1. Example 1
    2. Example 2
  4. Mappers and Targets
    1. Mappers
    2. Targets
  5. Options Menu
    1. Mapper Editor...
    2. Exit
  6. Help Menu
    1. Content...
    2. About...
  7. Limits of Trial Version
  8. License Agreement
  9. History

  1. Introduction

    Are you bored of searching and replacing in your document editor ? You might be, if you have a set of many strings to change in some cases:

    • Before sending your document to a translator, you might want to change some secrete names, numbers, words or phrases into other strings. After you receive the translated document, you surely need to restore the strings.

    • There are many other cases where many strings need to be changed. If you are a translator, your work will be more comfortable if a set of simple strings in the documnet are changed by one click.

    • You might want to change your document, character by character, to protect it from other persons. It is a kind of encryption.

    A problem is not only spending a long time in brute force work (many searchings and replacings) on your editor, but also the process itself. Points of the process problem is described in the last item of TransPad features listed below.

    TransPad searches and replaces a set of strings in a document, according to your mapping prescription called a mapper. Important features are:

    • A mapper is a file in which you list pairs of strings. When the 1st string of a pair is found in a document, TransPad replace it by the 2nd.

    • Your document can be a clipboard content, as well as a file. Therefore you can make TransPad work on your document editor.

    • Imagin a process, where you start from the head of the document to see if it contains one of the strings you want to change, move to the next part of the document, and so on. That is what TransPad does when you click.

      Such a process is different from a process, in which you search a string to replace over the document, other string over the document, and so on. The latter process is what you might do on your editor, without TransPad. In many cases the results of the two processes are the same. But there are also many cases in which a string search-and-replace influences the next string search-and-replace in the latter process, and the results of the two processes can be different from each other. In that case the result of the latter process can be totally far from what you expect. One of extreme cases is a character by character transformation.

  2. Installation

    1. System Requirements

      • CPU: Intel 80486 or higher

      • OS: Windows 95, Windows NT 4.0 or higher

    2. Trial Version

      TransPad is distributed as a compressed file, *.zip, without a full license key. That is, the zip file is for the trial version. The installation process is simple. Just extract all of the files contained in it into a folder and start to use one of the files, transpad.exe. Then the user now has the trial license. That is, there are restrictions on some functions, before you acquire and install a full license key.

    3. Full License Key

      Go to http://www.softbattery.net and acquire a key, a small file. The installation is simple. Just put it into the foler in which the trial version is installed.

  3. Getting Started

    In this chapter the main window is described and simple examples are introduced to explain how to use TransPad. Note that every button in the main window can be executed by pressing the underlined character key as well as by clicking. For example just press F on the keyboard to execute the "Forward" button.

    The controls in the 1st line are involved with the mapper. Mappers are recommended to have "n2n" extension, but they are just simple text-format files like *.txt that you can easily create or modify using your editor. The "Browse.." button lets you select a mapper, and the mapper's path and name appear in the "mapper display" window on the right. You can select a mapper also by the drop-file function of the mapper display window. That is, you can drag a mapper file in a folder window outside TransPad and drop it in this window. The "Mapper.." button opens the mapper to view or edit it. The mapper editor can be specified by the "Options->Mapper Editor..." menu in which you choose a specific application or decide to use the one associated with the file extension.

    The controls in the 2nd line are involved with the 'target', that is, the document to transform. The "Browse.." button lets you select a target file, and the target file's path and name appear in the "target display window" on the right. The window is capable of the drop-file function. The "Target.." button opens the target file, by an application (editor or word-processor for example) with which you associated with the file extension in your computer. The "Clipboard" button select the clipboard content as a target, instead of a file. If you press the button, "<Clipboard>" will appear in the target display window and the "Target.." button will be disabled.

    (If you know what the clipboard is, skip to the next paragraph.) The clipboard is, a memory space usually invisible, which store data, for editors to be able to perform the copy and paste functions. That is, when you copy a string in your editor, the clipboard stores it for you to paste it into the editor or other editor.

    You can adjust the width of the main window, to change the widths of, the mapper and the target display windows, and the status bar. All the selections on the main window and menus as well as the main window size and position, will be automatically saved in a file named "conf" when you exit, to be applied in the next execution.

    When you have prepared the mapper and the target, you are ready to use the 2 buttons in the 3rd line, that is, the "Forward" or the "Reverse" buttons, in order to transform the target. Now, let's start to learn what they do, using the example mappers and target in the folder where TransPad is installed.

    1. Example 1

      The first example takes example1.n2n as a mapper and sample.txt as a document, already selected when you installed TransPad.

      Press the "Target.." button to view the example document:

      I have never met Mr. Daniel Baker.
      I have met once Ms. Mary Smith.

      Press the "Mapper.." button to view the example mapper:

             Example Mapper 1

      Mr. Daniel Baker
      Mr. A

      Ms. Mary Smith
      Ms. S

      As you might expect, there are 2 mapping rules in this mapper. That is, if TransPad encounters "Mr. Daniel Baker" in the document TransPad will replaces it by "Mr. A", and if "Ms. Mary Smith" is encountered, it will be replaced by "Ms. S". Each of the lines in a rule should not start with a white space character. Otherwise the line is taken as a comment line which TransPad does not care, an example of which is the title "Example Mapper 1" in the 1st line. It's time to press the "Forward" button. After you do, you will see a comment on the transformation result on the status bar. Press the "Target.." button to view the transformed document:

      I have never met Mr. A.
      I have met once Ms. S.

      Press the "Reverse" button. Then you will obtain the original document. Of course TransPad refers to the same mapper during this reverse transformation, swapping the roles of the 2 strings in each rule.

      Note that, the document size in one transformation, and the total size of documents transformed during one execution of TransPad are limitted in the trial version.

      You can use the clipboard as a document to transform. Press the "Clipboard" button. Invoke your document editor and load sample.txt (You can do it by the "Target.." button or by other way). In your editor, copy the content of it into the clipboard. Then, in TransPad, press the "Forward.." button. Now the clipboard content is transformed and you can see it by pasting into your editor. Test also the "Reverse.." button. Therefore, for example, you can use TransPad directly on your email browser, to edit an email, or to view an email with your document editor, without any need for making the email body into a file.

    2. Example 2

      Let's turn to a character-by-character transformation example. Press the mapper "Browse.." button to select a mapper named "example2.n2n" prepared in the same folder. It starts as follows:

             Example Mapper 2

      A
      7

      B
      t

      C
      #
      ...

      As you already saw in the previous example what each line in a mapper means, you might expect what will happen after the forward transformation. Your document will change into a meaningless scramble of characters ! Let's use the same document used in Example 1 and press the "Forward" button. The result is:

      3 iW~l pl~lf ol8 Sf5 bWpslT tWqlf5
      3 iW~l ol8 mpVl Sj5 SWf` hos8i5

      You can ontain the original document by the "Reverse" button. This is a kind of encryption-decryption. For example you can share the same mapper with a friend, in order to send and receive documents securely. If you decide to use TransPad to encrypt your document, you might want to make a new mapper. You can make it by modifying this mapper (example2.n2n) or a "identity" mapper (identity.n2n) in the same folder. Take any arbitrary couple of rules and swap the second lines (or the first lines), take other couple to swap, and so on.

    The longer transformation time is needed for the bigger target, of course. Note that the main window does not react to any user input including mouse-clicks during the transformation time. But you don't have to worry. Just wait or do works with other programs, until the message "Transforming..." on the status bar will be replaced by result messages.

    Please read the next chapters to learn the mapper syntax and aspects of tranformations in detail, and additional things about TransPad.

  4. Mappers and Targets

    This chapter describes the file formats and structures that TransPad loads and process, and also describes how TransPad works. Please also refer to the example files shown in the Getting Started chapter, to help yourself to understand this chapter.

    1. Mappers

      A mapper is a file which tells TransPad how to transform a document, that is, how to search and replace a set of strings in the document. Although a mapper has "n2n" as it's extension, it is a text-format file which you can easily write or modify using any text editor. In fact it does not need to have "n2n" extension and TransPad will work even if it has other extension. The "n2n" extension is suggested for you to associate it with TransPad in your computer (That is, you can execute TransPad by double-clicking a mapper in a folder if you associate).

      It has a very simple syntax as follows.

      1. Every blank-headed line is ignored by TransPad. Therefore you can insert any help strings or notes in a line, by starting the line with a blank. Let's call it a comment line.

      2. A "rule" is defined by a pair of successive lines, each of which starts with a character other than a blank. "successive" means that there is no comment line between them.

      3. A "string" in a line of a rule is defined to range, from the starting character, up to the last character other than white spaces. Therefore we have 2 strings in a rule and we call them the 1st and the 2nd strings respectively.

      4. When TransPad transforms a document in the "forward" direction, it search the 1st string of the pair and replace it by the 2nd. Let's call the two string, "s-string" and "r-string" respectively according to their roles. In the "reverse" direction, the roles of the strings are swapped.

      5. There can be rules more than one in a mapper. You might want to ask about the priorities of them. When you start a transformation, TransPad begins with the head of the document to see if the s-sring of the first rule is found in the head. If not, it tries the second rule and so on. If the s-string of a rule is found, it will be replaced by the r-string without trying the other rules and TransPad will move to the next part of the document. If none of the s-strings is found in the head, TransPad will move to the next bytes of the document. This is the first step of the transformation, and the other steps are the same. That is, in each step TransPad tries the rules according to the appearance order, starting from the first rule.

      There is some more basic things in TransPad mappers for you to know, which you don't need to know unless your editor is far from an ordinary text editor.

      • The white space characters are the 3 kinds of characters which are usually invisible in editors: blank, carrige-return, and next-line.
      • A line is defined to end by any number of successive characters of the 2 kinds: carriage-return, and next-line.

    2. Targets

      Targets are document files or clipboard content to transform. TransPad searches strings of bytes in your document, and replaces them by strings of bytes. The strings are simply of text-format, as specified in the mapper file. Therefore TransPad will transform successfully your usual text-format documents. However if your documents are of other formats specific to word-processors or authoring tools so that the formats do not have text-format parts, you might not be satisfied by the transformed document.

      If you carefully read the Mappers section, you can recognize that the transformation is not always reversible, depending on the mapper and the document. The reversibility means that, you can obtain the original document, if you transform once more, in the opposite direction. Furthermore, in some cases transforming more than once by mistake in the same direction can make the process irreversible. Even if it is reversible in those cases, the document can be recovered after many attemps unless you remember how many times you pressed the transformation button by mistake. Therefore you are recommended to view the document before the transformation, especially when a mapper for encryption (character by character mapping) is used.

      In general, you are recommended to make a copy of your document file before transformation, in view of dangers described above.

  5. Options Menu

    1. Mapper Editor...

      This menu item invokes the following dialog box in which you specify the mapper editor. The mapper editor is an application which is invoked when you press the "Mapper.." button in the main window to view or edit the mapper.

      Check the "Application Associated in the System" check-button if you don't want a special editor other than the one invoked when you double-click any mapper file in a folder. But you are recomended not to check it, because you might want to associate mapper files (*.n2n) not with an editor but with TransPad so that TransPad is executed when you double-click a mapper in a folder.

      If the check-button is unchecked you can specify the application (editor, viewer, or word-processor) by editing the "Application:" window or by using the "Browse.." button. The "Command Line:" window is used to specify the command line string for the application, in which the only syntax you need to know is just "%m", the substitute for the mapper filename including it's path. Of course any string more than "%m" can be contained in the window, depending on your application's command line format. When you want to include a "%" in the string, you should use "%%" instead.

      The "OK" and "Cancel" buttons terminate this dialog box. The former confirms the modifications, but the latter cancels.

    2. Exit

      This menu item terminates the program. You can do it without using this menu item, by just pressing ESC key on the main window.

  6. Help Menu

    1. Content...

      This menu item opens this manual.

    2. About...

      This menu item invokes a dialog box, in which the version, the copyright and the license status are informed.

  7. Limits of Trial Version

    Here are the list of limits you experience unless you acquire a full license key.

    The trial version checks the following conditions before the start of a transformation, and cancels it showing a message box if one of them is found.

    1. The target is a file. It's size, or the total size of files transformed so far since TransPad started, is greater than 600 bytes.

    2. The target is the clipboard content. It's size, or the total size of clipboard contents transformed so far since TransPad started, is greater than 300 bytes.

    The trial version also has a small additional area in the main window to display advertising pictures, so that the main window may be a little larger than the one with the full license key. If the computer is connected to the internet, new pictures may be displayed.

  8. License Agreement

    TransPad is Copyright(C) 2006 http://www.softbattery.net.

    TransPad consists of the trial version and the full license key.

    The compressed form of the trial version, which is a file with 'zip' extension and in which this file (manual.htm) is contained as one of the components, can be freely copied and distributed as far as it is not modified.

    A copy of the compressed form of the trial version can be freely extracted into the component files. One of the components, transpad.exe can be freely executed to use TransPad functions. 5 components, example1.n2n, example2.n2n, identity.n2n, sample.txt, and defad.txt can be freely copyied, modified or distributed. Any component other than the 5 files is NOT permitted to be de-assembled, de-compiled, reverse-engineered, modified, copied or distributed.

    A full license key is a file needed to upgrade the trial license to the full license, that is, to eliminate restrictions of the trial version's functions. A key is NOT permitted to be copied or distributed to be used in more than one computer, and is NOT permitted to be reverse-engineered, or modified.

    TransPad is provided as is, without warranties of any kind. The copyright holder shall NOT be liable for damages of any kind.

  9. History

    • Version 1.1 --------------------------------------------------- Jan 8, 2007

      The advertisement method in the trial version is changed into a more user-friendly way: The nag screen (a HTML document) is removed and a small area is added to the main window instead.

      A small problem is removed which has happend on closing the main window.

    • Version 1.0 ---------------------------------------------------- Nov, 2006