[
   [
      "optex - General purpose command option wrapper\n",
      "optex - 汎用コマンド・オプション・ラッパー\n"
   ],
   [
      "B<optex> I<command> [ B<-M>I<module> ] ...\n",
      "B<optex> I<command> [ B<-M>I<module> ] ...\n"
   ],
   [
      "or I<command> -> B<optex> symlink, or\n",
      "または I<command> -> B<optex> シンボリックリンク、または\n"
   ],
   [
      "B<optex> I<options> [ -l | -m ] ...\n",
      "B<optex> I<options> [ -l | -m ] ...\n"
   ],
   [
      "B<optex> is a general purpose command option handling wrapper utilizing Perl module L<Getopt::EX>. It enables user to define their own option aliases for any commands on the system, and provide module style extensibility.\n",
      "B<optex>はPerlモジュールL<Getopt::EX>を利用した汎用コマンドオプション処理ラッパーです。これにより、ユーザはシステム上のあらゆるコマンドに対して独自のオプション・エイリアスを定義し、モジュール形式の拡張性を提供することができます。\n"
   ],
   [
      "Target command is given as an argument:\n",
      "対象となるコマンドは引数として与えられます:\n"
   ],
   [
      "or as a symbolic linked file to B<optex>:\n",
      "またはB<optex>へのシンボリックリンクファイルとして指定します:\n"
   ],
   [
      "If the configuration file F<~/.optex.d/>I<command>F<.rc> exists, it is evaluated before execution and command arguments are pre-processed using it.\n",
      "設定ファイルF<~/.optex.d/>I<コマンド>F<.rc>が存在する場合、実行前に評価され、コマンド引数はそれを使用して前処理されます。\n"
   ],
   [
      "Think of macOS's C<date> command, which does not have C<-I[TIMESPEC]> option. Using B<optex>, these can be implemented by preparing following setting in F<~/.optex.d/date.rc> file.\n",
      "C<-I[TIMESPEC]>オプションを持たないmacOSのC<date>コマンドを思い浮かべてほしい。B<optex>を使い、F<~/.optex.d/date.rc>ファイルに次のような設定をすることで実装できる。\n"
   ],
   [
      "Then next command will work as expected.\n",
      "次のコマンドは期待通りに動作する。\n"
   ],
   [
      "If a symbolic link C<< date -> optex >> is found in command search path, you can use it just same as standard command, but with unsupported options.\n",
      "コマンドの検索パスにシンボリックリンクC<< date -> optex >>がある場合は、標準コマンドと同じように使用できますが、サポートされていないオプションがあります。\n"
   ],
   [
      "Common configuration is stored in F<~/.optex.d/default.rc> file, and those rules are applied to all commands executed through B<optex>.\n",
      "共通設定はF<~/.optex.d/default.rc>ファイルに保存され、これらのルールはB<optex>を介して実行されるすべてのコマンドに適用されます。\n"
   ],
   [
      "Actually, C<--iso-8601> option can be defined simpler as this:\n",
      "実際には、C<--iso-8601>オプションはこのように簡単に定義できる:\n"
   ],
   [
      "This works fine almost always, but fails with sole C<--iso-8601> option preceding other option like this:\n",
      "これはほとんどの場合うまくいくが、このようにC<--iso-8601>オプションだけを先行させると失敗する:\n"
   ],
   [
      "B<optex>'s command alias is no different from the alias function of shell, but it is effective in that it can be executed as a command from a tool or script, and can be managed collectively in a configuration file.\n",
      "B<optex>のコマンドエイリアスは、シェルのエイリアス機能と変わりませんが、ツールやスクリプトからコマンドとして実行でき、設定ファイルで一括管理できる点が効果的です。\n"
   ],
   [
      "Command aliases can be set in the configuration file (F<~/.optex.d/config.toml>) like this:\n",
      "コマンドエイリアスは、このように設定ファイル(F<~/.optex.d/config.toml>)で設定することができる:\n"
   ],
   [
      "You can make symbolic link from C<tc> to C<optex> like this:\n",
      "このようにC<tc>からC<optex>へシンボリックリンクを張ることができる:\n"
   ],
   [
      "And include F<$HOME/.optex.d/bin> in your C<PATH> evnironment.\n",
      "また、F<$HOME/.optex.d/bin>をC<PATH>環境にインクルードします。\n"
   ],
   [
      "The C<textconv> module can be used to convert files given as arguments to plain text. Defined in this way, Word files can be compared as follows.\n",
      "C<textconv>モジュールは、引数として与えられたファイルをプレーンテキストに変換するために使うことができる。このように定義すると、Wordファイルは次のように比較できる。\n"
   ],
   [
      "Alias name is used to find rc file and module directory. In the above example, F<~/.optex.d/tc.rc> and F<~/.optex.d/tc/> will be referred.\n",
      "エイリアス名はrcファイルとモジュール・ディレクトリを見つけるために使われます。上の例では、F<~/.optex.d/tc.rc>とF<~/.optex.d/tc/>が参照されます。\n"
   ],
   [
      "It is also possible to write shell scripts in the config file. The following example implements the C-shell C<repeat> command.\n",
      "設定ファイルにシェルスクリプトを記述することも可能です。次の例は、CシェルC<repeat>コマンドを実装したものです。\n"
   ],
   [
      "Read L<CONFIGURATION FILE> section.\n",
      "L<CONFIGURATION FILE>セクションを読んでください。\n"
   ],
   [
      "Complex string can be composed using macro C<define>. Next example is an awk script to count vowels in the text, to be declared in file F<~/.optex.d/awk.rc>.\n",
      "複雑な文字列はマクロC<define>を使って合成できます。次の例は、テキスト中の母音を数えるawkスクリプトで、ファイルF<~/.optex.d/awk.rc>で宣言します。\n"
   ],
   [
      "This can be used like this:\n",
      "これは次のように使えます:\n"
   ],
   [
      "When setting complex option, C<expand> directive is useful. C<expand> works almost same as C<option>, but effective only within the file scope, and not available for command line option.\n",
      "複雑なオプションを設定するときは C<expand> ディレクティブが便利です。C<expand>はC<option>とほぼ同じ働きをしますが、ファイルスコープ内でのみ有効で、コマンドラインオプションには使えません。\n"
   ],
   [
      "B<optex> also supports module extension. In the example of C<date>, module file is found at F<~/.optex.d/date/> directory. If default module, F<~/.optex.d/date/default.pm> exists, it is loaded automatically on every execution.\n",
      "B<optex>はモジュール拡張にも対応しています。C<date>の例では、モジュールファイルはF<~/.optex.d/date/>ディレクトリにあります。もしデフォルトのモジュールF<~/.optex.d/date/default.pm>が存在すれば、実行の度に自動的にロードされます。\n"
   ],
   [
      "This is a normal Perl module, so package declaration and the final true value is necessary. Between them, you can put any kind of Perl code. For example, next program set environment variable C<LANG> to C<C> before executing C<date> command.\n",
      "これは通常のPerlモジュールなので、パッケージ宣言と最後の真値が必要です。この間にどんなPerlのコードを入れてもいい。例えば、次のプログラムでは、C<date>コマンドを実行する前に、環境変数C<LANG>をC<C>に設定します。\n"
   ],
   [
      "Other modules are loaded using C<-M> option. Unlike other options, C<-M> have to be placed at the beginning of argument list. Module files in F<~/.optex.d/date/> directory are used only for C<date> command. If the module is placed on F<~/.optex.d/> directory, it can be used from all commands.\n",
      "他のモジュールはC<-M>オプションを使ってロードします。他のオプションと異なり、C<-M>は引数リストの先頭に置かなければならない。F<~/.optex.d/date/>ディレクトリにあるモジュールファイルは、C<date>コマンドでのみ使用されます。F<~/.optex.d/>ディレクトリにモジュールを置くと、すべてのコマンドから使用できます。\n"
   ],
   [
      "If you want use C<-Mes> module, make a file F<~/.optex.d/es.pm> with following content.\n",
      "C<Mes>モジュールを使用したい場合は、F<~/.optex.d/es.pm>に以下の内容のファイルを作成します。\n"
   ],
   [
      "When the specified module was not found in library path, B<optex> ignores the option and stops argument processing immediately. Ignored options are passed through to the target command.\n",
      "指定されたモジュールがライブラリパスに見つからなかった場合、B<optex>はそのオプションを無視し、直ちに引数処理を停止します。無視されたオプションはターゲットコマンドに渡される。\n"
   ],
   [
      "Module is also used with subroutine call. Suppose F<~/.optex.d/env.pm> module look like:\n",
      "モジュールはサブルーチンコールでも使われる。F<~/.optex.d/env.pm>モジュールが次のようなものであるとする:\n"
   ],
   [
      "Then it can be used in more generic fashion. In the next example, first format is easy to read, but second one is more easy to type because it does not have special characters to be escaped.\n",
      "そして、より一般的な方法で使用することができます。次の例では、最初の書式は読みやすいですが、2番目の書式はエスケープする特殊文字がないので、より入力しやすくなっています。\n"
   ],
   [
      "Option aliases can be also declared in the module, at the end of file, following special literal C<__DATA__>. Using this, you can prepare multiple set of options for different purposes. Think about generic B<i18n> module:\n",
      "オプション・エイリアスは、モジュール内のファイル末尾で、特殊リテラル C<__DATA__> に続けて宣言することもできます。これを使うと、異なる目的のために複数のオプション・セットを用意することができます。一般的なB<i18n>モジュールを考えてみよう:\n"
   ],
   [
      "This can be used like:\n",
      "これは次のような使い方ができる:\n"
   ],
   [
      "You can declare autoload module in your F<~/.optex.d/optex.rc> like:\n",
      "F<~/.optex.d/optex.rc>の中でautoloadモジュールを宣言する:\n"
   ],
   [
      "Then you can use them without module option. In this case, option C<--ru> is replaced by C<-Mi18n --ru> automatically.\n",
      "それから、moduleオプションなしで使用することができます。この場合、オプションC<--ru>は自動的にC<-Mi18n --ru>に置き換えられます。\n"
   ],
   [
      "Module C<i18n> is implemented as L<Getopt::EX::i18n> and included in this distribution. So it can be used as above without additional installation.\n",
      "モジュールC<i18n>はL<Getopt::EX::i18n>として実装され、本ディストリビューションに含まれています。そのため、追加インストールすることなく、上記のように使用することができます。\n"
   ],
   [
      "Modules can also define built-in options using C<builtin> directive in the C<__DATA__> section. Built-in options are processed by L<Getopt::Long> and must be specified before the target command name. For example:\n",
      "モジュールは、C<__DATA__>セクションのC<builtin>ディレクティブを使って組み込みオプションを定義することもできる。組み込みオプションはL<Getopt::Long>によって処理され、ターゲットコマンド名の前に指定する必要があります。例えば\n"
   ],
   [
      "Here C<--xform-visible> is a built-in option defined in the C<xform> module.\n",
      "C<--xform-visible>はC<xform>モジュールで定義された組み込みオプションです。\n"
   ],
   [
      "Standard modules are installed at C<App::optex>, and they can be addressed with and without C<App::optex> prefix.\n",
      "標準モジュールはC<App::optex>にインストールされ、C<App::optex>接頭辞の有無にかかわらず対応できます。\n"
   ],
   [
      "Print available option list. Option name is printed with substitution form, or help message if defined. Use B<-x> option to omit help message.\n",
      "利用可能なオプションリストを表示します。オプション名は、置換形式、または定義されていればヘルプメッセージとともに表示されます。ヘルプメッセージを省略するには B<-x> オプションを使います。\n"
   ],
   [
      "Option B<--man> or B<-h> will print document if available. Option B<-l> will print module path. Option B<-m> will show the module itself. When used after other modules, print information about the last declared module. Next command show the document about B<second> module.\n",
      "オプション B<--man> または B<-h> は、利用可能であればドキュメントを表示します。オプション B<-l> はモジュールパスを表示します。オプション B<-m> はモジュールそのものを表示します。他のモジュールの後に使われた場合は、最後に宣言されたモジュールに関する情報を表示します。次のコマンドは B<second> モジュールに関するドキュメントを表示します。\n"
   ],
   [
      "Print debug messages.\n",
      "デバッグメッセージを表示する。\n"
   ],
   [
      "Module to manipulate command argument. See L<App::optex::util::argv> for detail.\n",
      "コマンド引数を操作するモジュール。詳しくはL<App::optex::util::argv>を参照してください。\n"
   ],
   [
      "Module to implement command input/output filters. See L<App::optex::util::filter> for detail.\n",
      "コマンド入出力フィルタを実装するモジュール。詳しくはL<App::optex::util::filter>を参照してください。\n"
   ],
   [
      "In addition to its own modules, B<optex> can also use C<Getopt::EX> modules. The standard C<Getopt::EX> modules installed are these.\n",
      "B<optex>は、独自のモジュールに加えて、C<Getopt::EX>モジュールを使用することもできます。標準的にインストールされているC<Getopt::EX>モジュールは以下のものです。\n"
   ],
   [
      "You can display a Greek calendar by doing the following:\n",
      "以下のようにするとギリシャ暦を表示することができます:\n"
   ],
   [
      "These options are not effective when B<optex> was executed from symbolic link.\n",
      "これらのオプションは、B<optex>がシンボリックリンクから実行された場合には有効ではありません。\n"
   ],
   [
      "Create symbolic link in F<~/.optex.d/bin> directory.\n",
      "F<~/.optex.d/bin>ディレクトリにシンボリックリンクを作成する。\n"
   ],
   [
      "Remove symbolic link in F<~/.optex.d/bin> directory.\n",
      "F<~/.optex.d/bin>ディレクトリのシンボリックリンクを削除する。\n"
   ],
   [
      "List symbolic link files in F<~/.optex.d/bin> directory.\n",
      "F<~/.optex.d/bin>ディレクトリのシンボリックリンクファイルをリストします。\n"
   ],
   [
      "List rc files in F<~/.optex.d> directory.\n",
      "F<~/.optex.d>ディレクトリのrcファイルをリストする。\n"
   ],
   [
      "Stop option manipulation. Use full pathname otherwise.\n",
      "オプション操作を停止する。それ以外はフルパス名を使用する。\n"
   ],
   [
      "B<optex> deals with module option (-M) on target command by default. However, there is a command which also uses same option for own purpose. Option B<--nomodule> disables that behavior. Other option interpretation is still effective, and there is no problem using module option in rc or module files.\n",
      "B<optex>はデフォルトでターゲットコマンドのモジュールオプション(-M)を扱う。しかし、同じオプションを独自の目的で使用するコマンドもあります。B<--nomodule> オプションはその動作を無効にします。他のオプションの解釈は有効であり、rcファイルやモジュールファイルでmoduleオプションを使用しても問題はありません。\n"
   ],
   [
      "Usually B<optex> exits with status of executed command. This option override it and force to exit with specified status code.\n",
      "通常、B<optex>はコマンドを実行した状態で終了します。このオプションはそれを上書きし、指定したステータスコードで強制終了します。\n"
   ],
   [
      "When starting up, B<optex> reads configuration file F<~/.optex.d/config.toml> which is supposed to be written in TOML format.\n",
      "B<optex>は起動時にTOML形式で書かれた設定ファイルF<~/.optex.d/config.toml>を読み込みます。\n"
   ],
   [
      "Set commands for which B<optex> does not interpret module option B<-M>. If the target command is found in this list, it is executed as if option B<--no-module> is given to B<optex>.\n",
      "B<optex>がモジュールオプションB<-M>を解釈しないコマンドを設定する。B<optex>がモジュールオプションB<--no-module>を解釈しないコマンドを設定します。\n"
   ],
   [
      "Set command aliases. Example:\n",
      "コマンド・エイリアスを設定する。例\n"
   ],
   [
      "Command alias can be invoked either from symbolic link and command argument.\n",
      "コマンドエイリアスは、シンボリックリンクとコマンド引数から呼び出すことができる。\n"
   ],
   [
      "Load extra TOML fragments before applying the main configuration. Accepts either a string or an array. Each entry may be a literal path or a glob pattern. Tilde is expanded, and relative paths are resolved against the file that declared the include. Includes are processed depth-first; hashes merge recursively, arrays append, and scalars use last-in-wins semantics. The main F<config.toml> is applied last so it can override included values.\n",
      "メインの設定を適用する前に、余分な TOML フラグメントを読み込みます。文字列か配列を受け取ります。各エントリは、リテラルパスかグロブパターンです。チルダは展開され、相対パスはインクルードを宣言したファイルに対して解決されます。インクルードは深さ優先で処理され、ハッシュは再帰的にマージされ、配列は追加され、スカラーはlast-in-winsセマンティクスを使用します。メインのF<config.toml>は最後に適用されるので、インクルードされた値を上書きすることができます。\n"
   ],
   [
      "Include directives can nest; cycles (including self-globs) are detected and reported as errors.\n",
      "インクルードディレクティブは入れ子にすることができます。(自己グロブを含む)サイクルは検出され、エラーとして報告されます。\n"
   ],
   [
      "System module directory.\n",
      "システムモジュールディレクトリ\n"
   ],
   [
      "Personal root directory.\n",
      "個人用ルートディレクトリ\n"
   ],
   [
      "Configuration file.\n",
      "設定ファイル\n"
   ],
   [
      "Common startup file.\n",
      "共通スタートアップファイル\n"
   ],
   [
      "Startup file for I<command>.\n",
      "I<コマンド>のスタートアップファイル\n"
   ],
   [
      "Module directory for I<command>.\n",
      "I<コマンド>のモジュール・ディレクトリ\n"
   ],
   [
      "Default module for I<command>.\n",
      "I<コマンド>のデフォルトモジュール\n"
   ],
   [
      "Default directory to store symbolic links.\n",
      "シンボリックリンクを格納するデフォルトのディレクトリ。\n"
   ],
   [
      "This is not necessary, but it seems a good idea to make special directory to contain symbolic links for B<optex>, placing it in your command search path. Then you can easily add/remove it from the path, or create/remove symbolic links.\n",
      "これは必要ないが、B<optex>のシンボリックリンクを格納する特別なディレクトリを作り、コマンドの検索パスに置くとよい。そうすれば、パスからの追加/削除やシンボリックリンクの作成/削除が簡単にできます。\n"
   ],
   [
      "Override default root directory F<~/.optex.d>.\n",
      "デフォルトのルートディレクトリF<~/.optex.d>を上書きする。\n"
   ],
   [
      "Override default configuration file F<OPTEX_ROOT/config.toml>.\n",
      "デフォルトの設定ファイル F<OPTEX_ROOT/config.toml> を上書きします。\n"
   ],
   [
      "Set module paths separated by colon (C<:>). These are inserted before standard path.\n",
      "コロン(C<:>)で区切られたモジュールパスを設定します。これらは標準パスの前に挿入されます。\n"
   ],
   [
      "Override default symbolic link directory F<OPTEX_ROOT/bin>.\n",
      "デフォルトのシンボリックリンクディレクトリ F<OPTEX_ROOT/bin> を上書きします。\n"
   ],
   [
      "Specify the path to use when creating symbolic links with C<--ln>. If not set, C<$0> is used. This is useful when B<optex> is invoked through a wrapper script (e.g., Homebrew installation) and you want the symbolic links to point to the wrapper rather than the actual script.\n",
      "シンボリックリンクを作成する際に使用するパスを指定します。C<--ln>で設定します。設定しない場合、C<$0>が使用されます。これは、B<optex>がラッパースクリプト(例:Homebrewインストール)経由で呼び出され、シンボリックリンクを実際のスクリプトではなくラッパーを指すようにしたい場合に有用です。\n"
   ],
   [
      "Specify the original command path used to invoke B<optex>. This is useful when B<optex> is invoked through a wrapper script and the original C<$0> is lost. When a symbolic link to the wrapper is executed, the wrapper should set this variable to its own C<$0> so that B<optex> can determine the correct command name.\n",
      "B<optex>を呼び出す際に使用された元のコマンドパスを指定します。これは、B<optex>がラッパースクリプト経由で呼び出され、元のC<$0>が失われた場合に有用です。ラッパーへのシンボリックリンクが実行された場合、ラッパーはこの変数を自身のC<$0>に設定すべきです。これによりB<optex>は正しいコマンド名を特定できます。\n"
   ]
]