georgi-shinmun 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/shinmun +8 -2
- metadata +1 -1
data/bin/shinmun
CHANGED
@@ -7,10 +7,16 @@ when 'init'
|
|
7
7
|
Shinmun::Blog.init ARGV[1]
|
8
8
|
|
9
9
|
when 'post'
|
10
|
-
Shinmun::
|
10
|
+
post = Shinmun::Post.new(:title => ARGV[1], :date => Date.today)
|
11
|
+
FileUtils.mkpath(File.dirname(post.path))
|
12
|
+
open(post.path, 'w') { |io| io.write post.dump }
|
13
|
+
puts "created #{post.path}"
|
11
14
|
|
12
15
|
when 'page'
|
13
|
-
Shinmun::
|
16
|
+
post = Shinmun::Post.new(:title => ARGV[1])
|
17
|
+
FileUtils.mkpath(File.dirname(post.path))
|
18
|
+
open(post.path, 'w') { |io| io.write post.dump }
|
19
|
+
puts "created #{post.path}"
|
14
20
|
|
15
21
|
else
|
16
22
|
puts "Usage:"
|