# today.rb v1.2 2002.12.2 by ippo # today.rb v1.3 2003.5.19 by ippo #CSS化 # (modefied- enikki.rb,v 1.2 2001/09/03 22:54:46 not Exp) =begin LOG_DIRECTORYフォルダにある「なんの日?ファイル」を読み込み、毎日の冒頭に。 ファイル名は「todaysf.txt」、フォーマットは各行「MMDD(tab)date(tab)string」 =end class Filter @@today_file = 'todaysf.txt' @@today_url = 'http://homepage2.nifty.com/URU/' def today(str, type) if @todaylist.nil? then @todaylist = [] open(@diary.logDirectory + @@today_file).each{ |line| line = line.split("\t") date = line.shift time = '0101' if date =~ /(\d\d)(\d\d)/ then #月、日のdateデータ time = $1 time << $2 end @todaylist << [time, line] } end case type when :ONEDAY list = @todaylist.find_all{ |time, data| time == @diary.date[4..7]} if list.size > 0 then info = '