create new log entry

master
muflax 2012-04-22 00:11:05 +02:00
parent 4f5c5c6548
commit db1c3efb53
1 changed files with 17 additions and 0 deletions

17
commands/create_log.rb Normal file
View File

@ -0,0 +1,17 @@
usage 'create_log'
summary 'create new log entry'
description 'Opens new log entry in Emacs.'
module Nanoc::CLI::Commands
class CreateLog < ::Nanoc::CLI::CommandRunner
def run
page = daily_logs.last.gsub(/(\d+)/) {|s| s.to_i + 1}
puts "editing: #{page}..."
system "emacs-gui #{page}"
end
end
end
runner Nanoc::CLI::Commands::CreateLog