1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-07-01 10:46:49 +02:00
muflax65ngodyewp.onion/commands/last.rb
2012-04-14 13:57:18 +02:00

20 lines
424 B
Ruby

usage 'last'
summary 'open last page'
description 'Opens last page in Emacs.'
module Nanoc::CLI::Commands
class Compress < ::Nanoc::CLI::CommandRunner
def run
page = Dir['content_daily/log/*.mkd'].map do |l|
[l.match(/\/(\d+).mkd$/)[1].to_i, l]
end.sort.last[1]
puts "editing: #{page}..."
system "emacs-gui #{page}"
end
end
end
runner Nanoc::CLI::Commands::Compress