runeblog 0.1.31 → 0.1.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/default.rb +5 -3
- data/lib/helpers-repl.rb +1 -0
- data/lib/post.rb +2 -1
- data/lib/repl.rb +8 -3
- data/lib/runeblog.rb +4 -0
- data/lib/runeblog_version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4060bfbf1baa5f509e4da338e926c7606ec44d802fc15b843e9a5fc0c1738b7f
|
4
|
+
data.tar.gz: c2c35413fa8ce15f6858646adc872ebb501d31b7153ca81c6f5900841d165b02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35cd25e62e26a81fbb4c070d606787c5274e3d3692e17d03da3cfd80d64f8b14d4519f0ade9d99e57a7ca1be6dc46faf040e610542491d3a1b3177d09a193644
|
7
|
+
data.tar.gz: b7c9af176b3a9fba7c8f06c6047a5a0c8a1bda5856a4ec2c1fecc524d7ff3d44f54b52f7dae36235a4af6b2d46e37704de16de0cfd450aa74dfac82cb3e75a6d
|
data/lib/default.rb
CHANGED
@@ -34,14 +34,16 @@ BlogTrailer = <<-TEXT
|
|
34
34
|
TEXT
|
35
35
|
|
36
36
|
def RuneBlog.post_template(title: "No title", date: nil, view: "test_view",
|
37
|
-
teaser: "No teaser", body: "No body")
|
37
|
+
teaser: "No teaser", body: "No body", tags: [], views: [])
|
38
|
+
viewlist = (views + [view.to_s]).join(" ")
|
39
|
+
taglist = tags.join(" ")
|
38
40
|
<<-TEXT
|
39
41
|
.mixin liveblog
|
40
42
|
|
41
43
|
.title #{title}
|
42
44
|
.pubdate #{date}
|
43
|
-
.views #{
|
44
|
-
.tags
|
45
|
+
.views #{viewlist}
|
46
|
+
.tags #{taglist}
|
45
47
|
|
46
48
|
.teaser
|
47
49
|
#{teaser}
|
data/lib/helpers-repl.rb
CHANGED
data/lib/post.rb
CHANGED
@@ -97,7 +97,8 @@ class RuneBlog::Post
|
|
97
97
|
|
98
98
|
def create_draft
|
99
99
|
html = RuneBlog.post_template(title: @meta.title, date: @meta.pubdate,
|
100
|
-
view: @meta.view, teaser: @meta.teaser, body: @meta.body
|
100
|
+
view: @meta.view, teaser: @meta.teaser, body: @meta.body,
|
101
|
+
views: @blog.post_views, tags: @blog.post_tags)
|
101
102
|
srcdir = "#{@blog.root}/src/"
|
102
103
|
verify(Dir.exist?(srcdir) => "#{srcdir} not found",
|
103
104
|
@meta.slug.is_a?(String) => "slug #{@meta.slug.inspect} is invalid")
|
data/lib/repl.rb
CHANGED
@@ -53,11 +53,16 @@ module RuneBlog::REPL
|
|
53
53
|
others = @blog.views - [@blog.view]
|
54
54
|
others.map!(&:name)
|
55
55
|
viewlist = STDSCR.multimenu(items: others)
|
56
|
-
|
56
|
+
@blog.post_views = viewlist
|
57
57
|
tags = File.readlines("tagpool").map(&:chomp)
|
58
|
-
|
58
|
+
return if tags.empty?
|
59
59
|
taglist = STDSCR.multimenu(items: tags)
|
60
|
-
|
60
|
+
@blog.post_tags = taglist
|
61
|
+
end
|
62
|
+
|
63
|
+
def cmd_tags(arg, testing = false)
|
64
|
+
Dir.chdir(@blog.root + "/views/" + @blog.view.name)
|
65
|
+
edit_file("tagpool")
|
61
66
|
end
|
62
67
|
|
63
68
|
def cmd_browse(arg, testing = false)
|
data/lib/runeblog.rb
CHANGED
@@ -34,6 +34,8 @@ class RuneBlog
|
|
34
34
|
attr_reader :root, :views, :sequence, :editor
|
35
35
|
attr_accessor :view # overridden
|
36
36
|
|
37
|
+
attr_accessor :post_views, :post_tags
|
38
|
+
|
37
39
|
include Helpers
|
38
40
|
|
39
41
|
def self.create_new_blog(dir = ".blog/data")
|
@@ -64,6 +66,8 @@ class RuneBlog
|
|
64
66
|
@views = get_views
|
65
67
|
@view = str2view(@view_name)
|
66
68
|
@sequence = get_sequence
|
69
|
+
@post_views = []
|
70
|
+
@post_tags = []
|
67
71
|
end
|
68
72
|
|
69
73
|
def view?(name)
|
data/lib/runeblog_version.rb
CHANGED
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.1.
|
4
|
+
version: 0.1.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|