runeblog 0.0.32 → 0.0.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.lt3 +32 -0
- data/README.md +31 -0
- data/bin/blog +94 -95
- data/data/VERSION +1 -1
- data/lib/runeblog.rb +1 -1
- data/runeblog.gemspec +2 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c36780a0505ea8fa2687686d570bcd59cb439b7
|
4
|
+
data.tar.gz: ba6dc7297c75b48859dc5bd424e7c62ebc074bde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00b0dd5660a38ac27de73aaf4b9b6ba37829b093c9c326329b3251eecd506716cd3996c0f97267d033e2aac472ec81d7dcce88d78f7137822effb66bcc672dcc
|
7
|
+
data.tar.gz: b34c95d31aad06f53a46eee24057cdaea8d4feb2e09fb59d134d6a14ac4844188827f65920026039d77aaeff38b7d023b5151d4cbe222b8341b1d4720ab24b19
|
data/README.lt3
CHANGED
@@ -38,6 +38,38 @@ Each view can have its own look and feel, and it can be linked/published separat
|
|
38
38
|
Each view can be hosted in a different location and/or a different server and domain
|
39
39
|
.end
|
40
40
|
|
41
|
+
.h2 The `blog environment
|
42
|
+
|
43
|
+
There is a command-line tool called `blog which is a REPL (read-eval-print loop).
|
44
|
+
The help message looks like this:
|
45
|
+
|
46
|
+
.mono
|
47
|
+
Commands:
|
48
|
+
|
49
|
+
h, help This message
|
50
|
+
q, quit Exit the program
|
51
|
+
|
52
|
+
change view _view Change current view
|
53
|
+
new view Create a new view
|
54
|
+
list views List all views available
|
55
|
+
lsv Same as: list views
|
56
|
+
|
57
|
+
p, post Create a new post
|
58
|
+
new post Same as post (create a post)
|
59
|
+
lsp, list posts List posts in current view
|
60
|
+
lsd, list drafts List all posts regardless of view
|
61
|
+
|
62
|
+
rm _id Remove a post
|
63
|
+
edit _id Edit a post
|
64
|
+
|
65
|
+
open Look at current (local) view in browser
|
66
|
+
open remote Look at current (deployed) view in browser
|
67
|
+
|
68
|
+
relink Regenerate index for all views
|
69
|
+
rebuild Regenerate all posts and relink
|
70
|
+
deploy Deploy (current view)
|
71
|
+
.end
|
72
|
+
|
41
73
|
.h2 More later...
|
42
74
|
|
43
75
|
*[To be continued]
|
data/README.md
CHANGED
@@ -32,6 +32,37 @@ But the important points are these:
|
|
32
32
|
* Any post can easily be included in a single view, in more than one, or in all of them.
|
33
33
|
* Each view can have its own look and feel, and it can be linked/published separately from the others.
|
34
34
|
* Each view can be hosted in a different location and/or a different server and domain
|
35
|
+
## The `blog environment
|
36
|
+
There is a command-line tool called <tt>blog</tt> which is a REPL (read-eval-print loop).
|
37
|
+
The help message looks like this:
|
38
|
+
<p>
|
39
|
+
|
40
|
+
<pre>
|
41
|
+
Commands:
|
42
|
+
|
43
|
+
h, help This message
|
44
|
+
q, quit Exit the program
|
45
|
+
|
46
|
+
change view <i>view</i> Change current view
|
47
|
+
new view Create a new view
|
48
|
+
list views List all views available
|
49
|
+
lsv Same as: list views
|
50
|
+
|
51
|
+
p, post Create a new post
|
52
|
+
new post Same as post (create a post)
|
53
|
+
lsp, list posts List posts in current view
|
54
|
+
lsd, list drafts List all posts regardless of view
|
55
|
+
|
56
|
+
rm <i>id</i> Remove a post
|
57
|
+
edit <i>id</i> Edit a post
|
58
|
+
|
59
|
+
open Look at current (local) view in browser
|
60
|
+
open remote Look at current (deployed) view in browser
|
61
|
+
|
62
|
+
relink Regenerate index for all views
|
63
|
+
rebuild Regenerate all posts and relink
|
64
|
+
deploy Deploy (current view)
|
65
|
+
</pre>
|
35
66
|
## More later...
|
36
67
|
<b>To be continued</b>
|
37
68
|
<p>
|
data/bin/blog
CHANGED
@@ -38,107 +38,102 @@ end
|
|
38
38
|
def do_nothing
|
39
39
|
end
|
40
40
|
|
41
|
+
def expect_w(meth)
|
42
|
+
@meth = meth
|
43
|
+
expected(1)
|
44
|
+
end
|
45
|
+
|
46
|
+
def expect_w_arg(meth, optional = false)
|
47
|
+
raise "Too many arguments" if @words.size > 2
|
48
|
+
@meth = meth
|
49
|
+
@arg = optional ? @words[1] : need_arg(1)
|
50
|
+
end
|
51
|
+
|
52
|
+
def handle_open
|
53
|
+
case @words.size
|
54
|
+
when 1
|
55
|
+
@meth = :open_local
|
56
|
+
when 2
|
57
|
+
if @words[1] == "remote"
|
58
|
+
@meth = :open_remote
|
59
|
+
else
|
60
|
+
raise "Don't know '#{@words[1]}'"
|
61
|
+
end
|
62
|
+
else
|
63
|
+
raise "Don't understand '#{@words.join(' ')}'"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def handle_list
|
68
|
+
case @words[1]
|
69
|
+
when "views"
|
70
|
+
@meth = :list_views
|
71
|
+
expected(2)
|
72
|
+
when "posts"
|
73
|
+
@meth = :list_posts
|
74
|
+
expected(2)
|
75
|
+
when "drafts"
|
76
|
+
@meth = :list_drafts
|
77
|
+
expected(2)
|
78
|
+
else
|
79
|
+
@cmd = nil
|
80
|
+
raise "Unknown #{@words[1]}"
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def handle_new
|
85
|
+
case @words[1]
|
86
|
+
when "view"
|
87
|
+
@meth = :new_view
|
88
|
+
expected(2)
|
89
|
+
@arg = need_arg(2)
|
90
|
+
when "post"
|
91
|
+
@meth = :new_post
|
92
|
+
expected(2)
|
93
|
+
else
|
94
|
+
@cmd = nil
|
95
|
+
raise "Unknown '#{@words[1]}'"
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
def handle_change
|
100
|
+
case @words[2]
|
101
|
+
when "view"
|
102
|
+
raise "Too many arguments" if @words.size > 3
|
103
|
+
@meth = :change_view
|
104
|
+
@arg = need_arg(2)
|
105
|
+
else
|
106
|
+
raise "Unknown '#{@words[1]}'"
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
41
110
|
def parse_cmd
|
42
111
|
@cmd = gets.chomp
|
112
|
+
@arg = ""
|
43
113
|
if @cmd == ""
|
44
114
|
@meth = :do_nothing
|
45
115
|
return @cmd
|
46
116
|
end
|
47
|
-
|
117
|
+
|
48
118
|
@words = @cmd.split
|
49
119
|
case @words.first
|
50
|
-
when "h", "help"
|
51
|
-
|
52
|
-
|
53
|
-
when "
|
54
|
-
|
55
|
-
|
56
|
-
when "
|
57
|
-
|
58
|
-
|
59
|
-
when "
|
60
|
-
|
61
|
-
|
62
|
-
when "
|
63
|
-
|
64
|
-
|
65
|
-
when "
|
66
|
-
|
67
|
-
expected(1)
|
68
|
-
when "relink"
|
69
|
-
@meth = :relink
|
70
|
-
expected(1)
|
71
|
-
when "rebuild"
|
72
|
-
@meth = :rebuild
|
73
|
-
expected(1)
|
74
|
-
when "deploy"
|
75
|
-
@meth = :deploy
|
76
|
-
expected(1)
|
77
|
-
when "version"
|
78
|
-
@meth = :version
|
79
|
-
expected(1)
|
80
|
-
when "open"
|
81
|
-
case @words.size
|
82
|
-
when 1
|
83
|
-
@meth = :open_local
|
84
|
-
when 2
|
85
|
-
if @words[1] == "remote"
|
86
|
-
@meth = :open_remote
|
87
|
-
else
|
88
|
-
raise "Don't know '#{@words[1]}'"
|
89
|
-
end
|
90
|
-
else
|
91
|
-
raise "Don't understand '#{@words.join(' ')}'"
|
92
|
-
end
|
93
|
-
when "cv"
|
94
|
-
raise "Too many arguments" if @words.size > 2
|
95
|
-
@meth = :change_view
|
96
|
-
@arg = @words[1]
|
97
|
-
when "rm"
|
98
|
-
raise "Too many arguments" if @words.size > 2
|
99
|
-
@meth = :remove_post
|
100
|
-
@arg = need_arg(1)
|
101
|
-
when "e", "edit"
|
102
|
-
raise "Too many arguments" if @words.size > 2
|
103
|
-
@meth = :edit_post
|
104
|
-
@arg = need_arg(1)
|
105
|
-
when "list"
|
106
|
-
case @words[1]
|
107
|
-
when "views"
|
108
|
-
@meth = :list_views
|
109
|
-
expected(2)
|
110
|
-
when "posts"
|
111
|
-
@meth = :list_posts
|
112
|
-
expected(2)
|
113
|
-
when "drafts"
|
114
|
-
@meth = :list_drafts
|
115
|
-
expected(2)
|
116
|
-
else
|
117
|
-
@cmd = nil
|
118
|
-
raise "Unknown #{@words[1]}"
|
119
|
-
end
|
120
|
-
when "new"
|
121
|
-
case @words[1]
|
122
|
-
when "view"
|
123
|
-
@meth = :new_view
|
124
|
-
expected(2)
|
125
|
-
@arg = need_arg(2)
|
126
|
-
when "post"
|
127
|
-
@meth = :new_post
|
128
|
-
expected(2)
|
129
|
-
else
|
130
|
-
@cmd = nil
|
131
|
-
raise "Unknown '#{@words[1]}'"
|
132
|
-
end
|
133
|
-
when "change"
|
134
|
-
case @words[2]
|
135
|
-
when "view"
|
136
|
-
raise "Too many arguments" if @words.size > 3
|
137
|
-
@meth = :change_view
|
138
|
-
@arg = need_arg(2)
|
139
|
-
else
|
140
|
-
raise "Unknown '#{@words[1]}'"
|
141
|
-
end
|
120
|
+
when "h", "help"; expect_w(:help)
|
121
|
+
when "q", "quit"; expect_w(:quit)
|
122
|
+
when "p", "post"; expect_w(:new_post)
|
123
|
+
when "lsv"; expect_w(:list_views)
|
124
|
+
when "lsp"; expect_w(:list_posts)
|
125
|
+
when "lsd"; expect_w(:list_drafts)
|
126
|
+
when "relink"; expect_w(:relink)
|
127
|
+
when "rebuild"; expect_w(:rebuild)
|
128
|
+
when "deploy"; expect_w(:deploy)
|
129
|
+
when "version"; expect_w(:version)
|
130
|
+
when "cv"; expect_w_arg(:change_view, true)
|
131
|
+
when "rm"; expect_w_arg(:remove_post)
|
132
|
+
when "e", "edit"; expect_w_arg(:edit_post)
|
133
|
+
when "open"; handle_open
|
134
|
+
when "list"; handle_list
|
135
|
+
when "new"; handle_new
|
136
|
+
when "change"; handle_change
|
142
137
|
else
|
143
138
|
@cmd = nil
|
144
139
|
raise "Unknown '#{@words[0]}'"
|
@@ -161,7 +156,7 @@ def help
|
|
161
156
|
h, help This message
|
162
157
|
q, quit Exit the program
|
163
158
|
|
164
|
-
change view
|
159
|
+
change view VIEW Change current view
|
165
160
|
new view Create a new view
|
166
161
|
list views List all views available
|
167
162
|
lsv Same as: list views
|
@@ -170,8 +165,12 @@ def help
|
|
170
165
|
new post Same as post (create a post)
|
171
166
|
lsp, list posts List posts in current view
|
172
167
|
lsd, list drafts List all posts regardless of view
|
173
|
-
rm Remove a post
|
174
168
|
|
169
|
+
rm ID Remove a post
|
170
|
+
edit ID Edit a post
|
171
|
+
|
172
|
+
open Look at current (local) view in browser
|
173
|
+
open remote Look at current (deployed) view in browser
|
175
174
|
relink Regenerate index for all views
|
176
175
|
rebuild Regenerate all posts and relink
|
177
176
|
deploy Deploy (current view)
|
data/data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
RuneBlog v 0.0.
|
1
|
+
RuneBlog v 0.0.33 2017-05-12
|
data/lib/runeblog.rb
CHANGED
data/runeblog.gemspec
CHANGED
@@ -14,12 +14,13 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.authors = ["Hal Fulton"]
|
15
15
|
s.email = 'rubyhacker@gmail.com'
|
16
16
|
s.executables << "blog"
|
17
|
-
s.add_runtime_dependency 'livetext', '~> 0.8', '>= 0.8.
|
17
|
+
s.add_runtime_dependency 'livetext', '~> 0.8', '>= 0.8.20'
|
18
18
|
|
19
19
|
# Files...
|
20
20
|
main = Find.find("bin").to_a +
|
21
21
|
Find.find("lib").to_a +
|
22
22
|
Find.find("data").to_a
|
23
|
+
|
23
24
|
misc = %w[./README.lt3 ./README.md runeblog.gemspec]
|
24
25
|
test = Find.find("test").to_a
|
25
26
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runeblog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '0.8'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.8.
|
22
|
+
version: 0.8.20
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '0.8'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.8.
|
32
|
+
version: 0.8.20
|
33
33
|
description: A blog system based on Ruby and Livetext
|
34
34
|
email: rubyhacker@gmail.com
|
35
35
|
executables:
|