<font color="red">=comment</font>
$name = ('(' x ($fill_len/2)) . ' ' . $name . ' ' . (')' x ($fill_len/2));
$body .= $name . "\n\n";
my @ts = offset_time_list(time, $blog);
my $ts = sprintf "%04d%02d%02d%02d%02d%02d",
$ts[5]+1900, $ts[4]+1, @ts[3,2,1,0];
my $date = format_ts('%Y.%m.%d %H:%M:%S', $ts, $blog);
my $fill_left = ' ' x int(($cols - length($date)) / 2);
$body .= "$fill_left$date\n\n\n";
$body .= ('-' x $cols) . "\n\n";
<font color="red">=cut</font>
if ($q->param('send_excerpt')) {
$body .= MT::I18N::wrap_text($entry->get_excerpt, $cols-4, " "," ") . "\n\n";
$body .= ('-' x $cols) . "\n\n";
}
$body .= $entry->permalink . "\n\n";
$body .= MT::I18N::wrap_text($q->param('message'),$cols, '', '') . "\n\n";
if ($q->param('send_body')) {
$body .= ('-' x $cols) . "\n\n";
$body .= MT::I18N::wrap_text($entry->text, $cols, '', '') . "\n";
}
<font color="red"># 以下の部分をコメントアウトまたは修正
# my $subj = $app->translate("[_1] Update: [_2]", $blog->name, $entry->title);
# ここまで
# 以下の部分を追加
my $subj = $app->translate("[_1]", $entry->title);</font>
</font>
<font color="red">=comment</font>
$name = ('(' x ($fill_len/2)) . ' ' . $name . ' ' . (')' x ($fill_len/2));
$body .= $name . "\n\n";
my @ts = offset_time_list(time, $blog);
my $ts = sprintf "%04d%02d%02d%02d%02d%02d",
$ts[5]+1900, $ts[4]+1, @ts[3,2,1,0];
my $date = format_ts('%Y.%m.%d %H:%M:%S', $ts, $blog);
my $fill_left = ' ' x int(($cols - length($date)) / 2);
$body .= "$fill_left$date\n\n\n";
$body .= ('-' x $cols) . "\n\n";
<font color="red">=cut</font>
if ($q->param('send_excerpt')) {
$body .= MT::I18N::wrap_text($entry->get_excerpt, $cols-4, " "," ") . "\n\n";
$body .= ('-' x $cols) . "\n\n";
}
$body .= $entry->permalink . "\n\n";
$body .= MT::I18N::wrap_text($q->param('message'),$cols, '', '') . "\n\n";
if ($q->param('send_body')) {
$body .= ('-' x $cols) . "\n\n";
$body .= MT::I18N::wrap_text($entry->text, $cols, '', '') . "\n";
}
<font color="red"># 以下の部分をコメントアウトまたは修正
# my $subj = $app->translate("[_1] Update: [_2]", $blog->name, $entry->title);
# ここまで
# 以下の部分を追加
my $subj = $app->translate("[_1]", $entry->title);</font>
</font>
styles.css"...
を探す。
favicon.ico" />
を追記する。
styles.css"...
を探す。
favicon.ico" />
を追記する。
#/usr/bin/perl -w
use strict;
our $HOME_DIR = '/home/youraccount';
our $DIR = "$HOME_DIR/targetdirectory";
our %WORDS = (
'ブラウザー' # 置換前の文字列
=> 'ブラウザ', # 置換後の文字列
'FTP' # 置換前の文字列
=> 'FTP', # 置換後の文字列
# ... 以下、
'置換前の文字列1'
=> '置換後の文字列1',
'置換前の文字列2'
=> '置換後の文字列2'
# ... という形で追加していけばよい。
);
1;
#!/usr/bin/perl
require './jcode.pl';
require './replace.conf';
opendir(DIR, $DIR) or die "Couldn't open $DIR directory.";
my @files = readdir(DIR);
closedir(DIR);
foreach my $file (@files) {
if(!(-d $file) && $file ne '.' && $file ne '..' && $file ne __FILE__) {
print "$file\n";
replace($file);
}
}
sub replace {
my ($file) = @_;
open(IN, "$DIR/$file") or die die "Couldn't open $file.";
my @lines = <IN>;
close(IN);
open(OUT, ">$DIR/$file.tmp") or die die "Couldn't open $file.";
foreach my $line (@lines) {
&jcode'h2z_sjis(\$line);
while(my($before, $after) = each %WORDS) {
if($line =~ /$before/) {
$line =~ s/$before/$after/g;
}
}
print OUT $line;
}
close(OUT);
rename("$DIR/$file.tmp", "$DIR/$file");
unlink("$DIR/$file.tmp");
}
1;
#/usr/bin/perl -w
use strict;
our $HOME_DIR = '/home/youraccount';
our $DIR = "$HOME_DIR/targetdirectory";
our %WORDS = (
'ブラウザー' # 置換前の文字列
=> 'ブラウザ', # 置換後の文字列
'FTP' # 置換前の文字列
=> 'FTP', # 置換後の文字列
# ... 以下、
'置換前の文字列1'
=> '置換後の文字列1',
'置換前の文字列2'
=> '置換後の文字列2'
# ... という形で追加していけばよい。
);
1;
#!/usr/bin/perl
require './jcode.pl';
require './replace.conf';
opendir(DIR, $DIR) or die "Couldn't open $DIR directory.";
my @files = readdir(DIR);
closedir(DIR);
foreach my $file (@files) {
if(!(-d $file) && $file ne '.' && $file ne '..' && $file ne __FILE__) {
print "$file\n";
replace($file);
}
}
sub replace {
my ($file) = @_;
open(IN, "$DIR/$file") or die die "Couldn't open $file.";
my @lines = <IN>;
close(IN);
open(OUT, ">$DIR/$file.tmp") or die die "Couldn't open $file.";
foreach my $line (@lines) {
&jcode'h2z_sjis(\$line);
while(my($before, $after) = each %WORDS) {
if($line =~ /$before/) {
$line =~ s/$before/$after/g;
}
}
print OUT $line;
}
close(OUT);
rename("$DIR/$file.tmp", "$DIR/$file");
unlink("$DIR/$file.tmp");
}
1;
my $req = HTTP::Request->new(POST => $url);
$req->content_type('application/x-www-form-urlencoded');
$req->content('Entity=Flight&ContractID=490&Enroute=N&FlightCategory=...');
use LWP::UserAgent;
#!/usr/bin/perl -w
use LWP::UserAgent;
our $ua = LWP::UserAgent->new;
our $url = 'https://applecomputer:apc0606jb@flytesource.flytecomm.com/FlyteSourceGeneratorWebApp/Application';
our $query_string = 'Entity=Flight&ContractID=490&Enroute=N&FlightCategory=COM&DataView=detail&DepartureAirportCode=SFO&ArrivalAirportCode=NRT&AirlineCode=UA&FlightNumber=837';
my $req = HTTP::Request->new(POST => $url);
$req->content_type('application/x-www-form-urlencoded');
$req->content($query_string);
my $res = $ua->request($req);
print $res->as_string;
1;
my $req = HTTP::Request->new(POST => $url);
$req->content_type('application/x-www-form-urlencoded');
$req->content('Entity=Flight&ContractID=490&Enroute=N&FlightCategory=...');
use LWP::UserAgent;
#!/usr/bin/perl -w
use LWP::UserAgent;
our $ua = LWP::UserAgent->new;
our $url = 'https://applecomputer:apc0606jb@flytesource.flytecomm.com/FlyteSourceGeneratorWebApp/Application';
our $query_string = 'Entity=Flight&ContractID=490&Enroute=N&FlightCategory=COM&DataView=detail&DepartureAirportCode=SFO&ArrivalAirportCode=NRT&AirlineCode=UA&FlightNumber=837';
my $req = HTTP::Request->new(POST => $url);
$req->content_type('application/x-www-form-urlencoded');
$req->content($query_string);
my $res = $ua->request($req);
print $res->as_string;
1;