1 /* 2 * Copyright (c) 2017 Daichi GOTO 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: 8 * 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28 #include "command.h" 29 30 struct textset cmdtextsets[] = { 31 { "command_version", "en_", VERSION }, 32 33 { "command_name", "en_", CMDNAME }, 34 35 { "command_alias", "en_", ALIAS }, 36 37 { "command_copyright", "en_", "2017 ONGS Inc." }, 38 39 { "command_comment", "ja_JP", "2つのSSVデータを左外部結合する" }, 40 41 { "command_comment", "en_", "Leftouterjoin two SSV data" }, 42 43 { "command_synopsis", "en_", 44 _CMD(CMDNAME) " " 45 "[" _OPT("r") "] " 46 "[" _OPT("hvD") "] [" _OPT("-") "] " 47 _ARG("L=R") "|"_ARG("L/L2=R") " " 48 "[" _ARG("L=R") "|" _ARG("L/L2=R") " " _ETC "]\n" 49 _ARG("file_left") " " _ARG("file_right") }, 50 51 { "command_description", "ja_JP", 52 "2つのSSVデータを左外部結合する。\n" 53 "\n" 54 _ARG("L=R") "\t\t" _ARG("file_left") "の" _ARG("L") "と" 55 _ARG("file_right") "の" _ARG("R") "を" 56 "一致条件として左外部結合\n" 57 _ARG("L/L2=R") "\t\t" _ARG("L=R") "と同じ処理を" _ARG("L2") 58 "列まで適用\n" 59 "\n" 60 "ファイルの指定がないか、-が指定されている場合には標準入力を" 61 "使用。" }, 62 63 { "command_description", "en_", 64 "Leftouterjoin two SSV data. \n" 65 "\n" 66 _ARG("L=R") "\t\t" "Leftouterjoin " 67 _ARG("file_left") " and " 68 _ARG("file_right") " where the value\n\t\t" 69 "of " _ARG("L") "th column " 70 "of " _ARG("file_left") " and the value " 71 "of " _ARG("R") "th\n\t\tcolumn " 72 "of " _ARG("file_right") " match.\n" 73 _ARG("L/L2=R") "\t\t" "Process the " _ARG("L") "th to " _ARG("L2") 74 "th columns in the same way " 75 "\n\t\tas " _ARG("L=R") ".\n" 76 "\n" 77 "If " _ARG("file_left") " or " _ARG("file_right") " is " 78 "a single dash (`-') or absent, it reads\nfrom the standard " 79 "input." }, 80 81 { "command_options", "ja_JP", 82 _OPT("r") " 結合データ(右)からR列を削除する\n" 83 _OPT("h") " 使い方表示\n" 84 _OPT("v") " バージョン表示\n" 85 _OPT("D") " デバッグモード\n" 86 _OPT("-") " オプションの終了を指定\n" 87 _ARG("file_left") " 左SSVデータファイルを指定\n" 88 _ARG("file_right") " 右SSVデータファイルを指定" }, 89 90 { "command_options", "en_", 91 _OPT("r") " Remove " _ARG("R") "th column from " 92 "the joined data (from right).\n" 93 _OPT("h") " Print the usage message.\n" 94 _OPT("v") " Print the version.\n" 95 _OPT("D") " Enable the debug mode.\n" 96 _OPT("-") " Specify the end of options.\n" 97 _ARG("file_left") " Specify the left SSV data.\n" 98 _ARG("file_right") " Specify the right SSV data." }, 99 100 { "command_example", "en_", 101 _P("cat left.ssv") 102 _S("001 AAA") 103 _S("002 AAA") 104 _S("003 BBB") 105 _S("001 AAA") 106 _P("cat right.ssv") 107 _S("AAA 002 a") 108 _S("CCC 003 c") 109 _S("CCC 003 d") 110 _S("AAA 004 a") 111 _P("join_leftouterjoin 1=2 left.ssv right.ssv") 112 _S("001 AAA @ @ @") 113 _S("002 AAA AAA 002 a") 114 _S("003 BBB CCC 003 c") 115 _S("003 BBB CCC 003 d") 116 _S("001 AAA @ @ @") 117 _P("join_leftouterjoin -r 1=2 left.ssv right.ssv") 118 _S("001 AAA @ @") 119 _S("002 AAA AAA a") 120 _S("003 BBB CCC c") 121 _S("003 BBB CCC d") 122 _S("001 AAA @ @") 123 _P("join_leftouterjoin 1=2 2=1 left.ssv right.ssv") 124 _S("001 AAA @ @ @") 125 _S("002 AAA AAA 002 a") 126 _S("003 BBB @ @ @") 127 _S("001 AAA @ @ @") 128 _P("join_leftouterjoin -r 1=2 2=1 left.ssv right.ssv") 129 _S("001 AAA @") 130 _S("002 AAA a") 131 _S("003 BBB @") 132 _S("001 AAA @") 133 _P("") }, 134 135 TEXTSET_END 136 }; 137