Mercurial > hg > Applications > mh
view postcnv @ 0:bce86c4163a3
Initial revision
author | kono |
---|---|
date | Mon, 18 Apr 2005 23:46:02 +0900 |
parents | |
children | 07f8972434be |
line wrap: on
line source
#!/usr/bin/perl @A = (); $i = 0; $tmp = "/tmp/postaa$$"; # /usr/local/mh/lib/post [-alias aliasfile] # [-filter filterfile] [-nofilter] [-format] [-noformat] # [-mime] [-nomime] [-msgid] [-nomsgid] [-verbose] # [-noverbose] [-watch] [-nowatch] [-width columns] file # [-help] while ( @ARGV ) { $_ = shift(@ARGV); # options require argument if( /^-alias/ ) { push(@A,$_); $_ = shift(@ARGV); push(@A,$_); } elsif( /^-filter/ ) { push(@A,$_); $_ = shift(@ARGV); push(@A,$_); } elsif( /^-idanno/ ) { push(@A,$_); $_ = shift(@ARGV); push(@A,$_); } elsif( /^-library/ ) { push(@A,$_); $_ = shift(@ARGV); push(@A,$_); } elsif( /^-width/ ) { push(@A,$_); $_ = shift(@ARGV); push(@A,$_); } elsif( /^-/ ) { push(@A,$_); } else { $f = $tmp . $i++; system("nkf -j -m0 < $_ > $f"); push(@A,$f); push(@U,$f); } } system "/usr/local/lib/mh/post @A"; unlink(@U);