提案です。 テキストブラウザ(w3mとlynx)でkeitaiスキンを使うようにしてみました。
--- pukiwiki.ini.php.org +++ pukiwiki.ini.php @@ -495,6 +499,15 @@ // WebTV array('pattern'=>'#^(WebTV)/([0-9\.]+)#', 'profile'=>'keitai'), + // Text browsers + + // w3m + array('pattern'=>'#^(w3m)/([0-9\.]+)#', 'profile'=>'keitai'), + + // Lynx + array('pattern'=>'#^(Lynx)/([0-9\.]+)#', 'profile'=>'keitai'), + + // Desktop-PC browsers // Opera (for desktop PC, not embedded) -- See BugTrack/743 for detail --- keitai.ini.php.org +++ keitai.ini.php // http://www.au.kddi.com/ezfactory/tec/spec/4_4.html (User-agent strings) if (preg_match('#^KDDI#', $ua_agent)) $max_size = 9; break; + + // Text Browser + case 'lynx': + case 'w3m': + $max_size = 100000; // very large size + break; }
pukiwikiのコンテンツを携帯メールへ送るためにテキストブラウザを使用してみようと思い、このような提案になりました。 テキストブラウザを常用している方は、defaultスキンの方が使いやすいのかもしれません。
メールでの送信は次のようにしています。
w3m -cols 22 -O jis http://localhost/pukiwiki/ -dump 2> /dev/null | mail -s pukiwiki matsuo@dummy.keitai.ne.jp
wget -q http://url/pukiwiki -O- | php -f htmlmail.php your@keitai.email subject
htmlmail.php
<?php $email=$argv[1]; $title=$argv[2]; while (!feof(STDIN)) { $message .= fgets(STDIN, 1024); } $code = mb_detect_encoding($message, "ASCII,JIS,UTF-8,EUC-JP,SJIS"); $message = mb_convert_encoding($message, 'ISO-2022-JP', $code); $headers .= "From: $email\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-2022-jp\n"; mail($email, $title, $message, $headers); ?>
変更点
--- pukiwiki.ini.php.org +++ pukiwiki.ini.php // WebTV array('pattern'=>'#^(WebTV)/([0-9\.]+)#', 'profile'=>'keitai'), + // Text browsers + + // w3m + array('pattern'=>'#^(w3m)/([0-9\.]+)#', 'profile'=>'keitai'), + + // Lynx + array('pattern'=>'#^(Lynx)/([0-9\.]+)#', 'profile'=>'keitai'), + + // wget + array('pattern'=>'#^(Wget)/([0-9\.]+)#', 'profile'=>'keitai'), + + // Desktop-PC browsers // Opera (for desktop PC, not embedded) -- See BugTrack/743 for detail --- keitai.ini.php.org +++ keitai.ini.php @@ -159,6 +159,13 @@ // http://www.au.kddi.com/ezfactory/tec/spec/4_4.html (User-agent strings) if (preg_match('#^KDDI#', $ua_agent)) $max_size = 9; break; + + // Text Browser + case 'lynx': + case 'w3m': + case 'Wget': + $max_size = 100000; // very large size + break; }
wget -q http://url/pukiwiki -O /tmp/pukiwiki.html && mpack -s "subject" /tmp/pukiwiki.html matsuo@dummy.keitai.ne.jp && rm /tmp/pukiwiki.html