def categorize_diary(diary)
		categorized = {}
		ymd = diary.date.strftime('%Y%m%d')

		idx = 1
		diary.each_section do |s|
			shorten = begin
				body = %Q|apply_plugin(#{s.body_to_html.dump}, true)|
				@conf.shorten(eval(body, @binding))
			rescue NameError
				""
			end
			s.categories.each do |c|
				categorized[c] = {} if categorized[c].nil?
				categorized[c][ymd] = [] if categorized[c][ymd].nil?
				categorized[c][ymd] << [idx, s.stripped_subtitle_to_html, shorten]
			end
			idx +=1
		end

		categorized
	end
def categorize_diary(diary)
		categorized = {}
		ymd = diary.date.strftime('%Y%m%d')

		idx = 1
		diary.each_section do |s|
			shorten = begin
				body = %Q|apply_plugin(#{s.body_to_html.dump}, true)|
				@conf.shorten(eval(body, @binding))
			rescue NameError
				""
			end
			s.categories.each do |c|
				categorized[c] = {} if categorized[c].nil?
				categorized[c][ymd] = [] if categorized[c][ymd].nil?
				categorized[c][ymd] << [idx, s.stripped_subtitle_to_html, shorten]
			end
			idx +=1
		end

		categorized
	end
categorize sections of diary

 {"category" => {"yyyymmdd" => [[idx, title, excerpt], ...]}}