«前の日記(2004-02-20) 最新 次の日記(2004-02-22)» 編集

Don'tStopMusic

2003|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|12|
2006|01|02|03|04|05|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|08|09|10|11|12|
2009|01|02|05|06|

カテゴリ別 2003年 | 2004年 | 2005年 | 2006年 | 2007年 | 2008年

知り合いサイト: よんだもの / 暴想 / Linuxでやる夫 / 新宿Vipper / 僕だけが幸せになればいいのに。


2004-02-21

_ [Ruby] rss RSS 1.0 生成 このエントリーを含むブックマーク

こんな感じです。>わたなべさん (ってこんなところ見てないか)

#!/usr/bin/env ruby
 
require 'rss/1.0'
 
rss = RSS::RDF.new
rss.channel = RSS::RDF::Channel.new('http://dontstopmusic.no-ip.org/index.rdf')
channel = rss.channel
channel.title = "Don'tStopMusic"
channel.link = 'http://dontstopmusic.no-ip.org/'
channel.description = '日記'
 
title1 = 'title1'
link1 = 'http://dontstopmusic.no-ip.org/diary/20040221.html#p01'
desc1 = 'desc1'
title2 = 'title2'
link2 = 'http://dontstopmusic.no-ip.org/diary/20040221.html#p02'
desc2 = 'desc2'
ary = [ [title1, link1, desc1], [title2, link2, desc2] ]
 
channel.items = RSS::RDF::Channel::Items.new
 
ary.each do |title, link, desc|
        # 代入で追加されます...
        channel.items.Seq.li = RSS::RDF::Li.new(link)
 
        item = RSS::RDF::Item.new(link)
        item.title = title
        item.link = link
        item.description = desc
        # 同上
        rss.item = item
end
 
print rss.to_s

_ [散財] 空飛ぶアオイ など このエントリーを含むブックマーク

_ [blog] Blog Hacks このエントリーを含むブックマーク

■■■3月発行予定書籍■■■
ISBN4-87311-174-9
Blog Hacks(仮)
オライリー・ジャパン -- 近刊案内

maonekoblog さんによると著者は宮川さん?どんな内容なんでしょうかね。

本日のツッコミ(全2件) [ツッコミを入れる]
_ kawaji (2004-02-24 15:53)

http://blog.bulknews.net/cookbook/<br>かな?

_ だて (2004-02-24 18:42)

そういう感じの内容みたいですね。<br>某技術系blogerとの共著という噂も聞きました。

[]

最近のコメント:

  1. だて (02-28)
  2. だて (02-28)
  3. hama☆log (02-28)

RSS
Creative Commons License
This work is licensed under a Creative Commons License
(note: text only. w/o web design, citations, (re)distributed softwares).