lib/command/list.rb in narou-1.2.5.1 vs lib/command/list.rb in narou-1.2.6

- old
+ new

@@ -33,18 +33,23 @@ @options["url"] = true } end def output_list(novels) + today = Time.now.strftime("%y/%m/%d") puts " ID | 更新日 | タイトル" novels.each do |novel| id = novel["id"] frozen = Narou.novel_frozen?(id) disp_id = ((frozen ? "*" : "") + id.to_s).rjust(4) disp_id = disp_id.sub("*", "<cyan>*</cyan>").termcolor if frozen puts [ disp_id, - novel["last_update"].strftime("%y/%m/%d"), + novel["last_update"].strftime("%y/%m/%d").tap { |s| + if s == today + s.replace "<bold><green>#{s}</green></bold>".termcolor + end + }, novel["title"], @options["url"] ? novel["toc_url"] : nil ].compact.join(" | ") end end