hbadd.rb

ちょっと add_title_proc もした方がいいかなぁと思って、
直してみた。
# hbadd.rb

unless @conf.mobile_agent? || /^append|replace|comment|showcomment|trackbackreceive|pingbackreceive$/ =~ @mode then

def title_text( subtitle, title )
old_apply_plugin = @conf['apply_plugin']
@conf['apply_plugin'] = true
r = apply_plugin( subtitle.sub( @conf.section_anchor, '' ), true )
@conf['apply_plugin'] = old_apply_plugin
NKF::nkf( '-m0 -Ew', "#{r.strip} - #{title}" )
end

def permalink( date, index = nil, escape = true)
ymd = date.strftime( "%Y%m%d" )
uri = @conf.index.dup
uri[0, 0] = @conf.base_url unless %r|^https?://|i =~ uri
uri.gsub!( %r|/\./|, '/' )
if index != nil
a = anchor( "#{ymd}p%02d" % index )
else
a = anchor( "#{ymd}" )
end
if escape
uri + CGI::escape( a )
else
uri + a
end
end

add_title_proc do |date, title|
r = title.dup
r << %Q[]
r << %Q[]
r << %Q[
]
end

add_subtitle_proc do |date, index, subtitle|
t = title_text( subtitle, "#{@conf.html_title} (#{date.strftime('%Y-%m-%d')})" )
p = permalink( date, index, false )
r = subtitle.dup
r << %Q[]
r << %Q[ブックマークを追加]
r << %Q[
]
r << %Q[]
r << %Q[]
r << %Q[
]
end
end
こんな感じ
http://d.tnh.jp/20020307.html

になる。