diff options
| author | fukachan <fukachan> | 2006-01-16 12:02:07 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-01-16 12:02:07 +0000 |
| commit | d2225288f1fde489e3a8fc01d8fff6a250e0e657 (patch) | |
| tree | 224e583d71f3031c98634fe75af1aae9ef5bcb84 /fml/doc/ja/tutorial/customize | |
| parent | 14c7e718cc4fc62c36dc907e180eb1838120fd76 (diff) | |
| download | fml8-d2225288f1fde489e3a8fc01d8fff6a250e0e657.tar.gz fml8-d2225288f1fde489e3a8fc01d8fff6a250e0e657.tar.bz2 fml8-d2225288f1fde489e3a8fc01d8fff6a250e0e657.zip | |
enable command cusomization recipes
Diffstat (limited to 'fml/doc/ja/tutorial/customize')
| -rw-r--r-- | fml/doc/ja/tutorial/customize/chapter.command.sgml | 12 | ||||
| -rw-r--r-- | fml/doc/ja/tutorial/customize/recipes.command.sgml | 278 |
2 files changed, 289 insertions, 1 deletions
diff --git a/fml/doc/ja/tutorial/customize/chapter.command.sgml b/fml/doc/ja/tutorial/customize/chapter.command.sgml index 0006d130..a1bc3d0e 100644 --- a/fml/doc/ja/tutorial/customize/chapter.command.sgml +++ b/fml/doc/ja/tutorial/customize/chapter.command.sgml @@ -1,5 +1,5 @@ <!-- - $FML: chapter.command.sgml,v 1.3 2004/10/06 09:07:34 fukachan Exp $ + $FML: chapter.command.sgml,v 1.4 2005/06/25 15:11:29 fukachan Exp $ --> @@ -40,4 +40,14 @@ package の名前空間に気をつけてください。 </sect1> +<sect1 id="customize.command.recipes"> + <title> + レシピ’s + </title> + +§.customize.command.recipes; + +</sect1> + + </chapter> diff --git a/fml/doc/ja/tutorial/customize/recipes.command.sgml b/fml/doc/ja/tutorial/customize/recipes.command.sgml new file mode 100644 index 00000000..f1288c5a --- /dev/null +++ b/fml/doc/ja/tutorial/customize/recipes.command.sgml @@ -0,0 +1,278 @@ +<!-- + $FML: recipes.sgml,v 1.2 2006/01/15 13:49:57 fukachan Exp $ +--> + + +<qandaset> + + +<qandaentry> + +<question> +<para> +コマンドメールなどの返事は Reply-To: ではなく From: へ +</para> +</question> + +<answer> +<para> +コマンドメールの送信者(From:)へ返事を返すのがデフォルトの挙動です。 +<screen> + +</screen> + +</para> +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +help などのメッセージをアップグレードする +</para> +</question> + +<answer> +<para> +アップグレードすれば自動的にアップグレードされます。 +&fml4; と異なり &fml8; では help コマンドのメッセージテンプレートは +次のようなパスに存在するからです。 +<screen> +/usr/local/share/fml/$VERSION/message/euc-jp/user/help +/usr/local/share/fml/$VERSION/message/us-ascii/user/help +</screen> +</para> + +<para> +ただしMLのホームディレクトリに help ファイルがある場合は +それが help コマンドの返事に使われています。 +よって help ファイルを自分で用意しているなら +自分で編集してください。 +</para> + +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +help メッセージの元ファイルをカスタマイズする。 +</para> +</question> + +<answer> +<para> +&fml8; では help コマンドのメッセージテンプレートは次のようなパスに存 +在します。これを編集してしまうというのが第一案。ただし、これをするとバー +ジョンアップをした際に変更点が無効になってしまいます。 +<screen> +/usr/local/share/fml/$VERSION/message/euc-jp/user/help +/usr/local/share/fml/$VERSION/message/us-ascii/user/help +</screen> +</para> + +<para> +ML独自の help メッセージは +MLホームディレクトリの下に「local/share/message/言語/」を作り、 +その下におけば有効になります。 +<screen> +[Example] + +/var/spool/ml/elena/local/share/message/euc-jp/user/help +/var/spool/ml/elena/local/share/message/us-ascii/user/help +</screen> +常にこのファイルが使われるので、 +バージョンアップしても内容は変わりません。 +それが欠点です。 +</para> + +<para> +なおMLのホームディレクトリに help ファイルがある場合は +それが help コマンドの返事に使われています。 +よって help ファイルを自分で用意しているなら +自分で編集してください。 +この場合も、常にこのファイルが使われるので、 +バージョンアップしても内容は変わりません。 +それが欠点です。 +</para> + +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +confirmation メッセージをカスタマイズする +</para> +</question> + +<answer> +<para> +help メッセージのカスタマイズと同様ですので、 +くわしくは前レシピを参照して下さい。 +<screen> +/usr/local/share/fml/$VERSION/message/euc-jp/command/confirm +/usr/local/share/fml/$VERSION/message/us-ascii/command/confirm +</screen> +</para> +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +news というファイルを送り返すコマンドを作る +</para> +</question> + +<answer> +<para> +このMLの最新情報が書き込まれている +$ml_home_dir/news というファイルがあるとしましょう。 +これをMLのメンバーなら誰でも取り寄せられるようにしたい。 +そういった例を考えます。 +</para> + +<para> +一番簡単な作り方は help コマンドをぱくることです:) +たとえば FML::Command::User::help モジュール( +/usr/local/lib/fml/$VERSION/FML/Command/User/help.pm +)をコピーして +FML::Command::User::news ( +/usr/local/lib/fml/site_local/FML/Command/User/news.pm +) +モジュールをつくってください。 +そして、news.pm の中の help という文字列を news に変えるだけです。 +<screen> +[例] + +... 略 ... + +sub process +{ + my ($self, $curproc, $command_args) = @_; + + $self->send_user_xxx_message($curproc, $command_args, "news"); +} +... 略 ... +</screen> +</para> + +<para> +<link linkend="customize.command.myproc"> +<xref linkend="customize.command.myproc"> +</link> +や +<link linkend="fml.command.hack.commandmail"> +<xref linkend="fml.command.hack.commandmail"> +</link> +も参照してみてください。 +</para> +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +mget コマンドのファイルモードのデフォルトを変更したい +</para> +</question> + +<answer> +<para> +いまのところできません。 +</para> + +<para> +じつのところ、get コマンドと mget コマンドは同じです。 +そして、いまのところ get コマンドのファイルモードは変更できません。 +</para> +</answer> + +</qandaentry> + + + +<qandaentry> + +<question> +<para> +get コマンドを mget mp と同じ意味にする +</para> +</question> + +<answer> +<para> +&fml8; ではデフォルトでそういう意味になっています。 +</para> + +<para> +正確には、get と mget は同じコマンドで、get コマンドのファイルモードは +(いまのところ) MIME/Multipart しかありません。 +</para> +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +command status report を抑制したい +</para> +</question> + +<answer> +<para> +いまのところ、 +フィルタについては off/on できますが、 +一般には出来ません。 +</para> +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +コマンドメールの内容を監視したい +</para> +</question> + +<answer> +<para> +(1) ログを perl で加工する。 +</para> + +<para> +(2) コマンドメール自体のコピーを受けとる。 +たとえば、コマンドメールを受けとる設定のところに管理者も追加しておくと +いった具合です。 +<screen> +elena-ctl: :include:/var/spool/ml/elena/include-ctl, elena-admin +</screen> +</para> +</answer> + +</qandaentry> + + +</qandaset> |
