SZU-ED(1)

NAME
szu-ed - edit a translation table

SYNOPSIS
szu-ed [options] table_file

DESCRIPTION
This is a program for editing Sanzang translation table rules. The editor can accept a small number of commands that allow one to add, modify, or remove translation table rules, as well as print the contents, or save the table back as a file.

Editor operations are read from the standard input (stdin), while editor output is written to the standard output (stdout). Any errors are output to standard error (stderr).

Input to the editor is line-based and consists of commands and data. Lines beginning with the “\” character are interpreted as commands, while those not beginning with this character are interpreted as data.

Commands for changing the editor mode are:

\get - Get a table rule (req. source term)
\set - Set a table rule (req. table rule)
\rm - Remove a table rule (req. source term)

Commands for immediate editor operations are:

\p - Print the current table
\q - Quit without saving
\w - Write back to the file
\wq - Write back to the file and quit

When data is entered, the action taken is determined by the editor mode. If the mode requires a table rule, then you will need to enter a table rule in the proper format, such as (for two columns):

nihao|hello

This is the same format as the data of the translation table itself. On the other hand, if the current mode requires a source term, then only the first column of the record should be supplied, like so:

nihao

The general principle is that a mode that inserts or modifies data naturally requires the full rule to be specified, while a mode that just needs to fetch or remove an existing rule only requires the source term to do the lookup.

OPTIONS

-h, --help
    print usage information and then exit

EXIT STATUS
The exit status is 0 on normal termination, and 1 on error.

DIAGNOSTICS
Errors will print a message to the standard error stream. A stack trace will be printed if the editor encounters a runtime error.

EXAMPLES
Example editor invocation:

$ szu-ed mytable < script

Example editor input:

\set
nihao|hello
zaijian|goodbye
\rm
zaijian
\p
\wq

SEE ALSO
szu-t(1), szu-ss(1)

BUGS
Please contact the author if any bugs are found, or file a bug report with the project. Incomplete or inaccurate documentation should be treated as a bug.

AUTHOR
yaoguai <http://lapislazulitexts.com/sanzang>