fix with latest wc changes

master
muflax 2012-05-30 06:55:19 +02:00
parent d74ab96383
commit f13c41b78d
1 changed files with 9 additions and 1 deletions

View File

@ -5,11 +5,19 @@ description 'Opens last page in Emacs.'
module Nanoc::CLI::Commands
class Last < ::Nanoc::CLI::CommandRunner
def run
page = daily_logs.last
site = load_site "daily"
logs = site.items_by_date.select do |i|
i.reps.any? {|r| r.name == :wordcount}
end
page = logs.last[:filename]
puts "editing: #{page}..."
system "emacs-gui #{page}"
end
end
end
runner Nanoc::CLI::Commands::Last