トップ «前の日記(2006-10-02) 最新 次の日記(2006-10-04)» 編集

ヨタの日々

2001|08|09|10|11|12|
2002|01|02|03|04|05|06|07|08|09|10|11|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|12|
2024|01|02|03|04|

2006-10-03 :-)

_

0600 起床。

だる

_ 仕事

0730 寒川。

  1. プログラミング言語 C のプログラム
  2. 未使用の構造体メンバーを探してくれという指令
  3. Microsoft Visual C++ Express にプロジェクトを作成
  4. 既存のソースを読み込ませる
  5. 未使用の変数が云々という warning が出ることを期待してビルド( もちろんビルドは成功しないが文法チェックだけやれればいい )
  6. 当然 warning されるのは未使用の変数

さすがに未使用の構造体メンバーは warning されないか。されるんかな。

ふうむ。

_ bbs2chreader

( via Going My Way )

bbs2chreader は、Mozilla Firefox の拡張機能として動作するXUL で作成された 2ch ブラウザです

IRC で「 NetBSD スレが云々 」というのを見かけたのでふと入れてみた。

ぉー

インストール楽チン。

AA がまともに見れる。

_ 帰路

雨に降られた。

ちょい雨。

ふう

_ 音泉 => Plagger => Gmail

はじめの 1 歩。

音泉の番組更新状況を Gmail に投げる。

以下から CustomFeed::Onsen を貰った。

どうも内容が古いみたいなのでごにょごにょした。

Onsen.pm はこう。

package Plagger::Plugin::CustomFeed::Onsen;
use strict;
use warnings;
use base qw( Plagger::Plugin );

use utf8;
use Encode;
use Plagger::UserAgent;
use Plagger::Util qw( decode_content );

sub register {
    my ($self, $context) = @_;
        $context->register_hook(
            $self,
            'subscription.load' => \&load,
            );
}

sub load {
    my ($self, $context, $args) = @_;
    my $url = 'http://www.onsen.ag/';
    my $feed = Plagger::Feed->new;
    $feed->type('onsen');
    $feed->title('音泉');

    my $ua = Plagger::UserAgent->new;
    my $res = $ua->fetch($url, $self);
    if ($res->is_error) {
        $context->log(error => "GET $url failed: " . $res->status_code);
        return;
    }

    my $content = decode_content($res);
    my $entry;
    foreach my $line (split /\n/, $content) {
        $line =~ m{<img src="(.*?)" width="175" height="100" alt="(.+)"></td>} && !$entry
            and do {
                $entry = Plagger::Entry->new;
                $entry->icon({ url => "$url$1", link => $entry->link });
                $entry->title($2);
                $entry->author($2);
        };

        next unless $entry;

        $line =~ m{<a href="(.+\.asx)"}
        and $entry->link($1);

        $line =~ m{</table>}
        and do {
            $feed->add_entry($entry) if($entry->link());
            undef $entry;
        };
    }

    $context->update->add($feed);
}

1;

__END__

=head1 NAME

Plagger::Plugin::CustomFeed::Onsen - Onsen internet radio feed

=head1 SYNOPSIS

  - module: CustomFeed::Onsen

=head1 AUTHOR

motemen

=head1 SEE ALSO

L<Plagger>

=cut

config.onsen.yaml はこう。Onsen.pm は plugin_path に指定したディレクトリに置く。

global:
  assets_path: /usr/home/rin/plagger/assets
  timezone: Asia/Tokyo
  plugin_path:
    - /usr/home/rin/plagger/plugins
  log:
    level: debug
    encoding: euc-jp
  cache:
    base: /usr/home/rin/plagger

plugins:
  - module: CustomFeed::Onsen
  - module: Publish::Gmail
    config:
      mailto: yourname+onsen@gmail.com
      mailfrom: yourname@gmail.com
      mailroute:
        via: smtp_tls
        host: smtp.gmail.com:587
        username: yourname@gmail.com
        password: xxxxxxxxxxxxxx

  - module: Filter::Rule
    rule:
      - module: Deduped
      - module: Fresh
        mtime:
          path: /usr/home/rin/plagger/cache/plagger.tmp
          autoupdate: 1

こんな感じ。

o00.png