mirror of
https://github.com/fmap/muflax65ngodyewp.onion
synced 2024-07-02 10:50:42 +02:00
18 lines
372 B
Ruby
18 lines
372 B
Ruby
usage '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
|
|
|
|
|