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

2002|01|02|03|04|05|06|07|08|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|02|03|04|07|

2006-07-05 [長年日記]

_ URI関連のフィードを用意しました

ひとまずURIおよびメモに関するフィードをRSS 1.0形式(従来のMM/Memoと同じような形式)で用意しました。

URI以外のデータをどう扱うかはいまだに検討中です。一応Atom方向を考えてはいるんですが、調べなければならないことが盛りだくさんなので、ひとまずは慣れているRSS 1.0でお茶を濁しておきます。

_ やっつけ1470footer

RSSを配信したついでにmm_footerをやっつけで改造したけど、CSS周りとかいろいろ調整が必要なんで、自分で改造して使う根性がある人だけどうぞ。

add_body_leave_proc(Proc.new do |date|

  oldest_date = Time.local(2005, 1, 11)
  if date > oldest_date
    if @mode == 'day' or @mode == 'latest'
      userName = 'ishinao' # your 1470.net id
      url = "http://1470.net/user/#{userName}/#{date.strftime('%Y/%m/%d')}"
      rssurl = "http://1470.net/user/#{userName}/#{date.strftime('%Y/%m/%d')}/feed"

      template_head = %Q[<div class="section mm_footer">\n<h3><a href="#{CGI.escapeHTML(url)}">今日のメモ</a> powered by <a href="http://1470.net/">1470.net</a></h3>\n<ul class="mm_footer">\n]
      template_list = '<li>#{content.gsub(/href="\//, "href=\"http://1470.net\/")}</li>'
      template_foot = "</ul>\n</div>\n"

      cache_time = 3600;
      if date.strftime('%Y-%m-%d') != Time.now.strftime('%Y-%m-%d')
        cache_time = 3600 * 12;
      end
      rss_recent(rssurl, 50, cache_time, template_head, template_list, template_foot)
    else
      ''
    end
  end
end)