- XMLRPCでのポスト
- メール受信でXMLRPCをキックするサーバ
ただ、後者については、サーバを用意出来ない方もいらっしゃると思います。そこで登場するのが「サイドバー.jp」です。このサービスでは、モブログ支援ということで、各アカウント毎に用意されたメールアドレスに対して記事を投稿すると、設定していたXMLRPCサーバをコールしてくれる機能を持っています。
livedoor FeedFetcher/0.01 (http://reader.livedoor.com/; 23 subscribers) ...
#!/usr/bin/perl
use strict;
my $logfile = "/blosxom/logs/access.log";
#my $logfile = "access.log";
my %agents;
my %bot_ua = (
'Hatena' => 'Hatena\x20RSS',
'NewsAlloy' => 'NewsAlloy',
'FreshReader' => 'FreshReader',
'Feedpath' => 'Feedpath',
'Google Reader' => 'Feedfetcher-Google',
'Rojo' => 'Rojo',
'Bloglines' => 'Bloglines',
'Livedoor Reader' => 'livedoor\x20FeedFetcher',
);
open(FILE, "<$logfile");
while(<FILE>) {
my $line = $_;
$line =~ s/^([^\t]+\t){2}([^\t]+)\t.*/\2/;
if ((my $ua) = grep {$line =~ /$bot_ua{$_}/} keys(%bot_ua)) {
$line =~ s/^.* ([0-9]+) subscriber.*\n$/\1/;
$agents{$ua} = $line if ($agents{$ua} < $line);
}
}
close(FILE);
print <<EOF
Content-Type: text/html;
<html>
<head><title>Your Feeds Subscriber</title><head>
<body>
<table border=\"1\">
EOF
;
my $sum = 0;
while(my ($key, $value) = each(%agents)) {
print "<tr><td>$key</td><td>$value</td></tr>\n";
$sum += $value;
}
print <<EOF
<tr><td>total</td><td>$sum</td></tr>
</table>
</body>
</html>
EOF
;
--- Jcode/Unicode/NoXS.pm.orig 2007-06-26 00:31:47.000000000 +0900
+++ Jcode/Unicode/NoXS.pm 2007-06-26 03:23:49.000000000 +0900
@@ -53,7 +53,7 @@
# instead of being 'use'd (No package export done) subs below
# belong to Jcode, not Jcode::Unicode
-sub Jcode::ucs2_euc{
+sub Jcode::_Classic::ucs2_euc{
my $thingy = shift;
my $r_str = ref $thingy ? $thingy : \$thingy;
_init_u2e();
@@ -68,7 +68,7 @@
$$r_str;
}
-sub Jcode::euc_ucs2{
+sub Jcode::_Classic::euc_ucs2{
my $thingy = shift;
my $r_str = ref $thingy ? $thingy : \$thingy;
_init_e2u();
@@ -84,21 +84,21 @@
$$r_str;
}
-sub Jcode::euc_utf8{
+sub Jcode::_Classic::euc_utf8{
my $thingy = shift;
my $r_str = ref $thingy ? $thingy : \$thingy;
- &Jcode::euc_ucs2($r_str);
- &Jcode::ucs2_utf8($r_str);
+ &Jcode::_Classic::euc_ucs2($r_str);
+ &Jcode::_Classic::ucs2_utf8($r_str);
}
-sub Jcode::utf8_euc{
+sub Jcode::_Classic::utf8_euc{
my $thingy = shift;
my $r_str = ref $thingy ? $thingy : \$thingy;
- &Jcode::utf8_ucs2($r_str);
- &Jcode::ucs2_euc($r_str);
+ &Jcode::_Classic::utf8_ucs2($r_str);
+ &Jcode::_Classic::ucs2_euc($r_str);
}
-sub Jcode::ucs2_utf8{
+sub Jcode::_Classic::ucs2_utf8{
my $thingy = shift;
my $r_str = ref $thingy ? $thingy : \$thingy;
my $result;
@@ -121,7 +121,7 @@
$$r_str = $result;
}
-sub Jcode::utf8_ucs2{
+sub Jcode::_Classic::utf8_ucs2{
my $thingy = shift;
my $r_str = ref $thingy ? $thingy : \$thingy;
my $result;
このブログを応援する