
AddTerm (for flat files)
8 Apr 2008, Samuel Murray

This script is based on pootle-addterm 1.2

AddTerm (for flat files) and AddTerm (for flat files) NOTE creates flat files with user-specified delimiter.  The default delimiter is a tab.  So by default, each line of the file will be in the format SOURCE TERM [tab] TARGET TERM (or, if comments are entered by the user, SOURCE TERM [tab] TARGET TERM [tab] COMMENT).  The glossary file is stored in the same folder as AddTerm itself.

Usage:
1. Select or highlight the source term
2. Press Alt+Ctrl+T
3. Select or highlight the target term
4. Press Alt+Ctrl+T again
5. Edit the entry (don't delete the delimiters)
6. Press OK

The NOTE version comes with a renamed copy of Windows XP Notepad, which will attempt to close and reopen each time you add another term, to reflect the latest content of the glossary file.  AddTerm will attempt to open it minimised.

Issues:

* If your glossary file already exists, AddTerm will simply add your new terms to the end of it.
* If you press Cancel when prompted to edit the entry, a blank line will be written to the glossary file.
* The glossary file is UTF-8 with a byte order mark.
* You should be able to use any other text editor for the NOTE version, as long as its executable is named "addterm_notepad.exe" and it resides in the same folder as AddTerm itself.
* For the non-NOTE version, if you open the glossary file in a text editor that keeps the file to itself while open, AddTerm may fail to write entries to it while the file is open in that editor.  If not, but if you edit the glossary file and save it, all entries added by AddTerm while it was open, will be lost.  This is kinda obvious, but I'd rather say it.
* You can use whatever delimiter you want.  If you want the file to be useful in Excel, use the tab (default).  If you want the file to be human-reader friendly, try " = " (space, equal, space) or " :: " (space, colon, colon, space).  If you don't add the spaces, the delimiter will be tight against the text.
* Don't put spaces between the brackets when editing the terms.
* The brackets you see when editing the terms, are not included in the glossary file.
* AddTerm only works on Windows, so for the NOTE version I assume you have Windows, and therefore also notepad.exe.

* I used "!!" as the delimiter in the edit box.  If you have AutoIt installed and you want to edit the script and change it to something else, be my guest.  I used "!!" because it is visible and easy to type and unlikely to be in a term itself.  Personally, I would have preferred a pipe, i.e. "|", but many people don't know where to find a pipe on their keyboard, or it is located in an awkward position, so I didn't use it.

Let me know if you have issues.
