# $Id: bookstore.rb,v 1.4 2001/01/01 17:39:43 not Exp $
# 2001.1.?? 修正
=begin
usage:
(BOOKTITLE:string) とか書いとくと各オンライン書店へのリンクに変換
=end
class Filter
# BOOKTITLE = Regexp::compile(/[\((]BOOKTITLE:([.]+)[\))]/)
def bookstore_title(str, type)
case type
when :P, :UL, :DL
str.gsub!(/\(BOOKTITLE:(.+)\)/){
title_org = $1
title = CGI::escape($1.kconv(2))
# if isbn2 =~ /^4/
t = '【 '
t << 'bk1 / '
# t << 'ISIZE / '
t << '旭屋 / '
# t << 'Jbook / '
t << 'BOL 】 '
=begin
t << '紀伊國屋 / '
t << 'amazon / '
t << 'eS! / '
t << '富士山 / '
t << '本屋さん 】'
elsif isbn2 =~ /^0/
t = '【 '
t << 'skysoft / '
t << 'amazon.co.jp / '
t << 'amazon.com / '
t << 'Barnes & Noble / '
t << 'A1Books / '
t << 'Powells.com / '
t << 'Borders / '
t << '紀伊國屋 / '
t << '丸善 】'
elsif isbn2~ /^1/
t = '【 '
t << 'amazon.co.uk / '
t << 'The Internet Bookshop / '
t << 'bol 】'
end
=end
}
end
end
end