How My Heart Sings

Thu, 05 Jan 2006

スパム避けとか、blosxom弄り

All about Blosxomメーリングリストの投稿を丸写しして、年単位の閲覧を不可にしました。…どうせ、負荷が高くてここではまともに見られないし。

もうひとつ、月単位のディレクトリのindex.writebackへのコメントスパムが多いので、そこへのアクセスを不可にしました。前の例の、一行目を次のように変更するだけです。403のメッセージを変更したかったので、ブロックごとコピーして変更しました。

if ($path_info_mo and $flavour eq 'writeback')

普通、月のディレクトリのインデックスページにコメントを書く訳ないし、良いよね。

本当は、一定期間が過ぎたエントリにはwritebackを受け付けないとかしたいんですけど…

Meta Infomation of this entry

You can add this Entry to your  はてなブックマーク and Delicious

Wed, 04 Jan 2006

はぢめてblosxomプラグインを書きましたそのさん

このbeatプラグインは、Swatch社が提唱するSwatch Beatを表示するものです。探したけど見付けられなかったので、適当に作ってみました。計算方法自体はどこかで拾ってきたものです。最後のところ、$beat = "\@$beat";でエスケープしなければならないのに気付いたのは、1時間ほど唸ったりしてから。


# Blosxom Plugin: beat
# Author(s): Yasuo Yamashita
# Version: 1.0
# Blosxom Home/Docs/Licensing: http://www.blosxom.com/
package beat;

# --- Configurable variables -----------

# --- Plug-in package variables --------

# --------------------------------------

sub start {
    return 1;
}

sub date {
    my($pkg, $path, $date_ref, $mtime, $dw, $mo, $mo_num, $da, $ti, $yr) = @_;
    ($sec,$min,$hour) = gmtime($mtime);
    $hour_it = $hour+1;
    if ($hour_it == 24) {
        $hour_it = 0;
    }
    $seconds = $hour_it * 60 * 60 + $min * 60 + $sec;
    $beats_temp = $seconds / 86.4;
    $beat = int($beats_temp);
    $beat = "\@$beat";
    return 1;
}

1;

…ふむ、計算結果は正しいようです。

Meta Infomation of this entry

You can add this Entry to your  はてなブックマーク and Delicious

Mon, 02 Jan 2006

FeedBurnerを使ってみたそのに

整形式になっていなかったので修正しました。…厳しいなぁ。

FeedBurner、定期巡回時に何度かサーバエラーでコケているようだけれど、問題無くサイトの更新を拾ってくれている模様です。良し、これでいこう、と。以下は参考にさせていただいたサイトです。

参考サイトにあるように、この方法のキモは、index.rssと同一内容のindex.feedburnerを出力するという点です。index.rssへのアクセスはFeedBurnerへリダイレクトしてやる。FeedBurnerが巡回するのはindex.feedburner、ということです。

Meta Infomation of this entry

You can add this Entry to your  はてなブックマーク and Delicious

FeedBurnerを使ってみた

~violinhi/blosxom/blosxom.cgi/index.rssへのアクセスはFeedBurnerの方へリダイレクト。FeedBurnerが見にいくのは~violinhi/blosxom/blosxom.cgi/index.feedburner。これで様子見。

最初、rss10プラグインを削除してしまったり(死ねば良いのに)、FeedBurnerが見にいく先を~violinhi/blosxom/blosxom.cgi/index.rssにしてしまったり(これだとピンポン状態になるよね)したのはないしょだ。

…いや、これで大丈夫かどうかは…

Meta Infomation of this entry

You can add this Entry to your  はてなブックマーク and Delicious

Sat, 31 Dec 2005

はぢめてblosxomプラグインを書きましたそのに

まず、ひとつ前のエントリでチルダが全角に化けていたので修正。そしたら当然tildeExchangeの効力で何もかも%7Eに置換される、と…これはやはり不味いので、tildeExchangeを次のように変更しました。…こんなので良いのか、自分。てゆーか、前よりマシだけど、まだダメじゃないか。


# Blosxom Plugin: tildeExchange
# Author(s): Yasuo Yamashita
# Version: 1.1
# Blosxom Home/Docs/Licensing: http://www.blosxom.com/

package tildeExchange;

use strict;

# --- Configurable variables -----------

# --- Plug-in package variables --------

# --------------------------------------

sub start {
  return 1;
}
sub last {
	$blosxom::output =~ s/href="(.*?)~/href="$1%7E/g;
	$blosxom::output =~ s/data="(.*?)~/data="$1%7E/g;
	$blosxom::output =~ s/src="(.*?)~/src="$1%7E/g;
	return 1;
}
return 1;

Meta Infomation of this entry

You can add this Entry to your  はてなブックマーク and Delicious

<<  Page 4 of 13  >>

Le violon intérieur....
Yasuo Yamashita
vaiorinnhiATTOnaDOTrimDOTorjye-pi-
Y.A.S.U.O Ytterbium Artificial Sabotage and Utility Organism Y.A.S.U.O Yelling Abomination from the Sunless Underground Oasis

Pyblosxom and plugins. For detail, see http://viole.sakura.ne.jp/blosxom/blosxom.cgi/plugin_info