Sha256: cbd965cb83a9ff412a8f5488d66eef4208811ffd39fff5aeed73679693b3baef
Contents?: true
Size: 806 Bytes
Versions: 1
Compression:
Stored size: 806 Bytes
Contents
module Octopress class Publish < Command def self.init_with_program(p) p.command(:publish) do |c| c.syntax 'publish <PATH> [options]' c.description 'Convert a draft to a normal published post.' c.option 'date', '--date DATE', 'String that is parseable by Time#parse. (default: Time.now.iso8601)' c.option 'force', '--force', 'Overwrite file if it already exists' c.option 'dir', '--dir DIR', 'Create post at _posts/DIR/.' CommandHelpers.add_common_options c c.action do |args, options| abort "You must specify a path." if args.empty? options['path'] = args.first options['type'] = 'post from draft' Draft.new(CommandHelpers.site(options), options).publish end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
octopress-3.0.0.rc.18 | lib/octopress/commands/publish.rb |