1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-06-28 10:26:50 +02:00
muflax65ngodyewp.onion/commands/create_log.rb

18 lines
379 B
Ruby
Raw Normal View History

2012-04-22 00:11:05 +02:00
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