Sha256: a3c230d066c35bfaf03a7f01095428806a2ad522c1264e362a9ee492f8c328ad
Contents?: true
Size: 578 Bytes
Versions: 7
Compression:
Stored size: 578 Bytes
Contents
#! /usr/bin/env ruby require 'shinmun' ENV['RACK_ENV'] = 'production' case ARGV[0] when 'init' Shinmun::Blog.init ARGV[1] when 'post' post = Shinmun::Post.new(:title => ARGV[1], :date => Date.today) post.save puts "Created post '#{post.path}'" when 'page' post = Shinmun::Post.new(:title => ARGV[1]) post.save puts "Created page '#{post.path}'" else puts "Usage:" puts " shinmun init dir - creates a new blog" puts " shinmun post 'Title of the post' - create a new post" puts " shinmun page 'Title of the page' - create a new page" exit end
Version data entries
7 entries across 7 versions & 1 rubygems
Version | Path |
---|---|
shinmun-1.0.3 | bin/shinmun |
shinmun-1.0.2 | bin/shinmun |
shinmun-1.0.1 | bin/shinmun |
shinmun-1.0 | bin/shinmun |
shinmun-0.9.2 | bin/shinmun |
shinmun-0.9.1 | bin/shinmun |
shinmun-0.9 | bin/shinmun |