mirror of
https://github.com/fmap/muflax65ngodyewp.onion
synced 2024-07-02 10:50:42 +02:00
6706ea2e73
* use smaller images * rss fixed * categories fixed and improved * basic blog layout * minor fixes
20 lines
416 B
Ruby
20 lines
416 B
Ruby
usage 'last'
|
|
summary 'open last page'
|
|
description 'Opens last page in Emacs.'
|
|
|
|
module Nanoc::CLI::Commands
|
|
class Last < ::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::Last
|
|
|
|
|