runeblog 0.3.11 → 0.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/empty_view/themes/standard/widgets/pinned/pinned.rb +17 -5
- data/lib/liveblog.rb +0 -3
- 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: '0372218e12e1f9436b17621b6d32a0894daf4e58bbf7f2cd55dd6fc48eca5af5'
|
4
|
+
data.tar.gz: 33da1a53944d8db1b681f885446721e626699b8a3b0126bd3b854df1f707a203
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d5fd3bf878e11f7d9d1cba4659c9f199a0cc7908bf2bf9596e6e2716e56a53863cd0cf978dfa3c0db033c8129ab5ddf2f29daf315fa058e50171b783c926012
|
7
|
+
data.tar.gz: 5790b07d2a6b3ca787b67e473f83e99ee4d29171ffc6bdbe30e5275b2ae098c7a388bd873cd9a6e1bb1a3206082e59f1bbefcffc158b3f704a0fda3a02637d7e
|
@@ -10,6 +10,13 @@ class ::RuneBlog::Widget
|
|
10
10
|
@lines = _get_data?(@datafile)
|
11
11
|
end
|
12
12
|
|
13
|
+
def read_metadata
|
14
|
+
meta = read_pairs!("metadata.txt")
|
15
|
+
meta.views = meta.views.split
|
16
|
+
meta.tags = meta.tags.split
|
17
|
+
meta
|
18
|
+
end
|
19
|
+
|
13
20
|
def _html_body(file, css = nil) # FIXME
|
14
21
|
file.puts "<html>"
|
15
22
|
if css
|
@@ -23,8 +30,9 @@ class ::RuneBlog::Widget
|
|
23
30
|
end
|
24
31
|
|
25
32
|
def build
|
33
|
+
dir = @blog.root/:posts
|
26
34
|
posts = nil
|
27
|
-
Dir.chdir(
|
35
|
+
Dir.chdir(dir) { posts = Dir["*"] }
|
28
36
|
hash = {}
|
29
37
|
@links = []
|
30
38
|
@lines.each do |x|
|
@@ -32,9 +40,12 @@ class ::RuneBlog::Widget
|
|
32
40
|
hash[num] = title
|
33
41
|
pre = '%04d' % num
|
34
42
|
nslug = posts.grep(/#{pre}-/).first
|
43
|
+
meta = nil
|
44
|
+
Dir.chdir(dir/nslug) { meta = read_metadata }
|
45
|
+
pubdate = meta.pubdate
|
35
46
|
name = nslug[5..-1]
|
36
47
|
link = name+".html"
|
37
|
-
@links << [title, link]
|
48
|
+
@links << [pubdate, title, link]
|
38
49
|
end
|
39
50
|
write_main
|
40
51
|
write_card
|
@@ -49,10 +60,11 @@ class ::RuneBlog::Widget
|
|
49
60
|
_html_body(f, css) do
|
50
61
|
f.puts "<!-- #{@lines.inspect} in #{Dir.pwd} -->"
|
51
62
|
f.puts "<h1>#{card_title}</h1><br><hr>"
|
52
|
-
@links.each do |title, file|
|
63
|
+
@links.each do |pubdate, title, file|
|
53
64
|
title = title.gsub(/\\/, "") # kludge
|
54
65
|
css = "color: #8888FF; text-decoration: none; font-size: 21px"
|
55
|
-
f.puts
|
66
|
+
f.puts "<!-- pubdate = #{pubdate.inspect} -->"
|
67
|
+
f.puts %[#{pubdate} <a style="#{css}" href="../../#{file}">#{title}</a> <br>]
|
56
68
|
end
|
57
69
|
end
|
58
70
|
end
|
@@ -75,7 +87,7 @@ class ::RuneBlog::Widget
|
|
75
87
|
</h5>
|
76
88
|
<div class="collapse" id="#{tag}">
|
77
89
|
EOS
|
78
|
-
@links.each do |title, file|
|
90
|
+
@links.each do |pubdate, title, file|
|
79
91
|
url2 = file
|
80
92
|
url_ref = %[href="javascript: void(0)" onclick="javascript:open_main('#{url2}')"]
|
81
93
|
anchor = %[<a #{url_ref}>#{title}</a>]
|
data/lib/liveblog.rb
CHANGED
@@ -89,9 +89,6 @@ def post_trailer
|
|
89
89
|
perma = _var("publish.proto") + "://" + _var("publish.server") +
|
90
90
|
"/" + _var("publish.path") + "/" + _var("post.aslug") +
|
91
91
|
".html"
|
92
|
-
Livetext::Vars.each_pair do |k,v|
|
93
|
-
STDERR.puts "#{k}: #{v.inspect}" unless k.is_a? Symbol
|
94
|
-
end
|
95
92
|
tags = _var("post.tags")
|
96
93
|
taglist = tags.empty? ? "" : "Tags: #{tags}"
|
97
94
|
|
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.3.
|
4
|
+
version: 0.3.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hal Fulton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: livetext
|