runeblog 0.2.37 → 0.2.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/empty_view/themes/standard/blog/generate.lt3 +12 -12
- data/lib/helpers-repl.rb +4 -2
- data/lib/repl.rb +34 -21
- data/lib/runeblog_version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 703ba416efcf4467ac20d3a9e37084c49004b48fae50adeb25beb1ec013a4d0a
|
|
4
|
+
data.tar.gz: ac0c5e8a64578169f7faa3c729baaecb6a83ea28d9639d8ea74b49b42ada943a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8080cbdaedbb3795cf8f3c1e3fef03ed44633423d41471bc7a8632f57b65ca9a01a82843a4324a75abd1e9b241db5f9b3d47c21f09ef23788cc86a240083bd8e
|
|
7
|
+
data.tar.gz: d4abe4cc7ea9af24a93416a567e6286fa4a3b8cfe6356c4e633337bff1413f9fab83e3ca60d1cea6790aa50cfca2e12593dbf7fdb392011ff86c30545c10cb41
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
. This file will usually not be edited by the user.
|
|
3
3
|
. It is used to generate the top-level index.html
|
|
4
4
|
. The user will more often edit blog/index.lt3 in
|
|
5
|
-
. the process of blog setup.
|
|
5
|
+
. the process of blog setup.
|
|
6
6
|
. --------------------------------------------------
|
|
7
7
|
|
|
8
8
|
.mixin liveblog
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
<body>
|
|
16
16
|
|
|
17
17
|
. FIXME
|
|
18
|
-
<table width=100%>
|
|
19
|
-
<tr>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</tr>
|
|
28
|
-
</table>
|
|
18
|
+
<table width=100%>
|
|
19
|
+
<tr>
|
|
20
|
+
<td width=30% bgcolor=black>
|
|
21
|
+
<div style="text-align: center; color: white">
|
|
22
|
+
<h1>Around Austin</h1><br>
|
|
23
|
+
The view from downtown...
|
|
24
|
+
</div>
|
|
25
|
+
</td>
|
|
26
|
+
<td><img src=assets/sky2.jpg width=100%></img>
|
|
27
|
+
</tr>
|
|
28
|
+
</table>
|
|
29
29
|
|
|
30
30
|
$.include navbar/navbar.lt3
|
|
31
31
|
<div class="content container-fluid mt-4">
|
data/lib/helpers-repl.rb
CHANGED
|
@@ -40,7 +40,9 @@ module RuneBlog::REPL
|
|
|
40
40
|
"list assets" => :cmd_list_assets,
|
|
41
41
|
"lsa" => :cmd_list_assets,
|
|
42
42
|
|
|
43
|
-
"
|
|
43
|
+
"pages" => :cmd_pages,
|
|
44
|
+
|
|
45
|
+
"delete >postid" => :cmd_remove_post,
|
|
44
46
|
"undel $postid" => :cmd_undelete_post,
|
|
45
47
|
|
|
46
48
|
"edit $postid" => :cmd_edit_post,
|
|
@@ -103,7 +105,7 @@ module RuneBlog::REPL
|
|
|
103
105
|
end
|
|
104
106
|
meth = found || :cmd_INVALID
|
|
105
107
|
params = cmd if meth == :cmd_INVALID
|
|
106
|
-
puts "choose: #{[meth, params].inspect}"
|
|
108
|
+
# puts "choose: #{[meth, params].inspect}"
|
|
107
109
|
[meth, params]
|
|
108
110
|
end
|
|
109
111
|
|
data/lib/repl.rb
CHANGED
|
@@ -36,28 +36,40 @@ module RuneBlog::REPL
|
|
|
36
36
|
@out
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
def
|
|
39
|
+
def cmd_pages(arg, testing = false)
|
|
40
40
|
check_empty(arg)
|
|
41
|
-
dir = @blog.view.dir
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
41
|
+
dir = @blog.view.dir/"themes/standard/widgets/pages"
|
|
42
|
+
# Assume child files already generated (and list.data??)
|
|
43
|
+
data = dir/"list.data"
|
|
44
|
+
lines = File.readlines(data)
|
|
45
|
+
hash = {}
|
|
46
|
+
lines.each do |line|
|
|
47
|
+
url, name = line.chomp.split(",")
|
|
48
|
+
source = url.sub(/.html$/, ".lt3")
|
|
49
|
+
hash[name] = source
|
|
50
|
+
end
|
|
51
|
+
new_item = "[New page]"
|
|
52
|
+
num, fname = STDSCR.menu(title: "Edit page:", items: hash.keys + [new_item])
|
|
53
|
+
return if fname.nil?
|
|
54
|
+
if fname == new_item
|
|
55
|
+
print "Page title: "
|
|
56
|
+
title = RubyText.gets
|
|
57
|
+
title.chomp!
|
|
58
|
+
print "File name (.lt3): "
|
|
59
|
+
fname = RubyText.gets
|
|
60
|
+
fname << ".lt3" unless fname.end_with?(".lt3")
|
|
61
|
+
fhtml = fname.sub(/.lt3$/, ".html")
|
|
62
|
+
File.open(data, "a") {|f| f.puts "#{fhtml},#{title}" }
|
|
63
|
+
new_file = dir/fname
|
|
64
|
+
File.open(new_file, "w") do |f|
|
|
65
|
+
f.puts "<h1>#{title}</h1>\n\n\n "
|
|
66
|
+
f.puts ".backlink"
|
|
67
|
+
end
|
|
68
|
+
edit_file(new_file)
|
|
69
|
+
else
|
|
70
|
+
target = hash[fname]
|
|
71
|
+
edit_file(dir/target)
|
|
72
|
+
end
|
|
61
73
|
end
|
|
62
74
|
|
|
63
75
|
def cmd_import(arg, testing = false)
|
|
@@ -143,6 +155,7 @@ module RuneBlog::REPL
|
|
|
143
155
|
n = viewnames.find_index(@blog.view.name)
|
|
144
156
|
name = @blog.view.name
|
|
145
157
|
k, name = STDSCR.menu(title: "Views", items: viewnames, curr: n) unless testing
|
|
158
|
+
return if name.nil?
|
|
146
159
|
@blog.view = name
|
|
147
160
|
output name + "\n"
|
|
148
161
|
puts "\n ", fx(name, :bold), "\n" unless testing
|
data/lib/runeblog_version.rb
CHANGED