「Ii」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(英語版より新規作成)
 
(同期)
 
(2人の利用者による、間の5版が非表示)
2行目: 2行目:
 
[[Category:Internet Relay Chat]]
 
[[Category:Internet Relay Chat]]
 
[[Category:コンソールアプリケーション]]
 
[[Category:コンソールアプリケーション]]
  +
[[en:ii]]
 
{{Related articles start}}
 
{{Related articles start}}
 
{{Related|IRC チャンネル}}
 
{{Related|IRC チャンネル}}
8行目: 9行目:
 
{{Related|Irssi}}
 
{{Related|Irssi}}
 
{{Related articles end}}
 
{{Related articles end}}
  +
[https://tools.suckless.org/ii/ IRC it (ii)] は、極端にシンプルな FIFO とファイルシステムベースの [[Wikipedia:Internet Relay Chat|IRC]] (インターネットリレーチャット) クライアントです。サーバー、チャンネル、ニックネームディレクトリを含む IRC ディレクトリツリーを作成します。各ディレクトリには FIFO 入力ファイルと通常の出力ファイルが作成されます。
[https://tools.suckless.org/ii/ IRC it (ii)] is:
 
:a minimalist FIFO and filesystem-based [[Wikipedia:Internet Relay Chat|IRC]] (Internet Relay Chat) client. It creates an IRC directory tree with server, channel and nick name directories. In every directory a FIFO in file and a normal out file is created.
 
   
== Installation ==
+
== インストール ==
   
  +
{{AUR|ii}} パッケージを [[インストール]] します。
[[Install]] the {{AUR|ii}} package.
 
   
== Configuration ==
+
== 設定 ==
   
  +
ii はコマンドラインオプションで設定されます。デフォルトの値は、サーバーとポートには {{ic|irc.freenode.net:6667}}、メインディレクトリには {{ic|~/irc}}、ニックネームには {{ic|$USER}} が設定されています。これらは ii を実行する際に値を渡して変更することができます。
ii is configured via command line options. The default values are {{ic|irc.freenode.net:6667}} for server and port, {{ic|~/irc}} for main directory, and {{ic|$USER}} for nickname. These can be changed by passing values to ii when run:
 
   
 
-s ''server''
 
-s ''server''
27行目: 27行目:
 
-k ''environmental.variable''
 
-k ''environmental.variable''
   
ii uses an environmental variable to contain your irc password (i.e., {{ic|IIPASS{{=}}"''password''"; -k IIPASS}}).
+
ii は環境変数を使用して irc パスワードを含めます ( {{ic|1=IIPASS="''password''"; -k IIPASS}})
   
== Usage ==
+
== 使用方法 ==
   
For a detailed introduction see the [https://tools.suckless.org/ii/usage/ official documentation].
+
詳細な説明については[https://tools.suckless.org/ii/usage/ 公式のドキュメント]を参照してください。
   
  +
セッションマネージャーとしては、[[abduco]] や [[tmux]] が推奨されています。これにより、ユーザーは簡単にセッションを切断し、再接続することができます。
A session manager such as [[abduco]] or [[tmux]] is recommended. It allows the user to easily disconnect and reconnect to a session.
 
   
  +
''ii''を起動するには:
To start ''ii'', run:
 
   
 
$ ii
 
$ ii
   
See also {{man|1|ii|url=https://manpages.debian.org/latest/ii/ii.1.en.html}}.
+
以下も参照してください: {{man|1|ii|url=https://manpages.debian.org/latest/ii/ii.1.en.html}}
   
=== Additional functions ===
+
=== 追加機能 ===
   
  +
ii はサーバーへのクライアントとしてのみ機能します。出力を読み取り、入力に書き込むには追加のアプリケーションが必要です。各サブディレクトリには出力ファイル "out" および入力ファイル "in" があります。最低限、出力ファイルは以下のように監視できます:
ii serves solely as a client for the server. Additional applications will be needed to both read output and write input to ii. In each subdirectory, there will be an output file, "out" and an input file, "in". At a minimum, the output file can be monitored with:
 
   
 
$ tail -f out
 
$ tail -f out
   
  +
入力は:
and the input with:
 
   
 
$ echo "command/message" > in
 
$ echo "command/message" > in
   
  +
一つのコマンドで継続的な入力を受け入れる別の方法は:
Another option that allows for a single command to accept ongoing input is:
 
   
 
$ cp /dev/stdin in
 
$ cp /dev/stdin in
   
=== Commands ===
+
=== コマンド ===
   
  +
iiのコマンドはスラッシュで始まり、大文字と小文字が区別されます。
ii commands start with a slash and are case sensitive.
 
   
 
{| class="wikitable"
 
{| class="wikitable"
  +
! コマンド
! Command
 
  +
! 説明
! Description
 
 
|-
 
|-
 
| {{ic|/a ''message''}}
 
| {{ic|/a ''message''}}
  +
| オプションのメッセージ付きで離席状態にする
| mark as away with optional message
 
 
|-
 
|-
 
| {{ic|/j #''channel password''}}
 
| {{ic|/j #''channel password''}}
 
{{ic|/j ''nickname message''}}
 
{{ic|/j ''nickname message''}}
  +
| オプションのパスワードでチャンネルに参加する;
| join a channel with optional password;
 
  +
オプションのオープニングメッセージでユーザーとプライベートな会話を開始する
open a private conversation with user and optional opening message
 
 
|-
 
|-
 
| {{ic|/l ''message''}}
 
| {{ic|/l ''message''}}
  +
| オプションのメッセージでチャンネルから退出する
| leave channel with optional message
 
 
|-
 
|-
 
| {{ic|/n ''nickname''}}
 
| {{ic|/n ''nickname''}}
  +
| ニックネームを変更する
| change nickname
 
 
|-
 
|-
 
| {{ic|/q ''message''}}
 
| {{ic|/q ''message''}}
  +
| オプションのメッセージでiiを終了する
| quit ii with optional message
 
 
|-
 
|-
 
| {{ic|/t ''topic''}}
 
| {{ic|/t ''topic''}}
  +
| チャンネルのトピックを設定する
| set topic of channel
 
 
|}
 
|}
   
  +
コマンドでないものは、チャンネルまたはサーバーに投稿されます。したがって、{{ic|/who}} が必要な場合は、[[RFC:1459]] で説明されているように、FIFO 内のサーバーに {{ic|/WHO}} と書き込んでください。
Everything which is not a command will be posted into the channel or to the server. So if you need {{ic|/who}} just write {{ic|/WHO}} as described in [[RFC:1459]] to the server in FIFO.
 
   
=== SSL/TSL Encryption ===
+
=== SSL/TSL 暗号化 ===
   
ii does not support the [[Wikipedia:Transport Layer Security|Transport Layer Security]] (TLS), and needs a proxy to connect it to a TLS client. An example of this would be with [[stunnel]]:
+
ii [[Wikipedia:Transport Layer Security|トランスポート層セキュリティ]] (TLS) をサポートしていませんが、TLS クライアントに接続するためにプロキシが必要です。これの一例は [[stunnel]] を使用する場合です:
   
 
{{hc|/etc/stunnel/stunnel.conf|2=
 
{{hc|/etc/stunnel/stunnel.conf|2=
96行目: 96行目:
 
}}
 
}}
   
Then use {{ic|-s localhost}} and {{ic|-p ''your-port''}} for stunnel to redirect ii to secure connection to the server.
+
その後、stunnel が ii をサーバーへの安全な接続にリダイレクトするために、{{ic|-s localhost}} {{ic|-p ''your-port''}} を使用します。
   
  +
もう一つのオプションは、{{Pkg|socat}}を使用して UNIX ストリームソケット経由で ii に接続する方法です:
Another option is the use of {{Pkg|socat}} for a proxy with ii connecting via UNIX stream socket:
 
   
 
$ socat UNIX-LISTEN:/tmp/irc.libera.chat OPENSSL:irc.libera.chat:6697
 
$ socat UNIX-LISTEN:/tmp/irc.libera.chat OPENSSL:irc.libera.chat:6697
 
$ ii -s irc.libera.chat -u /tmp/irc.libera.chat
 
$ ii -s irc.libera.chat -u /tmp/irc.libera.chat
   
  +
== ヒントとテクニック ==
== Tips and tricks ==
 
   
=== Using sed to edit output ===
+
=== sed を使って出力を編集する ===
   
  +
[[ Sed ]] は {{ic|tail -f}} の出力をより読みやすくするために編集することができます。例:
[[Sed]] can be used to edit {{ic|tail -f}} output in ways that make it more readable. Example:
 
   
{{bc|
+
{{ bc |
 
#!/bin/sh
 
#!/bin/sh
tail -n 55 -f out {{!}} sed -u '/-\!-.*has/d;
+
tail -n 55 -f out {{ ! }} sed -u '/-\!-.*has/d;
s/<''MyNick''>/\x1b[32m&\x1b[0m/g;
+
s/< '' MyNick '' >/\x1b[32m&\x1b[0m/g;
 
s/\(> >\)\( .*\)/\1\x1b[33m\2\x1b[0m/;
 
s/\(> >\)\( .*\)/\1\x1b[33m\2\x1b[0m/;
 
s/http[^ >)]*/\x1b[31m&\x1b[0m/g;
 
s/http[^ >)]*/\x1b[31m&\x1b[0m/g;
 
s/[\"\$\`]/\\&/g;
 
s/[\"\$\`]/\\&/g;
s/\(^[0-9]\{10\}\)\( .*\)/date -d@\1 "+%Y.%m.%d %H.%M.%S""\2"/e'
+
s/\(^[0-9]\{10\}\)\( .*\)/date -d@\1 "+%Y.%m.%d %H.%M.%S" "\2"/e'
 
}}
 
}}
   
  +
この例では、sed コマンドの最初の部分は join、part、および quit(コマンド出力から削除)を隠します。2番目の部分は、あなたのニックネームの周りに緑の [[コンソールのカラー出力|カラーコントロールコード]] を追加します。3番目は、"ハイライト" を黄色で同じようにします。4番目は URL に赤を使います。その次は、最後のコマンドが UNIX エポックタイムスタンプを人間が読める日付に置き換える前に、コマンドの出力を準備します。
In this example, the first part of the sed command hides (deletes from the command output) the join, part and quit; the second one adds green [[Color output in console|color control codes]] around your nickname; the third one does the same for "highlights" in yellow; the fourth with red on URLs; the penultimate prepares the output of the command before the last one substitutes the UNIX epoch timestamps with a human readable date.
 

2023年10月28日 (土) 01:49時点における最新版

関連記事

IRC it (ii) は、極端にシンプルな FIFO とファイルシステムベースの IRC (インターネットリレーチャット) クライアントです。サーバー、チャンネル、ニックネームディレクトリを含む IRC ディレクトリツリーを作成します。各ディレクトリには FIFO 入力ファイルと通常の出力ファイルが作成されます。

インストール

iiAUR パッケージを インストール します。

設定

ii はコマンドラインオプションで設定されます。デフォルトの値は、サーバーとポートには irc.freenode.net:6667、メインディレクトリには ~/irc、ニックネームには $USER が設定されています。これらは ii を実行する際に値を渡して変更することができます。

-s server
-p port
-u socket (-p option is ignored if this is set)
-i main.directory
-n nickname
-f realname
-k environmental.variable 

ii は環境変数を使用して irc パスワードを含めます (例 IIPASS="password"; -k IIPASS)

使用方法

詳細な説明については公式のドキュメントを参照してください。

セッションマネージャーとしては、abducotmux が推奨されています。これにより、ユーザーは簡単にセッションを切断し、再接続することができます。

iiを起動するには:

$ ii

以下も参照してください: ii(1)

追加機能

ii はサーバーへのクライアントとしてのみ機能します。出力を読み取り、入力に書き込むには追加のアプリケーションが必要です。各サブディレクトリには出力ファイル "out" および入力ファイル "in" があります。最低限、出力ファイルは以下のように監視できます:

$ tail -f out

入力は:

$ echo "command/message" > in

一つのコマンドで継続的な入力を受け入れる別の方法は:

$ cp /dev/stdin in

コマンド

iiのコマンドはスラッシュで始まり、大文字と小文字が区別されます。

コマンド 説明
/a message オプションのメッセージ付きで離席状態にする
/j #channel password

/j nickname message

オプションのパスワードでチャンネルに参加する;

オプションのオープニングメッセージでユーザーとプライベートな会話を開始する

/l message オプションのメッセージでチャンネルから退出する
/n nickname ニックネームを変更する
/q message オプションのメッセージでiiを終了する
/t topic チャンネルのトピックを設定する

コマンドでないものは、チャンネルまたはサーバーに投稿されます。したがって、/who が必要な場合は、RFC:1459 で説明されているように、FIFO 内のサーバーに /WHO と書き込んでください。

SSL/TSL 暗号化

ii は トランスポート層セキュリティ (TLS) をサポートしていませんが、TLS クライアントに接続するためにプロキシが必要です。これの一例は stunnel を使用する場合です:

/etc/stunnel/stunnel.conf
[irc.libera.chat]
accept = 127.0.0.1:<your-port>
connect = irc.libera.chat:6697

その後、stunnel が ii をサーバーへの安全な接続にリダイレクトするために、-s localhost-p your-port を使用します。

もう一つのオプションは、socatを使用して UNIX ストリームソケット経由で ii に接続する方法です:

$ socat UNIX-LISTEN:/tmp/irc.libera.chat OPENSSL:irc.libera.chat:6697
$ ii -s irc.libera.chat -u /tmp/irc.libera.chat

ヒントとテクニック

sed を使って出力を編集する

Sed tail -f の出力をより読みやすくするために編集することができます。例:

#!/bin/sh
tail -n 55 -f out | sed -u '/-\!-.*has/d;
                          s/<  MyNick  >/\x1b[32m&\x1b[0m/g;
                          s/\(> >\)\( .*\)/\1\x1b[33m\2\x1b[0m/;
                          s/http[^ >)]*/\x1b[31m&\x1b[0m/g;
                          s/[\"\$\`]/\\&/g;
                          s/\(^[0-9]\{10\}\)\( .*\)/date -d@\1 "+%Y.%m.%d %H.%M.%S" "\2"/e'

この例では、sed コマンドの最初の部分は join、part、および quit(コマンド出力から削除)を隠します。2番目の部分は、あなたのニックネームの周りに緑の カラーコントロールコード を追加します。3番目は、"ハイライト" を黄色で同じようにします。4番目は URL に赤を使います。その次は、最後のコマンドが UNIX エポックタイムスタンプを人間が読める日付に置き換える前に、コマンドの出力を準備します。