create new log entry
parent
4f5c5c6548
commit
db1c3efb53
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue