mirror of
https://github.com/fmap/muflax65ngodyewp.onion
synced 2025-01-05 12:35:06 +01:00
fix with latest wc changes
This commit is contained in:
parent
d74ab96383
commit
f13c41b78d
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue